Mesa (staging/21.3): radeonsi: fix depth stencil multi sample texture blit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 21 20:51:20 UTC 2022


Module: Mesa
Branch: staging/21.3
Commit: f2ede2ae62c27f71b8f5a297da9bfcf67f47ced2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2ede2ae62c27f71b8f5a297da9bfcf67f47ced2

Author: Qiang Yu <yuq825 at gmail.com>
Date:   Fri Feb 11 15:01:25 2022 +0800

radeonsi: fix depth stencil multi sample texture blit

This causes the flushed_depth_texture is allocated without
multi sample. So the blit will cause VM fault.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Qiang Yu <yuq825 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14990>
(cherry picked from commit 80974a5f1e4095b7ae9b4e705da5b33f283e35c2)

---

 .pick_status.json                         | 2 +-
 src/gallium/drivers/radeonsi/si_texture.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 786d88ff367..801465dba57 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -373,7 +373,7 @@
         "description": "radeonsi: fix depth stencil multi sample texture blit",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index a2c5954f1cf..148fd51718b 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -1653,6 +1653,7 @@ bool si_init_flushed_depth_texture(struct pipe_context *ctx, struct pipe_resourc
    resource.array_size = texture->array_size;
    resource.last_level = texture->last_level;
    resource.nr_samples = texture->nr_samples;
+   resource.nr_storage_samples = texture->nr_storage_samples;
    resource.usage = PIPE_USAGE_DEFAULT;
    resource.bind = texture->bind & ~PIPE_BIND_DEPTH_STENCIL;
    resource.flags = texture->flags | SI_RESOURCE_FLAG_FLUSHED_DEPTH;



More information about the mesa-commit mailing list