summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast.h
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2018-01-16 19:42:35 +0100
committerJuan A. Suarez Romero <[email protected]>2018-01-16 19:42:35 +0100
commit9b894c88a688904860d0f37221b78fbcb168f216 (patch)
treec6a58c665fcc40f53f1c0c9210ce10c071f7bafa /src/compiler/glsl/ast.h
parent47ac11bcf8bd9e4525e0fb4308d0bca87a8900c6 (diff)
glsl/linker: link-error using the same name in unnamed block and outside
According with OpenGL GLSL 4.20 spec, section 4.3.9, page 57: "It is a link-time error if any particular shader interface contains: - two different blocks, each having no instance name, and each having a member of the same name, or - a variable outside a block, and a block with no instance name, where the variable has the same name as a member in the block." This means that it is a link error if for example we have a vertex shader with the following definition. "layout(location=0) uniform Data { float a; float b; };" and a fragment shader with: "uniform float a;" As in both cases we refer to both uniforms as "a", and thus using glGetUniformLocation() wouldn't know which one we mean. This fixes KHR-GL*.shaders.uniform_block.common.name_matching. v2: add fixed tests (Tapani) Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast.h')
0 files changed, 0 insertions, 0 deletions