Reviewed-by: Edward O'Callaghan <funfunc...@folklore1984.net> On 02/06/2017 05:53 AM, Andres Gomez wrote: > The binding point is a valid layout qualifier for Uniform Blocks, > Shader Storage Blocks and Opaque-Uniforms. > > From page 60 (page 66 of the PDF) of the GLSL 4.20 spec, v11: > > " A link error will result if two compilation units in a program > specify different integer-constant bindings for the same > opaque-uniform name. However, it is not an error to specify a > binding on some but not all declarations for the same name, as > shown in the examples below." > > As we see, this restriction applies to Opaque-Uniforms only, not to > Uniform Blocks nor Shader Storage Blocks. > > Fixes GL45-CTS.enhanced_layouts.ssb_layout_qualifier_conflict > > Signed-off-by: Andres Gomez <ago...@igalia.com> > --- > src/compiler/glsl/linker.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp > index b768a6e5285..ae13a45d22b 100644 > --- a/src/compiler/glsl/linker.cpp > +++ b/src/compiler/glsl/linker.cpp > @@ -962,7 +962,7 @@ cross_validate_globals(struct gl_shader_program *prog, > * opaque-uniform name. However, it is not an error to specify a > * binding on some but not all declarations for the same name" > */ > - if (var->data.explicit_binding) { > + if (var->type->contains_opaque() && var->data.explicit_binding) { > if (existing->data.explicit_binding && > var->data.binding != existing->data.binding) { > linker_error(prog, "explicit bindings for %s " >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev