Repository navigation
[SPIR-V] Enable vk::ext_extension and vk::ext_capability for variables - #6052
Merged
Cassandra Beckley (cassiebeckley) merged 2 commits intoNov 23, 2023
Merged
Cassandra Beckley (cassiebeckley) merged 2 commits into
Cassandra Beckley (cassiebeckley) merged 2 commits into
Conversation
Cassandra Beckley (cassiebeckley)
requested review from
Steven Perron (s-perron) and
Natalie Chouinard (sudonatalie)
November 21, 2023 22:38
Contributor
You can test this locally with the following command:git-clang-format --diff 3861c5eef7fde82a7d8beb21c7558b0d3d0c4b7a 120dfe6022e059a3dc7e2a4acff5e2b650a70c2e -- tools/clang/lib/SPIRV/DeclResultIdMapper.cpp tools/clang/lib/SPIRV/SpirvEmitter.cpp tools/clang/lib/SPIRV/SpirvEmitter.hView the diff from clang-format here.diff --git a/tools/clang/lib/SPIRV/SpirvEmitter.h b/tools/clang/lib/SPIRV/SpirvEmitter.h
index ac2d93e5..8796ed46 100644
--- a/tools/clang/lib/SPIRV/SpirvEmitter.h
+++ b/tools/clang/lib/SPIRV/SpirvEmitter.h
@@ -106,10 +106,10 @@ public:
/// Create SpirvIntrinsicInstruction for arbitrary SPIR-V instructions
/// specified by [[vk::ext_instruction(..)]] or [[vk::ext_type_def(..)]]
- SpirvInstruction *createSpirvIntrInstExt(
- llvm::ArrayRef<const Attr *> attrs, QualType retType,
- llvm::ArrayRef<SpirvInstruction *> spvArgs, bool isInstr,
- SourceLocation loc);
+ SpirvInstruction *
+ createSpirvIntrInstExt(llvm::ArrayRef<const Attr *> attrs, QualType retType,
+ llvm::ArrayRef<SpirvInstruction *> spvArgs,
+ bool isInstr, SourceLocation loc);
private:
void doFunctionDecl(const FunctionDecl *decl);
|
Steven Perron (s-perron)
approved these changes
Nov 22, 2023
Natalie Chouinard (sudonatalie)
approved these changes
Nov 22, 2023
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.
ext_extensionandext_capabilitycan only be added to functions at the moment. This PR enables adding them to variable declarations, so that using the variable results in the extensions and capabilities being added to the module. This is useful for the builtin variable syntax proposed in microsoft/hlsl-specs#129.