mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
vallium: limit buffer allocations to gallium max.
Don't allocate buffers greater than gallium can handle.
Fixes:
dEQP-VK.api.buffer.basic.size_max_uint64
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
This commit is contained in:
parent
857008850f
commit
668e4c2356
1 changed files with 4 additions and 0 deletions
|
|
@ -198,6 +198,10 @@ VkResult val_CreateBuffer(
|
|||
|
||||
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO);
|
||||
|
||||
/* gallium has max 32-bit buffer sizes */
|
||||
if (pCreateInfo->size > UINT32_MAX)
|
||||
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
|
||||
buffer = vk_alloc2(&device->alloc, pAllocator, sizeof(*buffer), 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if (buffer == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue