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>
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