[Mesa-dev] [PATCH 3/3] i965: Support copy propagating of untyped atomic surface indexes.
Kenneth Graunke
kenneth at whitecape.org
Sun Sep 24 22:09:50 UTC 2017
In the vec4 backend, SHADER_OPCODE_UNTYPED_ATOMIC's src[1] is the
surface index. We want to copy propagate so we can use an immediate
message descriptor, rather than an indirect send.
---
src/intel/compiler/brw_vec4_copy_propagation.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/intel/compiler/brw_vec4_copy_propagation.cpp b/src/intel/compiler/brw_vec4_copy_propagation.cpp
index c1ae32a2936..63155ecdfb0 100644
--- a/src/intel/compiler/brw_vec4_copy_propagation.cpp
+++ b/src/intel/compiler/brw_vec4_copy_propagation.cpp
@@ -190,6 +190,13 @@ try_constant_propagate(const struct gen_device_info *devinfo,
inst->src[arg] = value;
return true;
+ case SHADER_OPCODE_UNTYPED_ATOMIC:
+ if (arg == 1) {
+ inst->src[arg] = value;
+ return true;
+ }
+ break;
+
case SHADER_OPCODE_POW:
case SHADER_OPCODE_INT_QUOTIENT:
case SHADER_OPCODE_INT_REMAINDER:
--
2.11.0
More information about the mesa-dev
mailing list