microsoft / DirectXShaderCompiler

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

[SPIR-V] Specialization constant - unsupported specialization constant initializer #3951

Open manas-kulkarni opened 2 years ago

manas-kulkarni commented 2 years ago

Error happens with latest release and latest build artifact as well

Test Shader

[[vk::constant_id( 0 )]] const uint test = ( 4350 * 1024 );

StructuredBuffer<uint3> ro;
RWStructuredBuffer<uint3> rw;

[numthreads(8, 8, 1)]
void main(uint2 dtid : SV_DispatchThreadID)
{
    if (test)
        return;
    rw[dtid.x] = ro[dtid.x];
}

Error: unsupported specialization constant initializer

Verified that it compiles fine with glslangValidator

jaebaek commented 2 years ago

@manas-kulkarni Thank you for reporting this issue. We will take a look.

manas-kulkarni commented 1 year ago

Any update?