On 11/22/2011 11:57 AM, Dave Airlie wrote:
From: Dave Airlie<[email protected]>
A later error prints this properly, fix this case to do the same.
Signed-off-by: Dave Airlie<[email protected]>
Other than the one additional change suggested below,
Reviewed-by: Ian Romanick <[email protected]>
---
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 "
^^^^^^^^^
I think this word should be deleted too. Fragment shader outputs aren't
called attributes, so saying attribute in that case doesn't make a bit
of sense. I don't think we lose anything by removing it in the vertex
shader input case either.
- "available for vertex shader input `%s'",
+ "available for %s `%s'", string,
var->name);
return false;
}
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev