diff options
author | Dave Airlie <[email protected]> | 2011-11-20 19:56:35 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-03-26 18:48:46 +0100 |
commit | 7449ae45974c6cfd872c1dc2e73bbccdb11d0f70 (patch) | |
tree | c8b88d6c1aa865135fe4975ae70cc1f7e6431219 /src | |
parent | a83c1d61c2919485b1e8ad33fcf658c85b67ba3a (diff) |
glsl: fix linker error message context for frag shader output.
A later error prints this properly, fix this case to do the same.
v2: remove attribute as per Ian's suggestion
Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/linker.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 8278e43adb8..09ffdff63fb 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1319,9 +1319,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'", + "insufficient contiguous locations " + "available for %s `%s'", string, var->name); return false; } @@ -1370,7 +1372,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog, ? "vertex shader input" : "fragment shader output"; linker_error(prog, - "insufficient contiguous attribute locations " + "insufficient contiguous locations " "available for %s `%s'", string, to_assign[i].var->name); return false; |