Skip to content

[SPIR-V] countbit on 16+64 bit types#7997

Merged
Keenuts merged 7 commits intomicrosoft:mainfrom
Keenuts:fix-7122
Dec 16, 2025
Merged

[SPIR-V] countbit on 16+64 bit types#7997
Keenuts merged 7 commits intomicrosoft:mainfrom
Keenuts:fix-7122

Conversation

@Keenuts
Copy link
Copy Markdown
Collaborator

@Keenuts Keenuts commented Dec 10, 2025

The SPIR-V instruction can work on non-32 bit components, but only with VK maintenance 9, which seems to be hidden behing a feature bit.
Implementing countbit on such types by converting to a 32-bit integer first. Should be ok.

Fixes #7494

The SPIR-V instruction can work on non-32 bit components,
but only with VK maintenance 9, which seems to be hidden behing
a feature bit.
Implementing countbit on such types by converting to a 32-bit integer
first. Should be ok.

Fixes microsoft#7122
@Keenuts Keenuts requested a review from s-perron December 10, 2025 16:49
Copy link
Copy Markdown
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

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

Left needs to be right, and you link to the wrong issue in description.

Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Outdated
Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp
Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp
@Keenuts Keenuts requested a review from s-perron December 16, 2025 09:42
@Keenuts
Copy link
Copy Markdown
Collaborator Author

Keenuts commented Dec 16, 2025

failure in the CI seems to be related to a macos machine failure.

@Keenuts
Copy link
Copy Markdown
Collaborator Author

Keenuts commented Dec 16, 2025

/azp run microsoft.DirectXShaderCompiler

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Keenuts Keenuts enabled auto-merge (squash) December 16, 2025 16:32
@Keenuts Keenuts merged commit 5f29bff into microsoft:main Dec 16, 2025
12 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Dec 16, 2025
@Keenuts Keenuts deleted the fix-7122 branch December 18, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[SPIR-V] Incorrect SPIR-V generated for countbits for non-32 bit type integers

2 participants