diff options
author | Chris Forbes <chrisf@ijw.co.nz> | 2014-05-16 21:10:18 +1200 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2014-07-26 16:46:03 +1200 |
commit | 8eae5ceb99b71854db566e18222f400641c23f39 (patch) | |
tree | 2835700938744ea01ab4f939b9e85eaefc105585 /src/glsl | |
parent | 4714c4ec48fcb17b8484cd1c44918fcedc3ce28e (diff) | |
download | external_mesa3d-8eae5ceb99b71854db566e18222f400641c23f39.zip external_mesa3d-8eae5ceb99b71854db566e18222f400641c23f39.tar.gz external_mesa3d-8eae5ceb99b71854db566e18222f400641c23f39.tar.bz2 |
glsl: Allow non-constant UBO array indexing with GLSL4/ARB_gpu_shader5.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ast_array_index.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp index f3b060e..50f9987 100644 --- a/src/glsl/ast_array_index.cpp +++ b/src/glsl/ast_array_index.cpp @@ -181,7 +181,8 @@ _mesa_ast_array_index_to_hir(void *mem_ctx, if (array->type->is_unsized_array()) { _mesa_glsl_error(&loc, state, "unsized array index must be constant"); } else if (array->type->fields.array->is_interface() - && array->variable_referenced()->data.mode == ir_var_uniform) { + && array->variable_referenced()->data.mode == ir_var_uniform + && !state->is_version(400, 0) && !state->ARB_gpu_shader5_enable) { /* Page 46 in section 4.3.7 of the OpenGL ES 3.00 spec says: * * "All indexes used to index a uniform block array must be |