aco: Fix build error with std::max on GCC 12

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18969>
This commit is contained in:
Timur Kristóf
2022-10-05 09:53:10 -05:00
committed by Marge Bot
parent 3ca8402ec7
commit df3fdbdeb5

View File

@@ -413,7 +413,7 @@ public:
/* The size parameter refers to the total size of the buffer.
* The usable data_size is size - sizeof(Buffer).
*/
size = std::max(size, minimum_size);
size = MAX2(size, minimum_size);
buffer = (Buffer*)malloc(size);
buffer->next = nullptr;
buffer->data_size = size - sizeof(Buffer);