summaryrefslogtreecommitdiffstats
path: root/src/compiler/shader_enums.h
Commit message (Collapse)AuthorAgeFilesLines
* nir: Move vc4's alpha test lowering to core NIR.Eric Anholt2017-10-101-0/+17
| | | | | | | | | | | | | I've been doing this inside of vc4, but vc5 wants it as well and it may be useful for other drivers (Intel has a related path for pre-gen6 with MRT, and freedreno had a TGSI path for it at one point). This required defining a common enum for the standard comparison functions, but other lowering passes are likely to also want that enum. v2: Add to meson.build as well. Acked-by: Rob Clark <[email protected]>
* compiler: move glsl_interface_packing enum to shader_enums.hTimothy Arceri2017-07-261-0/+7
| | | | | | This allows us to drop the duplicate gl_uniform_block_packing enum. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: Fix gl_shader_stage enum unsigned comparisonRob Herring2017-06-081-0/+1
| | | | | | | | | | | Replace -1 with MESA_SHADER_NONE enum value to fix sign related warning: external/mesa3d/src/compiler/glsl/link_varyings.cpp:1415:25: warning: comparison of constant -1 with expression of type 'gl_shader_stage' is always true [-Wtautological-constant-out-of-range-compare] (consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT))) { ~~~~~~~~~~~~~~ ^ ~~ Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* compiler: Add a system value and varying for ViewIndexJason Ekstrand2017-05-031-0/+4
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* glsl: add gl_SubGroup*ARB builtinsNicolai Hähnle2017-04-051-0/+59
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: Introduce a compiler enum for tessellation spacing.Kenneth Graunke2017-01-071-0/+8
| | | | | | | | | | 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]>
* mesa/compiler: move MAX_VARYING to shader_enums.hKenneth Graunke2016-11-111-0/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* compiler: update the comment for enum glsl_interp_modeTimothy Arceri2016-10-261-1/+1
| | | | | | We no longer store the interp mode with the program metadata. Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: add gl_LocalGroupSizeARB as a system valueSamuel Pitoiset2016-10-071-0/+1
| | | | | | | | v2: - only add it if the ext is enabled (Ilia) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add gl_BoundingBox and associated varying slotsIlia Mirkin2016-08-301-0/+4
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: process blend_support_* qualifiersIlia Mirkin2016-08-251-0/+26
| | | | | | | | | | v2 (Ken): Add a BLEND_NONE enum value (no qualifiers in use). v3 (Ken): Rename gl_blend_support_qualifier to gl_advanced_blend_mode. v4 (Ken): Mark map[] as static const (Ilia). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.Kenneth Graunke2016-07-171-8/+8
| | | | | | | | | | | | | | | | | Likewise, rename the enum type to glsl_interp_mode. Beyond the GLSL front-end, talking about "interpolation modes" seems more natural than "interpolation qualifiers" - in the IR, we're removed from how exactly the source language specifies how to interpolate an input. Also, SPIR-V calls these "decorations" rather than "qualifiers". Generated by: $ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \ -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \ -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \; Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Dave Airlie <[email protected]>
* glsl: fix location and component packing validation on patchesTimothy Arceri2016-05-171-0/+1
| | | | | | | These varyings have a separate location domain from per-vertex varyings and need to be handled separately. Reviewed-by: Dave Airlie <[email protected]>
* glsl: Add arb_cull_distance support (v3)Tobias Klausmann2016-05-141-0/+4
| | | | | | | | | v2: make too large array a compile error v3: squash mesa/prog patch to avoid static compiler errors in bisect Signed-off-by: Tobias Klausmann <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glsl/shader_enums: Add the other two compute builtinsJason Ekstrand2016-04-111-0/+2
| | | | | | | | These weren't added before because they are actually calculated values that are computed from other inputs. However, in order to handle them in nir_lower_system_values, it's nice for them to have a cannonical locaiton. Reviewed-by: Rob Clark <[email protected]>
* glsl/shader_enums: Add an enum for Vulkan InstanceIndexJason Ekstrand2016-04-111-0/+7
| | | | | | | In Vulkan, you have InstanceIndex which begins at the base instance value rather than the zero-based InstanceID of GL. Reviewed-by: Rob Clark <[email protected]>
* compiler: random comment fixupRob Clark2016-04-011-1/+1
| | | | | | | | Just noticed this in passing.. gl_shader_stage already has tess so this comment no longer applies. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: keep track of ssbo variable being accessed, add access paramsIlia Mirkin2016-01-291-0/+10
| | | | | | | | | | | | | | | | | | | | Currently any access params (coherent/volatile/restrict) are being lost when lowering to the ssbo load/store intrinsics. Keep track of the variable being used, and bake its access params in as the last arg of the load/store intrinsics. If the variable is accessed via an instance block, then 'variable' points to the instance block variable and not the field inside the instance block that we are accessing. In order to check access parameters for the field itself we need to detect this case and keep track of the corresponding field struct so we can extract the specific field access information from there instead. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v1) v1 -> v2: add tracking of struct field v2 -> v3: minor adjustments based on Iago's feedback Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: move shader_enums.[ch] to compilerEmil Velikov2016-01-261-0/+542
This way one can reuse it in glsl, nir or other infrastructure without pulling nir as dependency. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>