diff options
author | Kenneth Graunke <[email protected]> | 2016-03-29 13:32:32 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-04-01 22:05:20 -0700 |
commit | 9fe211bec4533bd5cebeb61b38343ae9c174abb7 (patch) | |
tree | 137e2789ea22ec11ec223f4026d695db7a834618 /src/mesa/main/shader_query.cpp | |
parent | 013f25c3b3aa676cbd580fc070454d74db27a400 (diff) |
glsl: Consolidate gl_VertexIDMESA -> gl_VertexID query hacks.
A program will either have gl_VertexID or gl_VertexIDMESA (the lowered
zero-based version), not both. Just spoof it in the resource list so
the hacks are done in a single place.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r-- | src/mesa/main/shader_query.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index e85e81d897c..caff79f39af 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -164,15 +164,6 @@ _mesa_GetActiveAttrib(GLuint program, GLuint desired_index, const char *var_name = var->name; - /* Since gl_VertexID may be lowered to gl_VertexIDMESA, we need to - * consider gl_VertexIDMESA as gl_VertexID for purposes of checking - * active attributes. - */ - if (var->mode == ir_var_system_value && - var->location == SYSTEM_VALUE_VERTEX_ID_ZERO_BASE) { - var_name = "gl_VertexID"; - } - _mesa_copy_string(name, maxLength, length, var_name); if (size) @@ -421,7 +412,6 @@ _mesa_GetFragDataLocation(GLuint program, const GLchar *name) const char* _mesa_program_resource_name(struct gl_program_resource *res) { - const gl_shader_variable *var; switch (res->Type) { case GL_UNIFORM_BLOCK: case GL_SHADER_STORAGE_BLOCK: @@ -429,13 +419,6 @@ _mesa_program_resource_name(struct gl_program_resource *res) case GL_TRANSFORM_FEEDBACK_VARYING: return RESOURCE_XFV(res)->Name; case GL_PROGRAM_INPUT: - var = RESOURCE_VAR(res); - /* Special case gl_VertexIDMESA -> gl_VertexID. */ - if (var->mode == ir_var_system_value && - var->location == SYSTEM_VALUE_VERTEX_ID_ZERO_BASE) { - return "gl_VertexID"; - } - /* fallthrough */ case GL_PROGRAM_OUTPUT: return RESOURCE_VAR(res)->name; case GL_UNIFORM: |