[Mesa-dev] [PATCH 2/5] glsl/linker: Properly report gl_PerVertex shader inputs
Ian Romanick
idr at freedesktop.org
Tue May 31 18:52:54 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
Issue #16 of the GL_ARB_program_interface_query makes it pretty clear
array shader inputs of gl_PerVertex blocks should be reported as
gl_PerVertex.gl_Foo. Piglit tests were recently changed to expect
this behavior, and this change makes those tests pass again.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
---
src/compiler/glsl/linker.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index e712ee3..010dbd7 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3769,9 +3769,9 @@ add_shader_variable(struct gl_shader_program *shProg, unsigned stage_mask,
* the name of the interface block (not the instance name) and
* "Member" is the name of the variable."
*/
- const char *prefixed_name = (var->data.from_named_ifc_block &&
- !is_gl_identifier(var->name))
- ? ralloc_asprintf(shProg, "%s.%s", var->get_interface_type()->name,
+ const char *prefixed_name = var->data.from_named_ifc_block
+ ? ralloc_asprintf(shProg, "%s.%s",
+ var->get_interface_type()->without_array()->name,
name)
: name;
--
2.5.5
More information about the mesa-dev
mailing list