diff options
author | Kenneth Graunke <[email protected]> | 2016-06-23 23:12:45 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-08-07 23:53:28 -0700 |
commit | 1556f16e46ba3037c3901808c2e1ac5df8e2b20e (patch) | |
tree | e56a9badbcaab97213db6783abec19598cc8163d /src/compiler | |
parent | 4a49851da140fedf0e133034a202570725ad03a9 (diff) |
glsl: Fix the program resource names of gl_TessLevelOuter/Inner[].
These are lowered to gl_TessLevel{Outer,Inner}MESA. We need them to
appear in the program resource list with their original names and types.
Cc: [email protected]
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 6d45a025da3..2271676181e 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -3702,6 +3702,18 @@ create_shader_variable(struct gl_shader_program *shProg, if (in->data.mode == ir_var_system_value && in->data.location == SYSTEM_VALUE_VERTEX_ID_ZERO_BASE) { out->name = ralloc_strdup(shProg, "gl_VertexID"); + } else if ((in->data.mode == ir_var_shader_out && + in->data.location == VARYING_SLOT_TESS_LEVEL_OUTER) || + (in->data.mode == ir_var_system_value && + in->data.location == SYSTEM_VALUE_TESS_LEVEL_OUTER)) { + out->name = ralloc_strdup(shProg, "gl_TessLevelOuter"); + type = glsl_type::get_array_instance(glsl_type::float_type, 4); + } else if ((in->data.mode == ir_var_shader_out && + in->data.location == VARYING_SLOT_TESS_LEVEL_INNER) || + (in->data.mode == ir_var_system_value && + in->data.location == SYSTEM_VALUE_TESS_LEVEL_INNER)) { + out->name = ralloc_strdup(shProg, "gl_TessLevelInner"); + type = glsl_type::get_array_instance(glsl_type::float_type, 2); } else { out->name = ralloc_strdup(shProg, name); } |