Skip to content

dzn: Fix non-writeable SSBO support

Boris Brezillon requested to merge dzn-ssbo-fixes into dozen

Descriptor sets don't have the knowledge of how the shaders belonging to the pipeline they will be bound to are using the resources, and some resources might be require an UAV or an SRV depending on whether the shader writes to them or not. A solution would to make all SSBOs writeable but this can hurt performances, so let's address the problem differently.

The solution chosen here is to create a pair of SRV/UAV slots when the resource can be written to, and let the shader pick the one it wants.

We currently copy both descriptors to the final UAV_SRC_CBV heap, but we could optimize it a bit by keeping track of those that are actually used at the pipeline layout level and skipping the unused ones in update_heaps(). But let's keep that as a future improvement.

Edited by Boris Brezillon

Merge request reports

Loading