zink: use VK_WHOLE_SIZE for full-sized bufferviews

this works around most cts coverage which violates spec by creating a view
sized using a range that isn't a multiple of the format's blocksize

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12631>
This commit is contained in:
Mike Blumenkrantz 2021-08-26 12:05:24 -04:00 committed by Marge Bot
parent 441018a173
commit 6270f8cb7c
1 changed files with 1 additions and 1 deletions

View File

@ -619,7 +619,7 @@ get_buffer_view(struct zink_context *ctx, struct zink_resource *res, enum pipe_f
bvci.format = zink_get_format(screen, format);
assert(bvci.format);
bvci.offset = offset;
bvci.range = range;
bvci.range = !offset && range == res->base.b.width0 ? VK_WHOLE_SIZE : range;
uint32_t hash = hash_bufferview(&bvci);
simple_mtx_lock(&screen->bufferview_mtx);