summaryrefslogtreecommitdiffstats
path: root/src/compiler/shader_info.h
Commit message (Collapse)AuthorAgeFilesLines
* compiler: Merge shader_info's tcs and tes structs.Kenneth Graunke2017-01-101-4/+3
| | | | | | | | | | | | | | | Annoyingly, SPIR-V lets you specify all of these fields in either the TCS or TES, which means that we need to be able to store all of them for either shader stage. Putting them in a union won't work. Combining both is an easy solution, and given that the TCS struct only had a single field, it's pretty inexpensive. This patch renames the combined struct to "tess" to indicate that it's for tessellation in general, not one of the two stages. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Introduce a compiler enum for tessellation spacing.Kenneth Graunke2017-01-071-1/+1
| | | | | | | | | | It feels weird using GL_* enums in a Vulkan driver. v2: Fix the TESS_SPACING -> PIPE_TESS_SPACING conversion. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: Change shader_info->tes.vertex_order into a ccw boolean.Kenneth Graunke2017-01-071-1/+2
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/compiler: add local_size_variable to shader_infoTimothy Arceri2016-12-301-0/+2
| | | | | | | | 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 <[email protected]>
* mesa/compiler: add stage to shader_infoTimothy Arceri2016-12-301-0/+3
| | | | | | | | | | | | 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 <[email protected]>
* mesa: add support for GL_INTEL_conservative_rasterizationLionel Landwerlin2016-12-071-0/+6
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* mesa: Add GL and GLSL plumbing for ARB_post_depth_coverage for i965 (gen9+).Plamena Manolova2016-12-071-0/+1
| | | | | | | | | 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 <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* compiler: Store the clip/cull distance array sizes in shader_info.Kenneth Graunke2016-11-191-2/+5
| | | | | | | We switched from a boolean to array lengths in gl_program a while back. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: remove now unused copy_shader_info() declarationTimothy Arceri2016-11-171-7/+0
| | | | | | Left over from 4ac66861 Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: include shader_enums.h in shader_info.hTimothy Arceri2016-11-171-0/+2
| | | | | | We make use of some enums here. Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: add additional cs metadata fields to shader infoTimothy Arceri2016-10-261-0/+5
| | | | | | And copy values from GLSL. Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: add input primative field for gs in shader infoTimothy Arceri2016-10-261-0/+3
| | | | | | And copy the value from GLSL. Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: add fields for tes metadata to shader infoTimothy Arceri2016-10-261-0/+7
| | | | | | And copy the values from gl_tess_eval_program struct. Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: add temporary copy_shader_info() functionTimothy Arceri2016-10-261-0/+7
| | | | | | | | | | | | | 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 <[email protected]>
* nir: move nir_shader_info to a common compiler headerTimothy Arceri2016-10-261-0/+131
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 <[email protected]>