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

UE uses "unnamed struct" and Slang needs to support #3821

Closed
jkwak-work opened this issue Mar 22, 2024 · 0 comments · Fixed by #3822
Closed

UE uses "unnamed struct" and Slang needs to support #3821

jkwak-work opened this issue Mar 22, 2024 · 0 comments · Fixed by #3822
Assignees
Labels
goal:client support Needed to support a slang use case

Comments

@jkwak-work
Copy link
Collaborator

Unreal Engine expects the following HLSL syntax to work properly.

static const struct
{
    int member;
} varName = { value };

But Slang errors out as following,

c.slang(2): error 20001: unexpected '{', expected identifier
{
^

The following syntax works for Slang but we need to support what UE expects.

struct StructName
{
    int member;
};
static const StructName varName = { value };
@csyonghe csyonghe self-assigned this Mar 23, 2024
@csyonghe csyonghe added the goal:client support Needed to support a slang use case label Mar 23, 2024
@csyonghe csyonghe added this to the Q1 2024 (Winter) milestone Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:client support Needed to support a slang use case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants