Skip to content

Check for invalid usage of gl_WorkGroupSize components#4181

Merged
jeremy-lunarg merged 1 commit intoKhronosGroup:mainfrom
arcady-lunarg:workgroup-size-component
Mar 10, 2026
Merged

Check for invalid usage of gl_WorkGroupSize components#4181
jeremy-lunarg merged 1 commit intoKhronosGroup:mainfrom
arcady-lunarg:workgroup-size-component

Conversation

@arcady-lunarg
Copy link
Copy Markdown
Contributor

The check for usage of gl_WorkGroupSize before a local_size_[xyz] declaration was not being hit in cases of access to a component because those usages get constant folded just as they are being parsed. This change adds a check before the call to foldSwizzle() to catch these cases.

Apparently the test suite had a couple of cases that weren't following this rule so those get updated as well.

Fixes #2627

The check for usage of gl_WorkGroupSize before a local_size_[xyz]
declaration was not being hit in cases of access to a component
because those usages get constant folded just as they are being
parsed. This change adds a check before the call to foldSwizzle()
to catch these cases.
Copy link
Copy Markdown
Contributor

@jeremy-lunarg jeremy-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeremy-lunarg jeremy-lunarg merged commit 9c4f12c into KhronosGroup:main Mar 10, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gl_WorkGroupSize declaration issue.

2 participants