glsl: Allow explicit binding on atomics again
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 12 Apr 2014 07:44:46 +0000 (19:44 +1200)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Apr 2014 17:35:05 +0000 (10:35 -0700)
As of 943b2d52bf5, layout(binding) on an atomic would fail the assertion
here.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/link_uniform_initializers.cpp

index e60bb64bcdce705c8aec80291eee30d7e3ac648a..2100e0517160e6a7c45df506113c78e39f4e5bf3 100644 (file)
@@ -296,8 +296,10 @@ link_set_uniform_initializers(struct gl_shader_program *prog)
                   linker::set_block_binding(prog, iface_type->name,
                                             var->data.binding);
                }
+            } else if (type->contains_atomic()) {
+               /* we don't actually need to do anything. */
             } else {
-               assert(!"Explicit binding not on a sampler or UBO.");
+               assert(!"Explicit binding not on a sampler, UBO or atomic.");
             }
          } else if (var->constant_value) {
             linker::set_uniform_initializer(mem_ctx, prog, var->name,