[Mesa-dev] [PATCH 12/25] i965/fs: Skip SIMD lowering source unzipping for regular scalar regions.

Francisco Jerez currojerez at riseup.net
Sat May 28 02:05:53 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ca6368e..8eff27e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -5029,6 +5029,13 @@ emit_unzip(const fs_builder &lbld, bblock_t *block, fs_inst *inst,
        */
       return inst->src[i];
 
+   } else if (inst->components_read(i) == 1 &&
+              lbld.dispatch_width() <= inst->exec_size) {
+      /* The source is a single component, we can just point the lowered
+       * instruction at the right channel group from the original region.
+       */
+      return src;
+
    } else {
       /* Builder of the right width to perform the copy avoiding uninitialized
        * data if the lowered execution size is greater than the original
-- 
2.7.3



More information about the mesa-dev mailing list