mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 06:10:36 +01:00
glsl: make sure UBO arrays are sized in ES
This check was removed in 5b2675093e add it back in.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
https://bugs.freedesktop.org/show_bug.cgi?id=96349
This commit is contained in:
parent
4825264f75
commit
b010fa8567
1 changed files with 14 additions and 0 deletions
|
|
@ -7613,6 +7613,20 @@ ast_interface_block::hir(exec_list *instructions,
|
|||
if (is_unsized_array_last_element(var)) {
|
||||
var->data.from_ssbo_unsized_array = true;
|
||||
}
|
||||
} else {
|
||||
/* From GLSL ES 3.10 spec, section 4.1.9 "Arrays":
|
||||
*
|
||||
* "If an array is declared as the last member of a shader storage
|
||||
* block and the size is not specified at compile-time, it is
|
||||
* sized at run-time. In all other cases, arrays are sized only
|
||||
* at compile-time."
|
||||
*/
|
||||
if (state->es_shader) {
|
||||
_mesa_glsl_error(&loc, state, "unsized array `%s' "
|
||||
"definition: only last member of a shader "
|
||||
"storage block can be defined as unsized "
|
||||
"array", fields[i].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue