diff options
author | Iago Toral Quiroga <[email protected]> | 2018-01-08 09:45:15 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2018-01-10 08:21:02 +0100 |
commit | 7e5c81235ff774ab463596222eac0e8141a90d1a (patch) | |
tree | 47f9e173c855bf723bcaf5cc9532e86970748834 /src/compiler/glsl/builtin_variables.cpp | |
parent | dae856eced1d4de966b0e1cfc5f2ed201240571c (diff) |
glsl: remove Lower{TCS,TES}PatchVerticesIn
Intel was the only user and now NIR can do the lowering.
v2: do not try to handle it as a system value directly for the SPIR-V
path. In GL we rather handle it as a uniform like we do for the
GLSL path (Jason).
v3: drop LowerTESPatchVerticesIn as well (Jason)
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index a885f32875c..a686cb6a457 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -38,11 +38,6 @@ static const struct gl_builtin_uniform_element gl_NumSamples_elements[] = { {NULL, {STATE_NUM_SAMPLES, 0, 0}, SWIZZLE_XXXX} }; -/* only for TCS */ -static const struct gl_builtin_uniform_element gl_PatchVerticesIn_elements[] = { - {NULL, {STATE_INTERNAL, STATE_TCS_PATCH_VERTICES_IN}, SWIZZLE_XXXX} -}; - static const struct gl_builtin_uniform_element gl_DepthRange_elements[] = { {"near", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_XXXX}, {"far", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_YYYY}, @@ -240,7 +235,6 @@ static const struct gl_builtin_uniform_element gl_NormalMatrix_elements[] = { #define STATEVAR(name) {#name, name ## _elements, ARRAY_SIZE(name ## _elements)} static const struct gl_builtin_uniform_desc _mesa_builtin_uniform_desc[] = { - STATEVAR(gl_PatchVerticesIn), STATEVAR(gl_NumSamples), STATEVAR(gl_DepthRange), STATEVAR(gl_ClipPlane), @@ -1067,12 +1061,7 @@ builtin_variable_generator::generate_tcs_special_vars() { add_system_value(SYSTEM_VALUE_PRIMITIVE_ID, int_t, "gl_PrimitiveID"); add_system_value(SYSTEM_VALUE_INVOCATION_ID, int_t, "gl_InvocationID"); - - if (state->ctx->Const.LowerTCSPatchVerticesIn) { - add_uniform(int_t, "gl_PatchVerticesIn"); - } else { - add_system_value(SYSTEM_VALUE_VERTICES_IN, int_t, "gl_PatchVerticesIn"); - } + add_system_value(SYSTEM_VALUE_VERTICES_IN, int_t, "gl_PatchVerticesIn"); add_output(VARYING_SLOT_TESS_LEVEL_OUTER, array(float_t, 4), "gl_TessLevelOuter")->data.patch = 1; |