summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-04-26 11:09:06 -0400
committerMarge Bot <emma+marge@anholt.net>2022-05-10 06:18:26 +0000
commit8b28d1751c76b0ba72dae1f6b916cb7f2bbc1c0c (patch)
tree8310015ee23e53903ec02119f7962f5ad950d589
parentae369e9f6d4f2c826f1f2a748c32a14f9d5f1f54 (diff)
zink: add more image usage for null surfaces
without null descriptor features, these can be used for all sorts of things cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16167>
-rw-r--r--src/gallium/drivers/zink/zink_surface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c
index c7491dcc622..b4fab44338a 100644
--- a/src/gallium/drivers/zink/zink_surface.c
+++ b/src/gallium/drivers/zink/zink_surface.c
@@ -396,7 +396,9 @@ zink_surface_create_null(struct zink_context *ctx, enum pipe_texture_target targ
templ.depth0 = 1;
templ.format = PIPE_FORMAT_R8G8B8A8_UNORM;
templ.target = target;
- templ.bind = PIPE_BIND_RENDER_TARGET;
+ templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
+ if (samples < 2)
+ templ.bind |= PIPE_BIND_SHADER_IMAGE;
templ.nr_samples = samples;
pres = ctx->base.screen->resource_create(ctx->base.screen, &templ);