Mesa (main): intel/compiler: Don't hardcode padding source type to 32bit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 23 07:08:04 UTC 2021


Module: Mesa
Branch: main
Commit: be2bfe5fe8f0e336c029b837c4185ce4f7e9a82a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=be2bfe5fe8f0e336c029b837c4185ce4f7e9a82a

Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date:   Wed Sep 15 19:18:34 2021 -0700

intel/compiler: Don't hardcode padding source type to 32bit

We can use LOAD_PAYLOAD infrastructure in order to handle 16bit float
payload. Let's rely on source type for padding sources, if not set
previously then default one would be 32-bit.

This patch will be used later in the series to handle 16-bit float
payloads.

Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11766>

---

 src/intel/compiler/brw_fs.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 51ab3c4b119..097efe1803e 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -4037,11 +4037,9 @@ fs_visitor::lower_load_payload()
       }
 
       for (uint8_t i = inst->header_size; i < inst->sources; i++) {
+         dst.type = inst->src[i].type;
          if (inst->src[i].file != BAD_FILE) {
-            dst.type = inst->src[i].type;
             ibld.MOV(dst, inst->src[i]);
-         } else {
-            dst.type = BRW_REGISTER_TYPE_UD;
          }
          dst = offset(dst, ibld, 1);
       }



More information about the mesa-commit mailing list