diff options
author | Jason Ekstrand <[email protected]> | 2018-11-28 17:27:00 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-08 00:38:30 +0000 |
commit | 78d80f7db2fab78b1af96d5acf216d71448d7972 (patch) | |
tree | 8883ba99ef756050db5dc4f31778622953f17c37 /src | |
parent | d8e3edb784d3afb313420fc8d58b491a57fad9c1 (diff) |
nir/deref: Skip over casts in fixup_deref_modes
This pass is used when, for instance, we lazily change the mode of
variables rather than replacing the variable with a new one. Since we
only do this in cases where we know we have full deref chains, it's ok
to just skip them in fixup_deref_modes.
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_deref.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index edd602a8f4a..a2d46208dd2 100644 --- a/src/compiler/nir/nir_deref.c +++ b/src/compiler/nir/nir_deref.c @@ -272,6 +272,8 @@ nir_fixup_deref_modes(nir_shader *shader) continue; nir_deref_instr *deref = nir_instr_as_deref(instr); + if (deref->deref_type == nir_deref_type_cast) + continue; nir_variable_mode parent_mode; if (deref->deref_type == nir_deref_type_var) { |