mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 07:30:09 +01:00
nir/validate: Don't allow derefs in if conditions
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
e94a027af8
commit
427558a717
1 changed files with 6 additions and 0 deletions
|
|
@ -493,6 +493,12 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
|
|||
* pointers should be.
|
||||
*/
|
||||
validate_dest(&instr->dest, state, 0, 0);
|
||||
|
||||
/* Deref instructions as if conditions don't make sense because if
|
||||
* conditions expect well-formed Booleans. If you want to compare with
|
||||
* NULL, an explicit comparison operation should be used.
|
||||
*/
|
||||
validate_assert(state, list_empty(&instr->dest.ssa.if_uses));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue