Skip to content

vulkan/malloc: fix allocation with large pages

Niklas Haas requested to merge haasn/libplacebo:max_slab_size into master

Since 51584f4a, page size on systems with more than 4 GB of VRAM can exceed MAXIMUM_SLAB_SIZE, in which case this clamp would end up making the allocated slab smaller than the chosen page size, leading to a whole bunch of undefined behavior.

Fixes playback of very large images in e.g. mpv --vo=gpu-next on such GPUs.

Fixes: 51584f4a

Merge request reports