Commit Graph

114 Commits

Author SHA1 Message Date
Kenneth Graunke a4fd84ef5f mesa: Introduce a compiler enum for tessellation spacing.
It feels weird using GL_* enums in a Vulkan driver.

v2: Fix the TESS_SPACING -> PIPE_TESS_SPACING conversion.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-01-07 22:22:28 -08:00
Kenneth Graunke 9bb89175e6 compiler: Change shader_info->tes.vertex_order into a ccw boolean.
The vertex order is either clockwise or counterclockwise.  We can just
store a "ccw" boolean rather than GLenum values.  I don't want to use
GLenums in a Vulkan driver, and even in GL a simple boolean works fine.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-01-07 20:42:32 -08:00
Timothy Arceri 8a69ae5345 mesa/compiler: add local_size_variable to shader_info
This will be used in api_validate.c in a following patch when we
switch to using gl_program pointers for the pipelines CurrentProgram
array.

Reviewed-by: Eric Anholt <eric@anholt.net>
2016-12-30 10:57:16 +11:00
Timothy Arceri 0de6f6223a mesa/compiler: add stage to shader_info
This will allow us to simplify the current program logic for SSO.

Also since we aim to detach shader_info from nir_shader this will come
in handy avoiding passing nir_shader around just to keep track of
the stage we are dealing with.

V2: set stage for arb asm programs also.

Reviewed-by: Eric Anholt <eric@anholt.net>
2016-12-30 10:57:15 +11:00
Lionel Landwerlin 039d836d6e mesa: add support for GL_INTEL_conservative_rasterization
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
2016-12-07 11:02:16 +00:00
Plamena Manolova 8481386892 mesa: Add GL and GLSL plumbing for ARB_post_depth_coverage for i965 (gen9+).
This extension allows the fragment shader to control whether values in
gl_SampleMaskIn[] reflect the coverage after application of the early
depth and stencil tests.

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
2016-12-07 11:01:50 +00:00
Kenneth Graunke c447ca64c1 compiler: Store the clip/cull distance array sizes in shader_info.
We switched from a boolean to array lengths in gl_program a while back.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-19 12:30:25 -08:00
Timothy Arceri 8af1b2a2ce compiler: remove now unused copy_shader_info() declaration
Left over from 4ac66861

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-17 11:02:25 +11:00
Timothy Arceri 29ade71af9 compiler: include shader_enums.h in shader_info.h
We make use of some enums here.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-17 11:02:19 +11:00
Timothy Arceri 54095ed8b9 compiler: add additional cs metadata fields to shader info
And copy values from GLSL.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-26 14:29:36 +11:00
Timothy Arceri b99ecaf872 compiler: add input primative field for gs in shader info
And copy the value from GLSL.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-26 14:29:36 +11:00
Timothy Arceri 088c25bfb7 compiler: add fields for tes metadata to shader info
And copy the values from gl_tess_eval_program struct.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-26 14:29:36 +11:00
Timothy Arceri 9d2b391165 glsl: add temporary copy_shader_info() function
This function is added here to ease refactoring towards using the new shared
shader_info. Once refactoring is complete and values are set directly it
will be removed.

We call it from _mesa_copy_linked_program_data() rather than glsl_to_nir()
so that the values will be set for all drivers. In order to do this some
calls need to be moved around so that we make sure to call
do_set_program_inouts() before _mesa_copy_linked_program_data()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-26 14:29:36 +11:00
Timothy Arceri 094fe3a959 nir: move nir_shader_info to a common compiler header
This will allow use to stop copying values between structs and
will also simplify handling handling these values in the shader cache.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-26 14:29:36 +11:00