nir/validate: Allow array derefs on vectors in more modes
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
013ee5732b
commit
52dd43c7ef
|
@ -448,10 +448,12 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
|
||||||
|
|
||||||
case nir_deref_type_array:
|
case nir_deref_type_array:
|
||||||
case nir_deref_type_array_wildcard:
|
case nir_deref_type_array_wildcard:
|
||||||
if (instr->mode == nir_var_shared) {
|
if (instr->mode == nir_var_ubo ||
|
||||||
/* Shared variables have a bit more relaxed rules because we need
|
instr->mode == nir_var_ssbo ||
|
||||||
* to be able to handle array derefs on vectors. Fortunately,
|
instr->mode == nir_var_shared) {
|
||||||
* nir_lower_io handles these just fine.
|
/* Shared variables and UBO/SSBOs have a bit more relaxed rules
|
||||||
|
* because we need to be able to handle array derefs on vectors.
|
||||||
|
* Fortunately, nir_lower_io handles these just fine.
|
||||||
*/
|
*/
|
||||||
validate_assert(state, glsl_type_is_array(parent->type) ||
|
validate_assert(state, glsl_type_is_array(parent->type) ||
|
||||||
glsl_type_is_matrix(parent->type) ||
|
glsl_type_is_matrix(parent->type) ||
|
||||||
|
|
Loading…
Reference in New Issue