Module: Mesa
Branch: staging/22.1
Commit: 72e146087c2a1e83f08e15b5e32fd2a48619620f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=72e146087c2a1e83f08e15b5e32fd2a48619620f

Author: sjfricke <[email protected]>
Date:   Wed Aug 10 21:15:27 2022 +0900

isl: fix bug where sb.MOCS is not being set

Currently the sb.MOCS is being reset to zero after struct init.

Signed-off-by: sjfricke <[email protected]>
Fixes: c27fcb1d3ba ("isl: Fill in MOCS for NULL depth, stencil, and HiZ 
buffers.")
Reviewed-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17985>
(cherry picked from commit 861167f41d17e1c8d114cb511a817308491327c1)

---

 .pick_status.json                      | 2 +-
 src/intel/isl/isl_emit_depth_stencil.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f3572d532c4..6419e0e258a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -292,7 +292,7 @@
         "description": "isl: fix bug where sb.MOCS is not being set",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "c27fcb1d3bac4282978529d947f3a143ae4a311f"
     },
diff --git a/src/intel/isl/isl_emit_depth_stencil.c 
b/src/intel/isl/isl_emit_depth_stencil.c
index 7bd6375cde5..72678498504 100644
--- a/src/intel/isl/isl_emit_depth_stencil.c
+++ b/src/intel/isl/isl_emit_depth_stencil.c
@@ -170,7 +170,7 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device 
*dev, void *batch,
 #if GFX_VER >= 6
    struct GENX(3DSTATE_STENCIL_BUFFER) sb = {
       GENX(3DSTATE_STENCIL_BUFFER_header),
-      sb.MOCS = info->mocs,
+      .MOCS = info->mocs,
    };
 #else
 #  define sb db

Reply via email to