Mesa (master): i965: Set execution size to 8 for instructions with force_sechalf set.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Jul 16 05:48:16 UTC 2014


Module: Mesa
Branch: master
Commit: 2eaf3f670fea4ce4466340141244e41a45542c13
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2eaf3f670fea4ce4466340141244e41a45542c13

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Jul 10 17:49:36 2014 -0700

i965: Set execution size to 8 for instructions with force_sechalf set.

Both inst->force_uncompressed and inst->force_sechalf mean that the
generated instruction should be uncompressed and have an execution size
of 8.  We don't require the visitor to set both flags - setting
inst->force_sechalf by itself is supposed to be enough.

On Gen4-7, guess_execution_size() demoted instructions to 8-wide based
on the default compression state.  On Gen8+, we instead set a default
execution size, which worked great...except that we forgot to check
inst->force_sechalf when deciding whether to use 8 or 16.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
Cc: mesa-stable at lists.freedesktop.org

---

 src/mesa/drivers/dri/i965/gen8_fs_generator.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index 02e28cf..2924820 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -921,7 +921,7 @@ gen8_fs_generator::generate_code(exec_list *instructions)
       default_state.mask_control = ir->force_writemask_all;
       default_state.flag_subreg_nr = ir->flag_subreg;
 
-      if (dispatch_width == 16 && !ir->force_uncompressed)
+      if (dispatch_width == 16 && !ir->force_uncompressed && !ir->force_sechalf)
          default_state.exec_size = BRW_EXECUTE_16;
       else
          default_state.exec_size = BRW_EXECUTE_8;




More information about the mesa-commit mailing list