From 874255e89964c8436789d153df2432127d5c13af Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 20 Jan 2026 14:33:30 +0000 Subject: [PATCH] aco: use size_t for monotonic_buffer_resource Necessary for really big shaders. Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14650 Backport-to: 25.3 Part-of: --- src/amd/compiler/aco_util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/compiler/aco_util.h b/src/amd/compiler/aco_util.h index 2cceeb3c314..c49b682e686 100644 --- a/src/amd/compiler/aco_util.h +++ b/src/amd/compiler/aco_util.h @@ -275,7 +275,7 @@ public: } /* create new larger buffer */ - uint32_t total_size = buffer->data_size + sizeof(Buffer); + size_t total_size = buffer->data_size + sizeof(Buffer); do { total_size *= 2; } while (total_size - sizeof(Buffer) < size); @@ -303,8 +303,8 @@ public: private: struct Buffer { Buffer* next; - uint32_t current_idx; - uint32_t data_size; + size_t current_idx; + size_t data_size; uint8_t data[]; }; @@ -334,7 +334,7 @@ public: /* Memory Allocation */ T* allocate(size_t size) { - uint32_t bytes = sizeof(T) * size; + size_t bytes = sizeof(T) * size; return (T*)memory_resource.get().allocate(bytes, alignof(T)); }