Skip to content

pipe/gallium: Use alignment to get true buffer allocation size for cache lookups; d3d12: Use already-aligned size from pb_cache

Giancarlo Devich requested to merge gdevi/mesa:gdevi/pb_cache into main

Some drivers have minimum buffer size or alignment requirements. When a buffer is created using pb_cache_manager_create_buffer, the cache is first checked for a compatible buffer to return instead. If the requested buffer size is less than (minimum buffer size) / (mgr->size_factor), no buffer in the cache will ever be applicable.

The alignment is used to determine the true allocation size when evaluating against cached buffers.

Edited by Giancarlo Devich

Merge request reports