rusticl: limit global mem to 2GB

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
This commit is contained in:
Karol Herbst 2022-09-24 21:09:32 +02:00 committed by Marge Bot
parent bb91117204
commit 3811834eb1

View file

@ -621,8 +621,12 @@ impl Device {
}
pub fn max_mem_alloc(&self) -> cl_ulong {
self.screen
.compute_param(pipe_compute_cap::PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE)
// TODO: at the moment gallium doesn't support bigger buffers
min(
self.screen
.compute_param(pipe_compute_cap::PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE),
0x80000000,
)
}
pub fn max_samplers(&self) -> cl_uint {