SSSR seems to downsample the depth hierarchy too much
I was looking over the SSSR code and the C++ side clamps the number of mips in the depth hierarchy to 7, while the shader side goes with a texture array with 13 entries. This is in ffx_sssr_callbacks_glsl.h:
#if defined SSSR_BIND_UAV_DEPTH_HIERARCHY
layout (set = 0, binding = SSSR_BIND_UAV_DEPTH_HIERARCHY, r32f) uniform image2D rw_depth_hierarchy[13];
#endif
The C++ side uses mip 0 to pad out rw_depth_hierarchy and then ffx_sssr_depth_downsample.h just dispatches SPD with all of this.
Since the number of mips is clamped on the C++ side, wouldn't it make sense to also clamp the return value of GetMipsCount()? This would reduce the amount of processing SPD has to do and also get rid of the need for atomics since SPD can do 6 mips atomic free. It's possible I'm missing something though and this is very much intended behaviour (and I need to update my implementation of SSSR).