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

spirv: only set LocalSizeId mode when necessary #3351

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

arcady-lunarg
Copy link
Contributor

SPIR-V 1.6 added the LocalSizeId execution mode that allows using spec constants for setting the work-group size, however it does not deprecate the LocalSize mode. This change causes the LocalSizeId mode to only be used when at least one of the workgroup size is actually specified with a spec constant.

Fixes #3200

@arcady-lunarg arcady-lunarg added the kokoro:run Trigger Google bot runs label Oct 6, 2023
@kokoro-team kokoro-team removed the kokoro:run Trigger Google bot runs label Oct 6, 2023
Copy link
Collaborator

@ncesario-lunarg ncesario-lunarg left a comment

Choose a reason for hiding this comment

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

Some nits, but LGTM.

SPIRV/GlslangToSpv.cpp Show resolved Hide resolved
SPIRV/GlslangToSpv.cpp Outdated Show resolved Hide resolved
Copy link
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.

I just wanted to make sure we still had a test that covers using specialization contants and I found spv.1.6.specConstant.comp. LGTM

SPIR-V 1.6 added the LocalSizeId execution mode that allows using
spec constants for setting the work-group size, however it does not
deprecate the LocalSize mode. This change causes the LocalSizeId mode to
only be used when at least one of the workgroup size is actually
specified with a spec constant.

Fixes KhronosGroup#3200
@arcady-lunarg arcady-lunarg merged commit 48f9ed8 into KhronosGroup:main Oct 12, 2023
22 checks passed
@arcady-lunarg arcady-lunarg deleted the localsizeid branch October 12, 2023 18:45
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.

Targeting vulkan1.3 enables LocalSizeId execution mode even if using constant workgroup sizes.
4 participants