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

[SPIR-V] Static class member initializer not implemented #6621

Open
sudonatalie opened this issue May 14, 2024 · 0 comments
Open

[SPIR-V] Static class member initializer not implemented #6621

sudonatalie opened this issue May 14, 2024 · 0 comments
Labels
bug Bug, regression, crash spirv Work related to SPIR-V

Comments

@sudonatalie
Copy link
Collaborator

Description
Static class member initializer not implemented for SPIR-V.

Steps to Reproduce
dxc -T ps_6_0 -E main -O0 -spirv

class S {
    float4 b;
};

class T {
    static S N;
};

S T::N = {1., 2., 3., 4.};

float4 main(float4 input: A) : SV_Target {
    return 1.0;
}

https://godbolt.org/z/soMxxsjYj

Actual Behavior

<source>:11:10: error: initializer for type 'S' unimplemented
S T::N = {1., 2., 3., 4.};

Succeeds with DXIL backend.

Environment

  • DXC version: 8e9cefa
  • Host Operating System: Linux
@sudonatalie sudonatalie added bug Bug, regression, crash spirv Work related to SPIR-V labels May 14, 2024
sudonatalie added a commit that referenced this issue May 17, 2024
The following tests only required minor test syntax changes to pass:
- tools/clang/test/CodeGenSPIRV/cast.2float.interlocked.hlsl
-
tools/clang/test/CodeGenSPIRV/meshshading.nv.error.fncall.amplification.vulkan1.2.hlsl
(+ replacing NV ext with EXT)
- tools/clang/test/CodeGenSPIRV/var.init.extvector.hlsl

Issue #6621 has been filed to track the failure of
tools/clang/test/CodeGenSPIRV/oo.class.static.member.hlsl.

Related to #6616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash spirv Work related to SPIR-V
Projects
None yet
Development

No branches or pull requests

1 participant