zink: avoid overflow when clamping bufferviews
cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
This commit is contained in:
committed by
Marge Bot
parent
55d6847d22
commit
084f3b6664
@@ -815,7 +815,7 @@ create_bvci(struct zink_context *ctx, struct zink_resource *res, enum pipe_forma
|
||||
if (bvci.offset + bvci.range >= res->base.b.width0)
|
||||
bvci.range = VK_WHOLE_SIZE;
|
||||
}
|
||||
uint32_t clamp = blocksize * screen->info.props.limits.maxTexelBufferElements;
|
||||
uint64_t clamp = blocksize * screen->info.props.limits.maxTexelBufferElements;
|
||||
if (bvci.range == VK_WHOLE_SIZE && res->base.b.width0 > clamp)
|
||||
bvci.range = clamp;
|
||||
bvci.flags = 0;
|
||||
|
||||
Reference in New Issue
Block a user