mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
glsl: don't run intrastage array validation when the interface type is not an array
We validate that the interface block array type's definition matches. However, previously, the function could be called if an non-array interface block has different type definitions -for example, when the precision qualifier differs in a GLSL ES shader, we would create two different types-, and it would return invalid as both definitions are non-arrays. We fix this by specifying that at least one definition should be an array to call the validation. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
fc6d55952d
commit
fa8c1b92b7
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ intrastage_match(ir_variable *a,
|
|||
/* If a block is an array then it must match across the shader.
|
||||
* Unsized arrays are also processed and matched agaist sized arrays.
|
||||
*/
|
||||
if (b->type != a->type &&
|
||||
if (b->type != a->type && (b->type->is_array() || a->type->is_array()) &&
|
||||
(b->is_interface_instance() || a->is_interface_instance()) &&
|
||||
!validate_intrastage_arrays(prog, b, a))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue