Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLSL: Don't bind PreparedImage as SRV in depth clip shader #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant