Skip to content

Vulkan: increase max stage size to support large buffers

The Vulkan renderer currently sets a max stage size of 64MB which appears to prevent larger buffers from being uploaded to textures. A 64MB max is enough to upload two 4K displays' worth of pixels, but there are some configurations which exceed this. For example, a large video player that covers an array of displays fails when it exceeds this limit, causing a warning "vulkan stage buffers have reached max size" followed by other Vulkan errors. This same configuration works in the GLES2 renderer.

My test cases were a 11520x2160 video played across three 4K screens, and a 11520x1080 video played across six HD screens into wlr_buffers filled by gstreamer. I've confirmed that these test cases work in the Vulkan renderer after increasing the max stage size.

A new max size of 256MB is proposed because many modern GPUs support texture sizes up to 16K x 16K. Because this is only an increase on the max size, I don't think there would be any change in behavior for those who didn't exceed the old max size.

I am by no means a Vulkan expert, so I of course welcome any feedback.

Merge request reports