Mesa (glsl2): glsl2: Don' t try to assign locations for samplers during linking.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Aug 4 21:30:26 UTC 2010
Module: Mesa
Branch: glsl2
Commit: b6ceddc371d026dc30f2cc0f377bc0214e11d768
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6ceddc371d026dc30f2cc0f377bc0214e11d768
Author: Eric Anholt <eric at anholt.net>
Date: Wed Aug 4 14:26:15 2010 -0700
glsl2: Don't try to assign locations for samplers during linking.
Mesa will do the mapping at _mesa_add_sampler() time. Fixes assertion
failures in debug builds, which might have caught real problems with
multiple samplers linked in a row.
---
src/glsl/linker.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 65f3697..10fd2d5 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -793,6 +793,9 @@ assign_uniform_locations(struct gl_shader_program *prog)
if ((var == NULL) || (var->mode != ir_var_uniform))
continue;
+ if (var->type->is_sampler())
+ continue;
+
const unsigned vec4_slots = (var->component_slots() + 3) / 4;
assert(vec4_slots != 0);
More information about the mesa-commit
mailing list