mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
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>
This commit is contained in:
parent
4714c4ec48
commit
8eae5ceb99
1 changed files with 2 additions and 1 deletions
|
|
@ -181,7 +181,8 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
|
||||||
if (array->type->is_unsized_array()) {
|
if (array->type->is_unsized_array()) {
|
||||||
_mesa_glsl_error(&loc, state, "unsized array index must be constant");
|
_mesa_glsl_error(&loc, state, "unsized array index must be constant");
|
||||||
} else if (array->type->fields.array->is_interface()
|
} 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:
|
/* 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
|
* "All indexes used to index a uniform block array must be
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue