Skip to content

Conversation

@K0bin
Copy link

@K0bin K0bin commented Feb 22, 2023

The GLSL version of the depth clip pass binds the image "PreparedInputColor" as both an SRV and a UAV.

https://github.com/GPUOpen-Effects/FidelityFX-FSR2/blob/master/src/ffx-fsr2-api/shaders/ffx_fsr2_depth_clip_pass.glsl#L32
https://github.com/GPUOpen-Effects/FidelityFX-FSR2/blob/master/src/ffx-fsr2-api/shaders/ffx_fsr2_depth_clip_pass.glsl#LL41C9-L41C61

The Vulkan backend transitions all SRVs to IMAGE_LAYOUT_SHADER_READ_ONLY and all UAVs to IMAGE_LAYOUT_GENERAL. SRV layout transitions are added after the UAV ones and SRV descriptors are set to use IMAGE_LAYOUT_SHADER_READ_ONLY, so even if we assume that layout transitions are serialized and the shader never actually writes to the UAV, this is still a bug.

The HLSL equivalent does not try to bind the SRV of PreparedInputColor and the underlying shader only ever needs the UAV one (write only even).

The shader never actually uses this but it uses an UAV of the same
image, so there's a image layout conflict here.
@K0bin
Copy link
Author

K0bin commented Jun 9, 2023

Still an issue on 2.2.1 as far as I can tell...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant