summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-07-06 19:35:16 -0400
committerIlia Mirkin <[email protected]>2016-08-12 20:21:08 -0400
commit1baae00089c7bf5f31424c1287aa24f8ce5981a3 (patch)
treeafb8142df612bce0cd69e7bf4c159c38edda36ca /src/compiler/glsl/ast_function.cpp
parent0294dd00ccdab2c20d5df786ba780d7e091c2ab4 (diff)
glsl: look for frag data bindings with [0] tacked onto the end for arrays
The GL spec is very unclear on this point. Apparently this is discussed without resolution in the closed Khronos bugtracker at https://cvs.khronos.org/bugzilla/show_bug.cgi?id=7829 . The recommendation is to allow dropping the [0] for looking up the bindings. The approach taken in this patch is to instead tack on [0]'s for each arrayness level of the output's type, and doing the lookup again. That way, for out vec4 foo[2][2][2] we will end up looking for bindings for foo, foo[0], foo[0][0], and foo[0][0][0], in that order of preference. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96765 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
0 files changed, 0 insertions, 0 deletions