[Mesa-dev] [PATCH 03/31] i965/fs: No need to unzip SIMD-periodic sources during SIMD lowering.

Francisco Jerez currojerez at riseup.net
Sat May 21 05:47:38 UTC 2016


If the source value is going to the same for all SIMD-lowered chunks
of the instruction there should be no need to unzip the value into
multiple temporary registers one for each lowered chunk.  As a side
effect this fixes SIMD lowering of instructions with a vector
immediate source.  In the long term it *might* still be worth fixing
offset() to handle vector immediates correctly though, this should be
good enough for the moment.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 65b64b6..e98c41d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4775,7 +4775,7 @@ fs_visitor::lower_simd_width()
 
             for (unsigned j = 0; j < inst->sources; j++) {
                if (inst->src[j].file != BAD_FILE &&
-                   !is_uniform(inst->src[j])) {
+                   !is_periodic(inst->src[j], lower_width)) {
                   /* Get the i-th copy_width-wide chunk of the source. */
                   const fs_builder cbld = lbld.group(copy_width, 0);
                   const fs_reg src = offset(inst->src[j], cbld, i);
-- 
2.7.3



More information about the mesa-dev mailing list