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>
This commit is contained in:
Mike Blumenkrantz 2022-04-26 11:09:06 -04:00 committed by Marge Bot
parent ae369e9f6d
commit 8b28d1751c
1 changed files with 3 additions and 1 deletions

View File

@ -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);