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

[SPIR-V] Implement SpirvType and SpirvOpaqueType #6156

Merged
merged 13 commits into from
Apr 15, 2024

Conversation

cassiebeckley
Copy link
Collaborator

Implements hlsl-specs proposal 0011, adding vk::SpirvType and vk::SpirvOpaqueType templates which allow users to define and use SPIR-V level types.

tools/clang/lib/AST/ASTContextHLSL.cpp Outdated Show resolved Hide resolved
tools/clang/lib/SPIRV/LowerTypeVisitor.cpp Outdated Show resolved Hide resolved
tools/clang/lib/SPIRV/LowerTypeVisitor.cpp Outdated Show resolved Hide resolved
tools/clang/lib/SPIRV/SpirvContext.cpp Outdated Show resolved Hide resolved
tools/clang/lib/SPIRV/ConstEvaluator.h Outdated Show resolved Hide resolved
@s-perron s-perron self-requested a review January 18, 2024 21:02
Copy link
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.

Generally look okay to me. I have a request for a few extra comments, and if you can split out the ConstEvaluator refactor into a separate PR, that would be nice.

Also @llvm-beanz should look at this as well (or someone else for MS) since you are making significant chagnes to SEMA.

cassiebeckley added a commit to cassiebeckley/DirectXShaderCompiler that referenced this pull request Jan 24, 2024
This refactor is split out from microsoft#6156, which needs to use these methods
in LowerTypeVisitor.
Keenuts pushed a commit that referenced this pull request Jan 29, 2024
This moves functions for evaluating constant expressions and translating
LLVM AP types to SPIR-V constants into a new class. These functions need
to be used from LowerTypeVisitor in #6156, so I am factoring them out to
avoid duplication.
Implements hlsl-specs proposal 0011, adding `vk::SpirvType` and
`vk::SpirvOpaqueType` templates which allow users to define and use
SPIR-V level types.
Copy link
Collaborator

@sudonatalie sudonatalie left a comment

Choose a reason for hiding this comment

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

LGTM % a review from someone at MS

tools/clang/lib/Sema/SemaTemplate.cpp Outdated Show resolved Hide resolved
utils/hct/gen_intrin_main.txt Outdated Show resolved Hide resolved
@cassiebeckley
Copy link
Collaborator Author

@sudonatalie @llvm-beanz I've updated this PR based on the design changes to 0011.

@sudonatalie
Copy link
Collaborator

LGTM

@llvm-beanz Can you take another look?

Copy link
Collaborator

@llvm-beanz llvm-beanz left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in reviewing this. It looks great to me. Thank you!

@cassiebeckley cassiebeckley requested a review from a team as a code owner April 15, 2024 19:37
@cassiebeckley cassiebeckley enabled auto-merge (squash) April 15, 2024 19:38
@cassiebeckley cassiebeckley merged commit d60dffe into microsoft:main Apr 15, 2024
12 checks passed
@cassiebeckley cassiebeckley deleted the spirv-type-intrinsic branch April 15, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants