[Mesa-dev] [PATCH 07/10] i965: Don't copy prop source mods into instructions that can't take them.
Matt Turner
mattst88 at gmail.com
Mon Oct 7 10:26:16 PDT 2013
v2: Don't create new function in backend_instruction.
Cc: Paul Berry <stereotype441 at gmail.com>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 15 ++++++++++++++-
src/mesa/drivers/dri/i965/brw_vec4.cpp | 15 ++++++++++++++-
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 6dc37ea..3316f8e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -366,7 +366,20 @@ fs_visitor::can_do_source_mods(fs_inst *inst)
if (inst->is_send_from_grf())
return false;
- return true;
+ switch (inst->opcode) {
+ case BRW_OPCODE_ADDC:
+ case BRW_OPCODE_BFE:
+ case BRW_OPCODE_BFI1:
+ case BRW_OPCODE_BFI2:
+ case BRW_OPCODE_BFREV:
+ case BRW_OPCODE_CBIT:
+ case BRW_OPCODE_FBH:
+ case BRW_OPCODE_FBL:
+ case BRW_OPCODE_SUBB:
+ return false;
+ default:
+ return true;
+ }
}
void
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 6a3285a..bbdaa7d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -222,7 +222,20 @@ vec4_visitor::can_do_source_mods(vec4_instruction *inst)
if (inst->is_send_from_grf())
return false;
- return true;
+ switch (inst->opcode) {
+ case BRW_OPCODE_ADDC:
+ case BRW_OPCODE_BFE:
+ case BRW_OPCODE_BFI1:
+ case BRW_OPCODE_BFI2:
+ case BRW_OPCODE_BFREV:
+ case BRW_OPCODE_CBIT:
+ case BRW_OPCODE_FBH:
+ case BRW_OPCODE_FBL:
+ case BRW_OPCODE_SUBB:
+ return false;
+ default:
+ return true;
+ }
}
/**
--
1.8.1.5
More information about the mesa-dev
mailing list