[SPIR-V] Implement QuadAny and QuadAll#7266
Merged
cassiebeckley merged 3 commits intomicrosoft:mainfrom Apr 3, 2025
Merged
Conversation
Collaborator
Author
|
Depends on KhronosGroup/SPIRV-Tools#6068. |
cassiebeckley
added a commit
to cassiebeckley/DirectXShaderCompiler
that referenced
this pull request
Mar 27, 2025
spirv-val has added a validation that enforces a minimum version of SPIR-V 1.3 when using VulkanMemoryModel, so I've updated the tests that use it to use the correct target environment. Needed for microsoft#7266.
cassiebeckley
added a commit
to cassiebeckley/DirectXShaderCompiler
that referenced
this pull request
Mar 27, 2025
spirv-val has added a validation that enforces a minimum version of SPIR-V 1.3 when using VulkanMemoryModel, so I've updated the tests that use it to use the correct target environment. Needed for microsoft#7266.
Collaborator
Author
|
Depends on #7269. |
cassiebeckley
added a commit
that referenced
this pull request
Mar 27, 2025
spirv-val has added a validation that enforces a minimum version of SPIR-V 1.3 when using VulkanMemoryModel, so I've updated the tests that use it to use the correct target environment. Needed for #7266.
If `"SPV_KHR_quad_control"` can be used, uses OpGroupNonUniformQuadAnyKHR and OpGroupNonUniformQuadAllKHR. If not, falls back to constructing the value using `OpGroupNonUniformQuadBroadcast`. Fixes microsoft#7247
9319056 to
49cbce1
Compare
QuadBroadcast -> QuadSwap correction
s-perron
reviewed
Mar 28, 2025
Collaborator
s-perron
left a comment
There was a problem hiding this comment.
LGTM I just want to see one extra test. Thanks.
docs/SPIR-V.rst
Outdated
Comment on lines
+4022
to
+4025
| ``QuadAny`` and ``QuadAll`` will use the ``OpGroupNonUniformQuadAnyKHR`` and | ||
| ``OpGroupNonUniformQuadAllKHR`` if the ``SPV_KHR_quad_control`` extension is | ||
| enabled. If it is not, they will fall back to constructing the value using | ||
| multiple calls to ``OpGroupNonUniformQuadBroadcast``. |
Collaborator
There was a problem hiding this comment.
Suggested change
| ``QuadAny`` and ``QuadAll`` will use the ``OpGroupNonUniformQuadAnyKHR`` and | |
| ``OpGroupNonUniformQuadAllKHR`` if the ``SPV_KHR_quad_control`` extension is | |
| enabled. If it is not, they will fall back to constructing the value using | |
| multiple calls to ``OpGroupNonUniformQuadBroadcast``. | |
| ``QuadAny`` and ``QuadAll`` will use the ``OpGroupNonUniformQuadAnyKHR`` and | |
| ``OpGroupNonUniformQuadAllKHR`` instructions if the ``SPV_KHR_quad_control`` extension is | |
| enabled. If it is not, they will fall back to constructing the value using | |
| multiple calls to ``OpGroupNonUniformQuadBroadcast``. |
| @@ -0,0 +1,36 @@ | |||
| // RUN: %dxc -T cs_6_0 -E main -fspv-target-env=vulkan1.1 -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,QUAD | |||
| // RUN: %dxc -T cs_6_0 -E main -fspv-target-env=vulkan1.1 -fspv-extension=SPV_KHR_16bit_storage -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,NOQUAD | |||
Collaborator
There was a problem hiding this comment.
could we do a test with vulkan1.0 and check for the error? I think we can simply add another run command.
Keenuts
previously approved these changes
Apr 1, 2025
s-perron
approved these changes
Apr 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If
"SPV_KHR_quad_control"can be used, usesOpGroupNonUniformQuadAnyKHRandOpGroupNonUniformQuadAllKHR. If not, falls back to constructing the value usingOpGroupNonUniformQuadBroadcast.Fixes #7247