microsoft / DirectXShaderCompiler

This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.
Other
3.09k stars 689 forks source link

globallycoherent change in SM6.6 #3765

Closed runestubbe closed 2 years ago

runestubbe commented 3 years ago

I don't see it announced anywhere, so I assume this is an unintended side effect of the bindless resource changes. In SM6.5 all loads/stores on a resource are globally coherent if the resource is marked as globally coherent. In SM6.6 it seems loads/stores are only globally coherent if the variable the resource is accessed through is marked as globally coherent. So if for instance a globallycoherent buffer is passed to a function that takes a buffer as an input parameter that is not marked as globallycoherent the result is non-globallycoherent access inside that function. This is particularly nasty because the conversion between globallycoherent and non-globallycoherent is silent. Example: http://shader-playground.timjones.io/c185e230079aa9aa0d969a4c04b62ae6

python3kgae commented 2 years ago

Fixed with https://github.com/microsoft/DirectXShaderCompiler/pull/4211