Mesa (main): zink: use VK_WHOLE_SIZE for full-sized bufferviews
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 30 21:41:26 UTC 2021
Module: Mesa
Branch: main
Commit: 6270f8cb7c37ff04e49cc1bd2782565007718788
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6270f8cb7c37ff04e49cc1bd2782565007718788
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu Aug 26 12:05:24 2021 -0400
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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12631>
---
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);
More information about the mesa-commit
mailing list