zink: use IMMUTABLE for dummy xfb buffer
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 17 Nov 2021 21:46:49 +0000 (16:46 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 17 Nov 2021 22:59:43 +0000 (22:59 +0000)
this is never getting read back or anything so don't waste BAR allocation

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

src/gallium/drivers/zink/zink_context.c

index defca8d..29c56dc 100644 (file)
@@ -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++) {