FidelityFX-SPD
FidelityFX-SPD copied to clipboard
Global counter buffer assumes up to 6 slices
https://github.com/GPUOpen-Effects/FidelityFX-SPD/blob/7c796c6d9fa6a9439e3610478148cfd742d97daf/sample/src/VK/SPDIntegration.glsl#L50
It works for cubemaps, but when using with regular texture arrays it should use unbound buffer:
uint counter[];
And CPU must create either worst case buffer size (2K slices for most vendors) or use some sort of dynamic allocation when generating something new with bigger slice count than used so far.
This only affects the samples right? The samples don't demonstrate a single-pass reduction of anything more than 6 slices, so the assumption is that you can bind the resources you need and implement the various Load/Store functions accordingly.