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 new memory_barrier_tcs_patch intrinsic
[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 879a77a884b046e8b307d97996a46a9f745cfb9c..eb8b9ee65834ccc2d2ea1db86ae9482d6fd418ac 100644
(file)
--- a/
src/compiler/nir/nir_opt_gcm.c
+++ b/
src/compiler/nir/nir_opt_gcm.c
@@
-128,19
+128,13
@@
gcm_pin_instructions_block(nir_block *block, struct gcm_state *state)
}
break;
}
break;
+ case nir_instr_type_deref:
+ instr->pass_flags = 0;
+ break;
+
case nir_instr_type_tex:
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:
@@
-148,11
+142,7
@@
gcm_pin_instructions_block(nir_block *block, struct gcm_state *state)
break;
case nir_instr_type_intrinsic: {
break;
case nir_instr_type_intrinsic: {
- const nir_intrinsic_info *info =
- &nir_intrinsic_infos[nir_instr_as_intrinsic(instr)->intrinsic];
-
- if ((info->flags & NIR_INTRINSIC_CAN_ELIMINATE) &&
- (info->flags & NIR_INTRINSIC_CAN_REORDER)) {
+ if (nir_intrinsic_can_reorder(nir_instr_as_intrinsic(instr))) {
instr->pass_flags = 0;
} else {
instr->pass_flags = GCM_INSTR_PINNED;
instr->pass_flags = 0;
} else {
instr->pass_flags = GCM_INSTR_PINNED;