https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/147806
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -697,7 +699,9 @@ BuiltinTypeDeclBuilder
&BuiltinTypeDeclBuilder::addArraySubscriptOperators() {
AST.DeclarationNames.getCXXOperatorName(OO_Subscript);
addHandleAccessFunction(Subscript, /*IsConst=*/true, /*IsRef=*/true);
- addHandleAccessFunction(Subscript, /*IsCo
@@ -32,6 +32,9 @@ struct RangeInfo {
llvm::dxil::ResourceClass Class;
uint32_t Space;
llvm::dxbc::ShaderVisibility Visibility;
+
+ // The index retains its original position before being sorted by group.
+ size_t Index;
bogner wrote:
The simpler way to
https://github.com/bogner approved this pull request.
I agree that this improves the clarity here. LGTM!
https://github.com/llvm/llvm-project/pull/147623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
https://github.com/bogner commented:
What does this do when there are commas at the ends of lists of elements?
Interestingly, DXC seems inconsistent on its behaviour for those:
```hlsl
// Unexpected token ')'
[RootSignature("CBV(b0), CBV(b1,)")]
// valid
[RootSignature("CBV(b0), CBV(b1),")]
```
@@ -34,3 +34,7 @@ void bad_root_signature_5() {}
// expected-error@+1 {{expected ')' to denote end of parameters, or, another
valid parameter of RootConstants}}
[RootSignature(MultiLineRootSignature)]
void bad_root_signature_6() {}
+
+// expected-error@+1 {{expected end of str
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/147350
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/145986
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
looks good, one more comment about using enum values rather than bit patterns
in a test
https://github.com/llvm/llvm-project/pull/145986
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
@@ -56,7 +56,7 @@ TEST(HLSLRootSignatureTest, DescriptorUAVClauseDump) {
Clause.NumDescriptors = 3298;
Clause.Space = 932847;
Clause.Offset = 1;
- Clause.Flags = DescriptorRangeFlags::ValidFlags;
+ Clause.Flags = llvm::dxbc::DescriptorRangeFlags(0x1000f);
--
@@ -127,6 +127,7 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseEmptyTest) {
}
TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) {
+ using FlagT = llvm::dxbc::DescriptorRangeFlags;
bogner wrote:
I wouldn't rename this to `FlagT`, but instead just
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/144929
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
Looks good. A few minor comments below.
https://github.com/llvm/llvm-project/pull/144813
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
@@ -66,17 +66,17 @@ void addDxilValVersion(StringRef ValVersionStr,
llvm::Module &M) {
DXILValMD->addOperand(Val);
}
-void addRootSignature(ArrayRef Elements,
+void addRootSignature(llvm::dxbc::RootSignatureVersion RootSigVer,
+ ArrayRef Elements,
@@ -5188,16 +5191,20 @@ class HLSLRootSignatureDecl final
}
HLSLRootSignatureDecl(DeclContext *DC, SourceLocation Loc, IdentifierInfo
*ID,
+llvm::dxbc::RootSignatureVersion Verison,
bogner wrote:
```suggestion
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/144813
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/145113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9288,6 +9288,23 @@ def fcgl : DXCFlag<"fcgl">, Alias;
def enable_16bit_types : DXCFlag<"enable-16bit-types">,
Alias,
HelpText<"Enable 16-bit types and disable min precision types."
"Available in HLSL 2018 and shader model 6.2.">;
+def hlsl_rootsig_ver :
+ Opt
@@ -99,6 +99,12 @@ enum class SamplerFeedbackType : uint32_t {
const unsigned MinWaveSize = 4;
const unsigned MaxWaveSize = 128;
+// D3D_ROOT_SIGNATURE_VERSION
+enum class RootSignatureVersion {
+ rootsig_1_0 = 0x1,
+ rootsig_1_1 = 0x2,
+};
bogner wrote:
Sh
@@ -5179,6 +5179,8 @@ class HLSLRootSignatureDecl final
llvm::hlsl::rootsig::RootElement> {
friend TrailingObjects;
+ llvm::dxil::RootSignatureVersion RootSigVer;
bogner wrote:
This is a member of a HLSLRootSignatureDecl
https://github.com/bogner commented:
The implementation all looks fairly straightforward here, but shouldn't we be
naming the `clang-dxc` flag to match `dxc`'s flag that does this? That is,
`-force-rootsig-ver`.
https://github.com/llvm/llvm-project/pull/144813
_
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/144813
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl(
SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc,
DeclIdent, Elements);
+ // Perform validation of constructs here
bogner wrote:
I don't think this comment is h
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s
-verify
+
+#define Overlap0 "CBV(b42), CBV(b42)"
+
+[RootSignature(Overlap0)] // expected-error {{resource ranges b[42;42] and
b[42;42] overlap within space = 0 and visibility = All}}
---
@@ -71,13 +71,17 @@ class MetadataBuilder {
SmallVector GeneratedMetadata;
};
-// RangeInfo holds the information to correctly construct a ResourceRange
-// and retains this information to be used for displaying a better diagnostic
struct RangeInfo {
- const static uint32_
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl(
SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc,
DeclIdent, Elements);
+ // Perform validation of constructs here
+ if (handleRootSignatureDecl(SignatureDecl, Loc))
+return
@@ -71,13 +71,17 @@ class MetadataBuilder {
SmallVector GeneratedMetadata;
};
-// RangeInfo holds the information to correctly construct a ResourceRange
-// and retains this information to be used for displaying a better diagnostic
struct RangeInfo {
- const static uint32_
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl(
SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc,
DeclIdent, Elements);
+ // Perform validation of constructs here
+ if (handleRootSignatureDecl(SignatureDecl, Loc))
+return
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl(
SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc,
DeclIdent, Elements);
+ // Perform validation of constructs here
+ if (handleRootSignatureDecl(SignatureDecl, Loc))
+return
https://github.com/bogner commented:
Looks pretty good. Mostly stylistic comments.
https://github.com/llvm/llvm-project/pull/140962
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/140962
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl(
SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc,
DeclIdent, Elements);
+ // Perform validation of constructs here
+ if (handleRootSignatureDecl(SignatureDecl, Loc))
+return
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/140292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -243,7 +243,7 @@ CGHLSLRuntime::getCreateHandleFromBindingIntrinsic() {
case llvm::Triple::dxil:
return std::pair(llvm::Intrinsic::dx_resource_handlefrombinding, true);
case llvm::Triple::spirv:
-return std::pair(llvm::Intrinsic::spv_resource_handlefrombinding, f
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/143412
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/143041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -99,6 +99,128 @@ enum class SamplerFeedbackType : uint32_t {
const unsigned MinWaveSize = 4;
const unsigned MaxWaveSize = 128;
+// Definition of the various d3d12.h enumerations and flags. The definitions of
+// all values here correspond to their description in the d3d12.h
@@ -0,0 +1,96 @@
+# A smoke test to check that a simple dependency chain for modules can work.
+#
+# FIXME: This fails on the Windows ARM64 build server. Not entirely sure why
as it has been tested on
+#an ARM64 Windows VM and appears to work there.
+# UNSUPPORTED: host=a
@@ -0,0 +1,96 @@
+# A smoke test to check that a simple dependency chain for modules can work.
+#
+# FIXME: This fails on the Windows ARM64 build server. Not entirely sure why
as it has been tested on
+#an ARM64 Windows VM and appears to work there.
+# UNSUPPORTED: host=a
https://github.com/bogner approved this pull request.
This makes sense to me. As a follow up, we should look into whether
BinaryFormat/DXContainer.h can get some of these enum values from here rather
than duplicating their values.
https://github.com/llvm/llvm-project/pull/143041
__
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/143041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -99,6 +99,132 @@ enum class SamplerFeedbackType : uint32_t {
const unsigned MinWaveSize = 4;
const unsigned MaxWaveSize = 128;
+// Definition of the various d3d12.h enumerations and flags. The definitions of
+// all values here correspond to their description in the d3d12.h
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -554,6 +554,19 @@ static void initializeBufferFromBinding(CodeGenModule &CGM,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -140,6 +140,11 @@ def SharedVar : SubsetSubjecthasGlobalStorage() && !S->getTLSKind()}],
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?= ,
Nathan =?utf-8?q?Gau=C3=ABr?=
Message-ID:
In-Reply-To:
https://github.com/bogner approved this pull request.
https://github.com/llvm/
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/142010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/140181
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
We don't technically need to remove the `-Wno-implicit-binding` from the tests,
but I suppose you did the work anyway and it doesn't hurt.
https://github.com/llvm/llvm-project/pull/141879
___
cfe-c
https://github.com/bogner approved this pull request.
Looks good (noting that we're matching the pre-existing buggy behaviour of
StructuredBuffer and will follow up to fix that for both)
https://github.com/llvm/llvm-project/pull/141086
___
cfe-commits
@@ -557,29 +553,47 @@ static void initializeBuffer(CodeGenModule &CGM,
llvm::GlobalVariable *GV,
CGM.AddCXXGlobalInit(InitResFunc);
}
-static void initializeBufferFromBinding(CodeGenModule &CGM,
-llvm::GlobalVariable *GV,
-
@@ -557,29 +553,47 @@ static void initializeBuffer(CodeGenModule &CGM,
llvm::GlobalVariable *GV,
CGM.AddCXXGlobalInit(InitResFunc);
}
-static void initializeBufferFromBinding(CodeGenModule &CGM,
-llvm::GlobalVariable *GV,
-
@@ -299,9 +299,20 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
// (llvm/llvm-project#135452)
Value *NonUniform =
llvm::ConstantInt::get(llvm::Type::getInt1Ty(getLLVMContext()), false);
-return Builder.CreateIntrinsic(
-HandleTy
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/139985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
Looks basically good. A question about test coverage below.
https://github.com/llvm/llvm-project/pull/140148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/140148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -346,9 +346,9 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseRootFlagsTest)
{
TEST_F(ParseHLSLRootSignatureTest, ValidParseRootDescriptorsTest) {
const llvm::StringLiteral Source = R"cc(
-CBV(),
-SRV(),
-UAV()
bogner wrote:
Do we have a tes
https://github.com/bogner commented:
We should also add AST tests in clang/test/AST/HLSL/TypedBuffers-AST.hlsl
https://github.com/llvm/llvm-project/pull/141086
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/140315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,17 +1,19 @@
-// RUN: %clang_cc1 -finclude-default-header -triple \
-// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o
- | \
-// RUN: FileCheck %s -DTARGET=dx
-// RUN: %clang_cc1 -finclude-default-header -triple \
-// RUN: spirv-pc-vulkan-com
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/140315
>From e4d7bfd8226d730fc8c12e5af765f22069a0d8bf Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Wed, 7 May 2025 16:11:28 -0700
Subject: [PATCH 1/2] [DirectX][SPIRV] Fix the lowering of dot4add
There were some
@@ -1,17 +1,19 @@
-// RUN: %clang_cc1 -finclude-default-header -triple \
-// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o
- | \
-// RUN: FileCheck %s -DTARGET=dx
-// RUN: %clang_cc1 -finclude-default-header -triple \
-// RUN: spirv-pc-vulkan-com
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/140315
There were some issues with these ops:
- The overload wasn't being specified (`dx.op.dot4AddPacked` vs
`dx.op.dot4AddPacked.i32`)
- The versioning wasn't correct (These ops were added in SM 6.4)
- The argument or
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/140120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -423,6 +437,14 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl
*FD,
// FIXME: Handle codegen for return type semantics.
// See: https://github.com/llvm/llvm-project/issues/57875
B.CreateRetVoid();
+
+ // Add and identify root signature to function, if app
https://github.com/bogner approved this pull request.
Looks good. A couple of style nitpicks.
https://github.com/llvm/llvm-project/pull/139633
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
@@ -160,6 +163,65 @@ void dumpRootElements(raw_ostream &OS,
ArrayRef Elements) {
OS << "}";
}
+MDNode *MetadataBuilder::BuildRootSignature() {
+ for (const RootElement &Element : Elements) {
+MDNode *ElementMD = nullptr;
+if (const auto &Clause = std::get_if(&Eleme
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/139633
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/138429
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3296,27 +3312,42 @@ static bool initVarDeclWithCtor(Sema &S, VarDecl *VD,
return true;
}
-static bool initGlobalResourceDecl(Sema &S, VarDecl *VD) {
+bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) {
+ std::optional RegisterSlot;
+ uint32_t SpaceNo = 0;
HLSLResou
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/138976
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/139842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/138993
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/138964
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/137999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/137877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/137877
>From a6c359a02712277ba2feab9e2f1be1caf8fa650e Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Tue, 29 Apr 2025 11:59:37 -0700
Subject: [PATCH] [HLSL] Overloads for `lerp` with a scalar weight
This adds overl
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/137877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/137898
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/137898
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
> I have a strong suspicion all the `*-overload.hlsl` tests have the same
> mistake and are also incorrect and need to updated. Can you file a ticket for
> investigating\cleaning up the other overload tests. Not work you have to do,
> but we should at least track that it needs ot
@@ -1,108 +1,160 @@
-// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
-// RUN: -DFNATTRS="noundef nofpclass(nan inf)"
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/137985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/137898
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,108 +1,160 @@
-// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
-// RUN: -DFNATTRS="noundef nofpclass(nan inf)"
@@ -106,3 +102,17 @@ float3 test_lerp_uint64_t3(uint64_t3 p0) { return lerp(p0,
p0, p0); }
// CHECK: %hlsl.lerp = call reassoc nnan ninf nsz arcp afn <4 x float>
@llvm.[[TARGET]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x
float> %{{.*}})
// CHECK: ret <4 x floa
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/137898
These tests had checks across multiple functions, because none of the hlsl
header implementation functions were inlined. Switch the run lines to use -O1
instead of -disable-llvm-passes and rewrite the tests to a
@@ -106,3 +102,17 @@ float3 test_lerp_uint64_t3(uint64_t3 p0) { return lerp(p0,
p0, p0); }
// CHECK: %hlsl.lerp = call reassoc nnan ninf nsz arcp afn <4 x float>
@llvm.[[TARGET]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x
float> %{{.*}})
// CHECK: ret <4 x floa
@@ -277,6 +277,12 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
// lerp builtins overloads
//===--===//
+template
+constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector>
-
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/137720
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5209,6 +5211,92 @@ void
Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {
}
}
+void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs)
{
+ assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list");
+ IdentifierInfo *R
@@ -5209,6 +5211,92 @@ void
Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {
}
}
+void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs)
{
+ assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list");
+ IdentifierInfo *R
@@ -5209,6 +5211,92 @@ void
Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {
}
}
+void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs)
{
+ assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list");
+ IdentifierInfo *R
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/137690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner commented:
A couple of minor comments. The direction seems reasonable to me, but it'd be
good to get someone more familiar with the Parser and AST to weigh in.
https://github.com/llvm/llvm-project/pull/137690
___
cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/135120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/137877
This adds overloads for the `lerp` function that accept a scalar for the weight
parameter by splatting it into the appropriate vector.
Fixes #137827
>From 64cc675721623a793d06a1208089dc9431409835 Mon Sep 17 00:
@@ -1,34 +1,117 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -Wno-hlsl-implicit-binding -triple
dxil-pc-shadermodel6.3-library -emit-llvm -disabl
https://github.com/bogner commented:
A minor comment on naming of the builtins but this generally looks good
https://github.com/llvm/llvm-project/pull/135120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
@@ -4801,6 +4801,18 @@ def HLSLResourceGetPointer : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLResourceCreatePoisonHandle : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_resource_createpoisonhandle"];
+ let Attributes = [NoThrow];
+
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/135120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 1015 matches
Mail list logo