summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-10-12 13:23:29 +1000
committerDave Airlie <[email protected]>2015-12-19 17:57:43 +1000
commit97eee905471d7426d23c8a4c48b9810c586f9dff (patch)
treef50104b4de2d81d253326cff299bce440d2d4494 /src
parent14193e4643370db92210710f2ef152c693d6c4ff (diff)
glsl: count attributes for vertex inputs properly.
This function deals with vertex inputs and fragment outputs, so we should count the attribute locations correctly for the vertex inputs. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/linker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index ff22b3df713..c7e69765335 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2466,7 +2466,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
return false;
}
- const unsigned slots = var->type->count_attribute_slots(false);
+ const unsigned slots = var->type->count_attribute_slots(target_index == MESA_SHADER_VERTEX ? true : false);
/* If the variable is not a built-in and has a location statically
* assigned in the shader (presumably via a layout qualifier), make sure