https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/125131
- Define and implement `MetadataBuilder` in `HLSLRootSignature`
- Integrate and invoke the builder in `CGHLSLRuntime.cpp` to generate the Root
Signature for any associated entry functions
- Add tests to demonstr
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/125131
>From 96a959b5c1dd4d46b72344902d697a40100d8046 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 29 Jan 2025 19:40:08 +
Subject: [PATCH 1/7] add basic empty root signature
---
clang/lib/CodeGen/CGHLSL
@@ -169,5 +220,399 @@ bool RootSignatureLexer::LexToken(RootSignatureToken
&Result) {
return false;
}
+// Parser Definitions
+
+RootSignatureParser::RootSignatureParser(
+SmallVector &Elements,
+const SmallVector &Tokens, DiagnosticsEngine &Diags)
+: Elements(El
inbelic wrote:
Okay, sounds good. In that case then we can remove the code that handles got
multiple
https://github.com/llvm/llvm-project/pull/123147
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llv
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/122982
>From 5ed5fcfebb395cdfe45dc41094e07716d2003d66 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Tue, 28 Jan 2025 17:49:21 +
Subject: [PATCH 01/18] [HLSL][RootSignature] Handle an empty root signature
- Def
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/123985
>From 05c9523adaf9cc3e1585c02bed036ad83667b722 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 22 Jan 2025 17:53:59 +
Subject: [PATCH 1/6] [HLSL] Define the HLSLRootSignature Attr
- Defines HLSLRootS
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
inbelic wrote:
Rebasing onto the lexer pr api changes of using `ConsumeToken`/`PeekNextToken`
instead of pre-allocating the tokens
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/125131
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/123985
>From 8ecb03776b24247e7c68e12d2d9aea8f26e2e0cc Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 22 Jan 2025 17:53:59 +
Subject: [PATCH 1/4] [HLSL] Define the HLSLRootSignature Attr
- Defines HLSLRootS
@@ -10,13 +10,13 @@ Header:
PartOffsets: [ 60 ]
Parts:
- Name:RTS0
-Size:8
+Size:4
inbelic wrote:
Why should this change?
https://github.com/llvm/llvm-project/pull/123147
@@ -0,0 +1,74 @@
+//===- DXILRootSignature.h - DXIL Root Signature helper objects
+//---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifie
@@ -0,0 +1,157 @@
+//===- DXILRootSignature.cpp - DXIL Root Signature helper objects ===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,158 @@
+//===- DXILRootSignature.cpp - DXIL Root Signature helper objects ===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,157 @@
+//===- DXILRootSignature.cpp - DXIL Root Signature helper objects ===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
inbelic wrote:
If you think it makes more sense to have the separate, then I think we should
have at least 1 test-case that demonstrates multiple root-signatures
https://github.com/llvm/llvm-project/pull/123147
___
l
inbelic wrote:
Are you able to merge all these testcases into one file? You should be able to
define multiple root signatures on different entry functions right?
https://github.com/llvm/llvm-project/pull/123147
___
l
inbelic wrote:
I guess we can't merge all these error tests because we error out on the first
one? We should have at least one test that iterates on multiple root signatures
though.
https://github.com/llvm/llvm-project/pull/123147
https://github.com/inbelic deleted
https://github.com/llvm/llvm-project/pull/123147
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/123985
>From 42932906dc811f2f6953d0902143419daa030be7 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 22 Jan 2025 17:53:59 +
Subject: [PATCH 1/2] [HLSL] Define the HLSLRootSignature Attr
- Defines HLSLRootS
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/123985
- Defines HLSLRootSignature Attr in `Attr.td`
- Define and implement handleHLSLRootSignature in `SemaHLSL`
- Adds sample test case to show AST Node is generated in
`RootSignatures-AST.hlsl`
This commit will "ho
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/123985
>From 42932906dc811f2f6953d0902143419daa030be7 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 22 Jan 2025 17:53:59 +
Subject: [PATCH 1/3] [HLSL] Define the HLSLRootSignature Attr
- Defines HLSLRootS
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken
&Result) {
return false;
}
+// Parser Definitions
+
+RootSignatureParser::RootSignatureParser(
+SmallVector &Elements,
+const SmallVector &Tokens)
+: Elements(Elements) {
+ CurTok = Toke
https://github.com/inbelic ready_for_review
https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken
&Result) {
return false;
}
+// Parser Definitions
+
+RootSignatureParser::RootSignatureParser(
+SmallVector &Elements,
+const SmallVector &Tokens)
+: Elements(Elements) {
+ CurTok = Toke
inbelic wrote:
Sounds good, and I appreciate the feedback. I will restructure the changes to
be of smaller granularity, which will be better self-contained and directly
include their diagnostics testing.
https://github.com/llvm/llvm-project/pull/122982
_
https://github.com/inbelic converted_to_draft
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/122982
>From 58ef8ad2d3d9bfa008745b35f1514222c13b773a Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Tue, 14 Jan 2025 22:23:22 +
Subject: [PATCH 1/3] [HLSL][RootSignature] Implement Parsing of Descriptor
Tables
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/122982
>From 5ed5fcfebb395cdfe45dc41094e07716d2003d66 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Tue, 28 Jan 2025 17:49:21 +
Subject: [PATCH 01/13] [HLSL][RootSignature] Handle an empty root signature
- Def
inbelic wrote:
Updated to include diagnostics output and the relevant testing.
I have rebased to split the pr into smaller incremental changes, to help with
review. And I have taken care to address all previous comments. Unfortunately
the rebase causes these comments to get lost :/
I have imp
https://github.com/inbelic ready_for_review
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/123985
>From 9efdfc1ca3d6c02e441715061ed04b52504bc179 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 22 Jan 2025 17:53:59 +
Subject: [PATCH 1/3] [HLSL] Define the HLSLRootSignature Attr
- Defines HLSLRootS
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/122982
>From 44d3086a5a8b53a734bbabe32d7c34195def2d65 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Fri, 24 Jan 2025 22:28:05 +
Subject: [PATCH 01/17] [HLSL][RootSignature] Add lexing of integer literals
- Int
@@ -0,0 +1,140 @@
+//===- HLSLRootSignature.h - HLSL Root Signature helper objects
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -148,6 +148,347 @@ bool RootSignatureLexer::LexToken(RootSignatureToken
&Result) {
return false;
}
+// Parser Definitions
+
+RootSignatureParser::RootSignatureParser(
+SmallVector &Elements,
+const SmallVector &Tokens)
+: Elements(Elements) {
+ CurTok = Toke
@@ -0,0 +1,140 @@
+//===- HLSLRootSignature.h - HLSL Root Signature helper objects
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/122982
error: too big or took too long to generate
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic deleted
https://github.com/llvm/llvm-project/pull/122982
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -306,4 +307,254 @@ TEST_F(ParseHLSLRootSignatureTest,
InvalidLexRegNumberTest) {
ASSERT_FALSE(Consumer->IsSatisfied());
}
+// Valid Parser Tests
+
+TEST_F(ParseHLSLRootSignatureTest, ValidParseEmptyTest) {
+ const llvm::StringLiteral Source = R"cc()cc";
+
+ TrivialModu
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/133800
- defines `ParamType` as a way to represent a reference to some
parameter in a root signature
- defines `ParseParam` and `ParseParams` as an infastructure to define
how the parameters of a given struct should be
https://github.com/inbelic closed
https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,18 @@
+; RUN: not opt -passes='print' %s -S -o - 2>&1 |
FileCheck %s
+
+target triple = "dxil-unknown-shadermodel6.0-compute"
+
+; CHECK: error: Invalid value for Num32BitValues
+; CHECK-NOT: Root Signature Definitions
+
+define void @main() #0 {
+entry:
+ ret void
+}
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/136747
- It was determined to define the parsing methods much more inline with a
recursive descent parser to follow the EBNF notation better
- As part of this change, we decided to go with a calling convention to the
@@ -594,6 +599,25 @@ struct RootConstants {
sys::swapByteOrder(Num32BitValues);
}
};
+struct RootDescriptor_V1_0 {
inbelic wrote:
Having poked a bit more in `DXContainer.h`, maybe it would be best to follow
how it is done for `RuntimeInfo`? Defining a n
@@ -73,24 +75,50 @@ struct ShaderHash {
std::vector Digest;
};
-#define ROOT_ELEMENT_FLAG(Num, Val) bool Val = false;
-
struct RootConstantsYaml {
uint32_t ShaderRegister;
uint32_t RegisterSpace;
uint32_t Num32BitValues;
};
+#define ROOT_DESCRIPTOR_FLAG(Num, Val
@@ -89,6 +111,15 @@ DXContainerYAML::RootSignatureYamlDesc::create(
return RootSigDesc;
}
+uint32_t DXContainerYAML::RootDescriptorYaml::getEncodedFlags() const {
+ uint64_t Flag = 0;
+#define ROOT_DESCRIPTOR_FLAG(Num, Val)
\
+ if (
@@ -594,6 +599,25 @@ struct RootConstants {
sys::swapByteOrder(Num32BitValues);
}
};
+struct RootDescriptor_V1_0 {
inbelic wrote:
IIUC, this is how the structs were defined and planned to be extended in DXC.
And I believe it was also documented there th
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/136732
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/138002
- defines the `parseRootConstantParams` function and adds handling for the
mandatory arguments of `num32BitConstants` and `bReg`
- adds corresponding unit tests
Part two of implementing #126576
>From 15857bf
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/138002
>From 15857bf8e1303e2325b48e417e7abd26aa77910e Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 30 Apr 2025 17:53:11 +
Subject: [PATCH] [HLSL][RootSignature] Add mandatory parameters for
RootConstants
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/138007
- extends `parseRootConstantParams` and the struct to include the optional
parameters of a RootConstant
- adds corresponding unit tests
Part three of and resolves https://github.com/llvm/llvm-project/issues/12
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/138007
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/138002
>From 15857bf8e1303e2325b48e417e7abd26aa77910e Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 30 Apr 2025 17:53:11 +
Subject: [PATCH 1/2] [HLSL][RootSignature] Add mandatory parameters for
RootConst
@@ -94,10 +144,56 @@ static bool parse(LLVMContext *Ctx,
mcdxbc::RootSignatureDesc &RSD,
static bool verifyRootFlag(uint32_t Flags) { return (Flags & ~0xfff) == 0; }
+static bool verifyShaderVisibility(dxbc::ShaderVisibility Flags) {
+ switch (Flags) {
+
+ case dxbc::Shade
inbelic wrote:
I think we should change the name of the file to be more descriptive
https://github.com/llvm/llvm-project/pull/135085
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://list
inbelic wrote:
The test name implies that we are only testing root constants. Can we either
change the name or remove root flags
https://github.com/llvm/llvm-project/pull/135085
___
llvm-branch-commits mailing list
l
@@ -52,6 +59,45 @@ static bool parseRootFlags(LLVMContext *Ctx,
mcdxbc::RootSignatureDesc &RSD,
return false;
}
+static bool extractMdValue(uint32_t &Value, MDNode *Node, unsigned int OpId) {
inbelic wrote:
We could use this for `parseRootFlags` as well to
@@ -0,0 +1,34 @@
+; RUN: opt %s -dxil-embed -dxil-globals -S -o - | FileCheck %s
+; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC
+
+target triple = "dxil-unknown-shadermodel6.0-compute"
+
+; CHECK: @dx.rts0 = private constant [48 x i8] c"{{.*}}", s
@@ -94,10 +144,56 @@ static bool parse(LLVMContext *Ctx,
mcdxbc::RootSignatureDesc &RSD,
static bool verifyRootFlag(uint32_t Flags) { return (Flags & ~0xfff) == 0; }
+static bool verifyShaderVisibility(dxbc::ShaderVisibility Flags) {
+ switch (Flags) {
+
+ case dxbc::Shade
inbelic wrote:
I think you meant this to be a new test file and not to edit the root flags
validation.
Can we also remove the "RootFlags" member to reduce noise.
https://github.com/llvm/llvm-project/pull/135085
___
@@ -52,6 +59,45 @@ static bool parseRootFlags(LLVMContext *Ctx,
mcdxbc::RootSignatureDesc &RSD,
return false;
}
+static bool extractMdValue(uint32_t &Value, MDNode *Node, unsigned int OpId) {
inbelic wrote:
Maybe we could rename this to `extractMdIntValue`
@@ -94,10 +144,56 @@ static bool parse(LLVMContext *Ctx,
mcdxbc::RootSignatureDesc &RSD,
static bool verifyRootFlag(uint32_t Flags) { return (Flags & ~0xfff) == 0; }
+static bool verifyShaderVisibility(dxbc::ShaderVisibility Flags) {
+ switch (Flags) {
+
+ case dxbc::Shade
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/138055
- defines the `RootFlags` in-memory enum
- defines `parseRootFlags` to parse the various flag enums into a single
`uint32_t`
- adds corresponding unit tests
- improves the diagnostic message for when we provide
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/137690
>From 0ccff5b9be4f876969e4db439e67edbc7af6cb29 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Mon, 28 Apr 2025 18:42:10 +
Subject: [PATCH 01/13] [HLSL][RootSignature] Define and integrate rootsig
clang a
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/137690
>From 0ccff5b9be4f876969e4db439e67edbc7af6cb29 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Mon, 28 Apr 2025 18:42:10 +
Subject: [PATCH 01/14] [HLSL][RootSignature] Define and integrate rootsig
clang a
inbelic wrote:
This is rebased onto: https://github.com/llvm/llvm-project/pull/138326 which
defines a serialization of the in-memory structures.
As such, the test-case in RootSignatures-AST.hlsl is updated to show that the
values are correctly stored in the decl node.
https://github.com/llvm/
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/137690
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
inbelic wrote:
Maybe this was covered in the first pr. But are there tests that cover both big
and little endian?
https://github.com/llvm/llvm-project/pull/136732
___
llvm-branch-commits mailing list
llvm-branch-comm
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/137038
- defines the special values for `DESCRIPTOR_RANGE_OFFSET_APPEND` and
`unbounded` for the `offset` and `numDescriptors` parameters
respectively
- adds these parmaters to the `DescriptorClause` struct and the par
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/137038
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic created
https://github.com/llvm/llvm-project/pull/137381
Noting:
- Currently, `HLSLRootSignatureParser` is defined in `clangParse`, as it would
naturally seem an appropriate place to place.
- Surprisingly, `clangParse` has a dependency on `clangSema`. So we can't
in
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/137381
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic closed
https://github.com/llvm/llvm-project/pull/137381
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -24,7 +24,11 @@
namespace llvm {
namespace dxil {
-enum class RootSignatureElementKind { Error = 0, RootFlags = 1 };
+enum class RootSignatureElementKind {
inbelic wrote:
What is the reason to define this instead of just using
`dxbc::RootParameterType`. T
@@ -52,6 +59,45 @@ static bool parseRootFlags(LLVMContext *Ctx,
mcdxbc::RootSignatureDesc &RSD,
return false;
}
+static bool extractMdValue(uint32_t &Value, MDNode *Node, unsigned int OpId) {
+
+ auto *CI = mdconst::extract(Node->getOperand(OpId));
+ if (CI == nullptr)
+
@@ -255,7 +255,9 @@ TEST_F(ParseHLSLRootSignatureTest, ValidSamplerFlagsTest) {
TEST_F(ParseHLSLRootSignatureTest, ValidParseRootConsantsTest) {
inbelic wrote:
Sure, I can add more. Just wasn't sure what the right balance is, as many of
the error reports are al
@@ -82,6 +82,8 @@ class RootSignatureParser {
struct ParsedConstantParams {
std::optional Reg;
std::optional Num32BitConstants;
+std::optional Space;
inbelic wrote:
I think having it separate maps closer and clearer to the metadata and
parameter
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -o - %s |
FileCheck %s
+
+// CHECK: !dx.rootsignatures = !{![[#FIRST_ENTRY:]], ![[#SECOND_ENTRY:]]}
+
+// CHECK: ![[#FIRST_ENTRY]] = !{ptr @FirstEntry, ![[#EMPTY:]]}
+// CHECK: ![[#EMPTY]] = !{
@@ -0,0 +1,108 @@
+//===- HLSLRootSignature.cpp - HLSL Root Signature helper objects
+//--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -497,3 +497,49 @@ signature and passed to the shader without requiring a
constant buffer resource:
#. **Num32BitValues**: The number of 32-bit values included in this constant
buffer.
Root constants provide a fast way to pass small amounts of data directly to
the shader
@@ -497,3 +497,49 @@ signature and passed to the shader without requiring a
constant buffer resource:
#. **Num32BitValues**: The number of 32-bit values included in this constant
buffer.
Root constants provide a fast way to pass small amounts of data directly to
the shader
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/129797
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -544,3 +544,73 @@ Version 1.1 Root Descriptor
The Version 1.1 RootDescriptor_V1_1 extends the base structure with the
following additional fields:
#. **Flags**: Provides additional metadata about the descriptor's usage
pattern.
+
+Root Descriptor Table
+~~
@@ -544,3 +544,73 @@ Version 1.1 Root Descriptor
The Version 1.1 RootDescriptor_V1_1 extends the base structure with the
following additional fields:
#. **Flags**: Provides additional metadata about the descriptor's usage
pattern.
+
+Root Descriptor Table
+~~
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -o - %s |
FileCheck %s
+
+// CHECK-DAG: ![[#EMPTY:]] = !{}
+[shader("compute"), RootSignature("")]
+[numthreads(1,1,1)]
+void FirstEntry() {}
+
+// CHECK-DAG: ![[#CBV:]] = !{!"CBV", i32 1, i32
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/125131
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/125131
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/125131
>From abe7e6703a008608e19ce3f9bdcbd1b613fab60d Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 29 Jan 2025 19:40:08 +
Subject: [PATCH 1/7] add basic empty root signature
---
clang/lib/CodeGen/CGHLSL
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/125131
>From abe7e6703a008608e19ce3f9bdcbd1b613fab60d Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 29 Jan 2025 19:40:08 +
Subject: [PATCH 1/6] add basic empty root signature
---
clang/lib/CodeGen/CGHLSL
https://github.com/inbelic ready_for_review
https://github.com/llvm/llvm-project/pull/125131
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -647,6 +648,40 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr
*RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1)
+return;
+
+
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/123985
>From d9b0d8ee0f8420c56a6c2c5e0c2234fbc2a22d7e Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 22 Jan 2025 17:53:59 +
Subject: [PATCH 1/9] [HLSL] Define the HLSLRootSignature Attr
- Defines HLSLRootS
inbelic wrote:
> I was expectng a change in `CGHLSLRuntime.cpp` that did something with the
> root signature attribute. Is there a reason why we aren't? That seems to be
> the pattern for other prs like this for `WaveSizeAttr` and
> `HLSLNumThreadsAttr`.
Yep, we will be using that to emit the
@@ -647,6 +648,40 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr
*RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1)
+return;
+
+
1 - 100 of 222 matches
Mail list logo