mesa/src/mesa
Alejandro Piñeiro 0629b2a462 nir, glsl: move pixel_center_integer/origin_upper_left to shader_info.fs
On GLSL that info is set as a layout qualifier when redeclaring
gl_FragCoord, so somehow tied to a specific variable. But in practice,
they behave as a global of the shader. On ARB programs they are set
using a global OPTION (defined at ARB_fragment_coord_conventions), and
on SPIR-V using ExecutionModes, that are also not tied specifically to
the builtin.

This patch moves that info from nir variable and ir variable to nir
shader and gl_program shader_info respectively, so the map is more
similar to SPIR-V, and ARB programs, instead of more similar to GLSL.

FWIW, shader_info.fs already had pixel_center_integer, so this change
also removes some redundancy. Also, as struct gl_program also includes
a shader_info, we removed gl_program::OriginUpperLeft and
PixelCenterInteger, as it would be superfluous.

This change was needed because recently spirv_to_nir changed the order
in which execution modes and variables are handled, so the variables
didn't get the correct values. Now the info is set on the shader
itself, and we don't need to go back to the builtin variable to set
it.

Fixes: e68871f6a ("spirv: Handle constants and types before execution
                   modes")

v2: (Jason)
   * glsl_to_nir: get the info before glsl_to_nir, while all the rest
     of the info gathering is happening
   * prog_to_nir: gather the info on a general info-gathering pass,
     not on variable setup.

v3: (Jason)
   * Squash with the patch that removes that info from ir variable
   * anv: assert that OriginUpperLeft is true. It should be already
     set by spirv_to_nir.
   * blorp: set origin_upper_left on its core "compile fragment
     shader", not just on some specific places (for this we added an
     helper on a previous patch).
   * prog_to_nir: no need to gather specifically this fragcoord modes
     as the full gl_program shader_info is copied.
   * spirv_to_nir: assert that we are a fragment shader when handling
     this execution modes.

v4: (reported by failing gitlab pipeline #18750)
   * state_tracker: update too due changes on ir.h/gl_program

v5:
   * blorp: minor change after change on previous patch
   * radeonsi: update due this change.

v6: (Timothy Arceri)
   * prog_to_nir: remove extra whitespace
   * shader_info: don't use :1 on origin_upper_left
   * glsl: program.fs.origin_upper_left/pixel_center_integer can be
     move out of the shader list loop
2019-02-21 11:47:59 +01:00
..
drivers i965: re-emit index buffer state on a reset option change. 2019-02-20 20:27:56 +02:00
main nir, glsl: move pixel_center_integer/origin_upper_left to shader_info.fs 2019-02-21 11:47:59 +01:00
math mesa: include mtypes.h less 2018-04-12 19:31:30 -04:00
program nir, glsl: move pixel_center_integer/origin_upper_left to shader_info.fs 2019-02-21 11:47:59 +01:00
sparc tree-wide: remove trailing backslash 2017-06-07 01:18:09 +01:00
state_tracker nir, glsl: move pixel_center_integer/origin_upper_left to shader_info.fs 2019-02-21 11:47:59 +01:00
swrast nir, glsl: move pixel_center_integer/origin_upper_left to shader_info.fs 2019-02-21 11:47:59 +01:00
swrast_setup mesa: replace VP/FP/ATIfs _Enabled flags with helper functions 2017-06-22 01:51:02 +02:00
tnl mesa: Factor out struct gl_vertex_format. 2018-11-21 06:27:19 +01:00
tnl_dd mesa: replace ctx->Polygon._FrontBit with a helper function 2017-06-22 01:51:02 +02:00
vbo mesa: Factor out struct gl_vertex_format. 2018-11-21 06:27:19 +01:00
x86 mesa: fix x86 builds 2018-04-13 22:13:46 +10:00
x86-64
.gitignore
Android.gen.mk mesa: Fix Android build 2017-06-28 14:41:45 -07:00
Android.libmesa_dricore.mk intel: compiler option msse2 and mstackrealign 2018-09-07 13:45:46 +01:00
Android.libmesa_git_sha1.mk git_sha1: simplify logic 2018-08-16 17:38:31 +01:00
Android.libmesa_glsl_utils.mk
Android.libmesa_sse41.mk intel: compiler option msse2 and mstackrealign 2018-09-07 13:45:46 +01:00
Android.libmesa_st_mesa.mk svga: fix git_sha1.h include path in Android.mk (v3) 2017-06-15 15:46:44 +01:00
Android.mesa_gen_matypes.mk
Android.mk svga: fix git_sha1.h include path in Android.mk (v3) 2017-06-15 15:46:44 +01:00
gl.pc.in autotools: use correct gl.pc LIBS when using glvnd 2018-08-08 13:37:09 +01:00
Makefile.am configure: allow building with python3 2018-10-31 19:15:50 +00:00
Makefile.sources st/nir: Make new helpers for constructing built-in NIR shaders. 2019-02-05 13:43:33 -08:00
meson.build st/nir: Make new helpers for constructing built-in NIR shaders. 2019-02-05 13:43:33 -08:00
SConscript scons: Remove gles option. 2018-10-19 16:50:26 +01:00