Open johnson3d opened 11 months ago
The interface
keyword is not supported in HLSL 2016 and later (the versions supported by DXC).
The compiler should not crash, but this code is not valid modern HLSL.
The
interface
keyword is not supported in HLSL 2016 and later (the versions supported by DXC).The compiler should not crash, but this code is not valid modern HLSL.
I see, so i must use template to do that?
I see, so i must use template to do that?
If you're using HLSL 2021+ you can use C++ template patterns with SFINAE to get similar results to the legacy interface
feature, but aspects of HLSL interface
objects are just not supported in HLSL anymore. Specifically, interface
objects could be resolved late at PSO creation time. In modern HLSL, all function calls must be resolved at compile time, unless you're building a lib
target in which case the rules are a bit more complicated.
Description use interface simply, dxc will crash,but d3dcompile is ok
Steps to Reproduce
save code in test.hlsl dxc -E CS_ClusterCullingMain -T cs_6_6 -Fo myshader.bin -Zi -Fd myshader.pdb -D MYDEFINE=1 test.hlsl
Actual Behavior
Internal compiler error: access violation. Attempted to read from address 0x00000000000000A8
Environment