Mesa (main): zink: use IMMUTABLE for dummy xfb buffer

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 17 23:18:06 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed Nov 17 16:46:49 2021 -0500

zink: use IMMUTABLE for dummy xfb buffer

this is never getting read back or anything so don't waste BAR allocation

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13849>

---

 src/gallium/drivers/zink/zink_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index defca8d80e0..29c56dc8356 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -4182,7 +4182,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
    if (!ctx->dummy_vertex_buffer)
       goto fail;
    ctx->dummy_xfb_buffer = pipe_buffer_create(&screen->base,
-      PIPE_BIND_STREAM_OUTPUT, PIPE_USAGE_DEFAULT, sizeof(data));
+      PIPE_BIND_STREAM_OUTPUT, PIPE_USAGE_IMMUTABLE, sizeof(data));
    if (!ctx->dummy_xfb_buffer)
       goto fail;
    for (unsigned i = 0; i < ARRAY_SIZE(ctx->dummy_surface); i++) {



More information about the mesa-commit mailing list