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] Implement 'DependentScopeDeclRefExpr' bug when trying to assign a static const member field from template parameter struct #7006

Open
Fletterio opened this issue Nov 13, 2024 · 2 comments
Labels
enhancement Feature suggestion needs-triage Awaiting triage

Comments

@Fletterio
Copy link

Fletterio commented Nov 13, 2024

Description
I cannot define static const member field for a struct if they need to be computed from a template parameter struct's static const member field. This godbolt shows what I mean: https://godbolt.org/z/TjWGY9sx8 (uncomment line 21 for error)

It feels silly that this doesn't work, because as showcased in the godbolt above it's totally fine to define the same exact variables I want from within a method, but impossible to do so otherwise. So the current workaround is to redefine every such constant inside every function that wants to use it, which is ugly.

@Fletterio Fletterio added enhancement Feature suggestion needs-triage Awaiting triage labels Nov 13, 2024
@devshgraphicsprogramming

why does the bug not appear without -spirv !? I would have thought that templates get dealt with waaay before codegen.

@Fletterio Fletterio changed the title [Feature Request] Implement 'DependentScopeDeclRefExpr' [SPIR-V] Implement 'DependentScopeDeclRefExpr' bug when trying to assign a static const member field from template parameter struct Nov 13, 2024
@Fletterio
Copy link
Author

Changed title to reflect it being a SPIR-V target bug

@damyanp damyanp moved this to For Google in HLSL Triage Nov 13, 2024
@s-perron s-perron added this to the Next+1 Release milestone Nov 19, 2024
@s-perron s-perron moved this from For Google to Triaged in HLSL Triage Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature suggestion needs-triage Awaiting triage
Projects
Status: New
Status: Triaged
Development

No branches or pull requests

3 participants