turnip: fix UINT64_MAX size wrapping in tu_GetBufferMemoryRequirements()
tu_GetBufferMemoryRequirements() ends up wrapping the UINT64_MAX size to 0 when aligning. Fixes: dEQP-VK.api.buffer.basic.size_max_uint64 Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4493>
This commit is contained in:
@@ -1553,7 +1553,7 @@ tu_GetBufferMemoryRequirements2(
|
||||
pMemoryRequirements->memoryRequirements = (VkMemoryRequirements) {
|
||||
.memoryTypeBits = 1,
|
||||
.alignment = 64,
|
||||
.size = align64(buffer->size, 64),
|
||||
.size = MAX2(align64(buffer->size, 64), buffer->size),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user