projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nir: Add a nir_tex_instr_has_implicit_derivatives helper
[mesa.git]
/
src
/
compiler
/
nir
/
nir_opt_gcm.c
diff --git
a/src/compiler/nir/nir_opt_gcm.c
b/src/compiler/nir/nir_opt_gcm.c
index aeae2ad6401074146cbc4c1285706e6cad657425..eb8b9ee65834ccc2d2ea1db86ae9482d6fd418ac 100644
(file)
--- a/
src/compiler/nir/nir_opt_gcm.c
+++ b/
src/compiler/nir/nir_opt_gcm.c
@@
-133,18
+133,8
@@
gcm_pin_instructions_block(nir_block *block, struct gcm_state *state)
break;
case nir_instr_type_tex:
break;
case nir_instr_type_tex:
- switch (nir_instr_as_tex(instr)->op) {
- case nir_texop_tex:
- case nir_texop_txb:
- case nir_texop_lod:
- /* These two take implicit derivatives so they need to be pinned */
+ if (nir_tex_instr_has_implicit_derivative(nir_instr_as_tex(instr)))
instr->pass_flags = GCM_INSTR_PINNED;
instr->pass_flags = GCM_INSTR_PINNED;
- break;
-
- default:
- instr->pass_flags = 0;
- break;
- }
break;
case nir_instr_type_load_const:
break;
case nir_instr_type_load_const: