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

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Oct 26 11:54:40 2023 -0400

aux/u_transfer_helper: set rendertarget bind for msaa staging resource

this matches other resources created with staging blit-like mechanics

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25914>

---

 src/gallium/auxiliary/util/u_transfer_helper.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c 
b/src/gallium/auxiliary/util/u_transfer_helper.c
index ec38b8d6706..9d5b7c4b1df 100644
--- a/src/gallium/auxiliary/util/u_transfer_helper.c
+++ b/src/gallium/auxiliary/util/u_transfer_helper.c
@@ -208,6 +208,10 @@ transfer_map_msaa(struct pipe_context *pctx,
          .depth0 = 1,
          .array_size = 1,
    };
+   if (util_format_is_depth_or_stencil(tmpl.format))
+      tmpl.bind |= PIPE_BIND_DEPTH_STENCIL;
+   else
+      tmpl.bind |= PIPE_BIND_RENDER_TARGET;
    trans->ss = pscreen->resource_create(pscreen, &tmpl);
    if (!trans->ss) {
       free(trans);

Reply via email to