Module: Mesa
Branch: staging/22.2
Commit: 7d81b290d4578e3c9fd715d41c5aa577ef922110
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d81b290d4578e3c9fd715d41c5aa577ef922110

Author: Alyssa Rosenzweig <[email protected]>
Date:   Wed Aug 31 16:54:02 2022 -0400

pan/bi: Fix out-of-bounds write in va_lower_split_64bit

...with dual source blending. Fixes shaders/dolphin/smg.1.shader_test

There are more IR sources than Valhall machine sources here.

Fixes: b48933d6411 ("pan/va: Include BLEND for va_swap_12")
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>
(cherry picked from commit b5a6375f546c8a74fb81a70db6819f0281e3292e)

---

 .pick_status.json                                   | 2 +-
 src/panfrost/bifrost/valhall/va_lower_split_64bit.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 751f31185f8..9c437d03814 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -5548,7 +5548,7 @@
         "description": "pan/bi: Fix out-of-bounds write in 
va_lower_split_64bit",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "b48933d6411a379c128b31174474949046a6915c"
     },
diff --git a/src/panfrost/bifrost/valhall/va_lower_split_64bit.c 
b/src/panfrost/bifrost/valhall/va_lower_split_64bit.c
index e193ab32109..849b9111638 100644
--- a/src/panfrost/bifrost/valhall/va_lower_split_64bit.c
+++ b/src/panfrost/bifrost/valhall/va_lower_split_64bit.c
@@ -67,7 +67,7 @@ va_lower_split_64bit(bi_context *ctx)
 {
    bi_foreach_instr_global(ctx, I) {
       bi_foreach_src(I, s) {
-         if (bi_is_null(I->src[s]))
+         if (bi_is_null(I->src[s]) || s >= 4)
             continue;
 
          struct va_src_info info = va_src_info(I->op, s);

Reply via email to