OSDN Git Service

glsl2: Don't try to assign locations for samplers during linking.
authorEric Anholt <eric@anholt.net>
Wed, 4 Aug 2010 21:26:15 +0000 (14:26 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 4 Aug 2010 21:28:57 +0000 (14:28 -0700)
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

index 65f3697..10fd2d5 100644 (file)
@@ -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);