mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
aco: use size_t for monotonic_buffer_resource
Necessary for really big shaders. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14650 Backport-to: 25.3 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39408>
This commit is contained in:
parent
18d3b7d623
commit
874255e899
1 changed files with 4 additions and 4 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue