tu: Fill out maxBufferSize

It seems this is really a workaround for silly issues in
GetBufferMemoryRequirements when you ask for a really large buffer. Just
expose the maximum possible size ATM.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15488>
This commit is contained in:
Connor Abbott 2022-03-18 14:36:11 +01:00 committed by Marge Bot
parent d1762b7df0
commit 7455a7a44c
1 changed files with 6 additions and 2 deletions

View File

@ -1035,8 +1035,12 @@ tu_get_physical_device_properties_1_3(struct tu_physical_device *pdevice,
p->uniformTexelBufferOffsetAlignmentBytes = 64;
p->uniformTexelBufferOffsetSingleTexelAlignment = false;
/* TODO: find out the limit */
p->maxBufferSize = 0;
/* The address space is 4GB for current kernels, so there's no point
* allowing a larger buffer. Our buffer sizes are 64-bit though, so
* GetBufferDeviceRequirements won't fall over if someone actually creates
* a 4GB buffer.
*/
p->maxBufferSize = 1ull << 32;
}
VKAPI_ATTR void VKAPI_CALL