From 6270f8cb7c37ff04e49cc1bd2782565007718788 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 26 Aug 2021 12:05:24 -0400 Subject: [PATCH] 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 Part-of: --- 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 a13d69c34f1..09dd9abb1a5 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -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);