[Mesa-dev] [PATCH] glsl: fix linker error message context for frag shader output.
Dave Airlie
airlied at gmail.com
Tue Nov 22 11:57:46 PST 2011
From: Dave Airlie <airlied at redhat.com>
A later error prints this properly, fix this case to do the same.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/glsl/linker.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 3527088..b2068b2 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1281,9 +1281,11 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
* attribute overlaps any previously allocated bits.
*/
if ((~(use_mask << attr) & used_locations) != used_locations) {
+ const char *const string = (target_index == MESA_SHADER_VERTEX)
+ ? "vertex shader input" : "fragment shader output";
linker_error(prog,
"insufficient contiguous attribute locations "
- "available for vertex shader input `%s'",
+ "available for %s `%s'", string,
var->name);
return false;
}
--
1.7.7.1
More information about the mesa-dev
mailing list