Mesa (main): tu: Fill out maxBufferSize
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 18:16:04 UTC 2022
Module: Mesa
Branch: main
Commit: 7455a7a44c7a68bb735c209a34c8a53560b725b7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7455a7a44c7a68bb735c209a34c8a53560b725b7
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Fri Mar 18 14:36:11 2022 +0100
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>
---
src/freedreno/vulkan/tu_device.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 82883e01d96..e3522a38b2b 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -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
More information about the mesa-commit
mailing list