https://github.com/bob80905 converted_to_draft
https://github.com/llvm/llvm-project/pull/104239
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/106782
The space parameter in the register binding annotation may not be used for
global constants. There was previously no diagnostic emitted when this case
occurred. This PR adds a diagnostic when this case occurs,
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/106782
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/2] add diag and testing for space and global constants
---
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106782
>From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 30 Aug 2024 12:08:37 -0700
Subject: [PATCH 1/3] add diag and testing for space and global constants
---
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/97505
>From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 2 Jul 2024 18:38:24 -0700
Subject: [PATCH 1/7] if debug exists, go up an extra dir
---
clang-tools-extra/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/97505
>From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 2 Jul 2024 18:38:24 -0700
Subject: [PATCH 1/8] if debug exists, go up an extra dir
---
clang-tools-extra/
@@ -25,17 +25,15 @@ set(assets
)
set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
-set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
set(out_files)
function(copy_files_to_dst src_dir dst_dir file)
set(src "${src_dir}/${file}")
set(dst "${dst_dir}/${file}"
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -0,0 +1,104 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer"
+struct Eg1 {
+ float f;
+ // Buffer Buf;
bob80905 wrote:
Yes, it is intentional. The commented-out examples canno
@@ -0,0 +1,104 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer"
+struct Eg1 {
+ float f;
+ // Buffer Buf;
+ RWBuffer RWBuf;
+ };
+Eg1 e1 : /* register(t0) :*/ register(u0);
+// Valid: f is skip
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -0,0 +1,104 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer"
+struct Eg1 {
+ float f;
+ // Buffer Buf;
bob80905 wrote:
No, it isn't possible, because the tests in udt depend o
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -0,0 +1,104 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer"
+struct Eg1 {
+ float f;
+ // Buffer Buf;
+ RWBuffer RWBuf;
+ };
+Eg1 e1 : /* register(t0) :*/ register(u0);
+// Valid: f is skip
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -470,13 +892,15 @@ void SemaHLSL::handleResourceBindingAttr(Decl *D, const
ParsedAttr &AL) {
// Validate.
if (!Slot.empty()) {
switch (Slot[0]) {
+case 't':
case 'u':
case 'b':
case 's':
-case 't':
+case 'c':
+case 'i':
break;
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/97505
>From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 2 Jul 2024 18:38:24 -0700
Subject: [PATCH 1/9] if debug exists, go up an extra dir
---
clang-tools-extra/
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/97505
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bob80905 wrote:
Closing this PR since https://github.com/llvm/llvm-project/pull/98099 resolves
the issue and has already been merged.
https://github.com/llvm/llvm-project/pull/97505
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -490,34 +490,36 @@ void HLSLExternalSemaSource::defineTrivialHLSLTypes() {
}
/// Set up common members and attributes for buffer types
-static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S,
- ResourceClass R
@@ -12303,7 +12303,10 @@ def err_hlsl_missing_semantic_annotation : Error<
def err_hlsl_init_priority_unsupported : Error<
"initializer priorities are not supported in HLSL">;
-def err_hlsl_unsupported_register_type : Error<"invalid resource class
specifier '%0' used; expec
@@ -0,0 +1,104 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer"
+struct Eg1 {
+ float f;
+ // Buffer Buf;
+ RWBuffer RWBuf;
+ };
+Eg1 e1 : /* register(t0) :*/ register(u0);
+// Valid: f is skip
@@ -437,7 +453,409 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct RegisterBindingFlags {
+ bool Resource = false;
+ bool Udt = false;
+ bool Other = false;
+ bool Basic = false;
+
+ bool Srv = false;
+ bool Uav = f
@@ -635,46 +626,52 @@ RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema
&S, Decl *D) {
} else
r.Other = true;
}
- } else {
-llvm_unreachable("unknown decl type");
}
return r;
}
+int getRegisterTypeIndex(StringRef Slot) {
+ switch (Slot[0])
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/98419
The ability to spell out and specify the resource class is necessary for
testing various resource behaviors. Though it is not intended for users to use
this in customized HLSL source code, the ability to specif
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/98419
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/98419
>From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 10 Jul 2024 17:10:26 -0700
Subject: [PATCH 1/2] split out resource class data from resource attr, add
some
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/98419
>From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 10 Jul 2024 17:10:26 -0700
Subject: [PATCH 1/3] split out resource class data from resource attr, add
some
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/98419
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/98419
>From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 10 Jul 2024 17:10:26 -0700
Subject: [PATCH 1/4] split out resource class data from resource attr, add
some
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
+
+
+// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} <> SRV
+struct [[hlsl::resource_class(SRV)]] Eg1 {
+ int i;
+};
+
+Eg1 e1;
+
+// CHECK: -CXXRecordDecl 0x{
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/98419
>From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 10 Jul 2024 17:10:26 -0700
Subject: [PATCH 1/5] split out resource class data from resource attr, add
some
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/98419
>From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 10 Jul 2024 17:10:26 -0700
Subject: [PATCH 1/6] split out resource class data from resource attr, add
some
@@ -7,7 +7,7 @@ struct [[hlsl::resource_class()]] Eg1 {
Eg1 e1;
-// expected-error@+1{{invalid resource class 'gibberish' used; expected 'SRV',
'UAV', 'CBuffer', or 'Sampler'}}
+// expected-warning@+1{{ResourceClass attribute argument not supported:
gibberish}}
@@ -437,6 +437,33 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
+ if (!AL.isArgIdent(0)) {
+Diag(AL.getLoc(), diag::err_attribute_argument_type)
+
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -o - %s -verify
+
+// expected-error@+1{{'resource_class' attribute takes one argument}}
+struct [[hlsl::resource_class()]] Eg1 {
+ int i;
+};
+
+Eg1 e1;
+
+// expected-error@+1{{invalid resource class
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/98419
>From b740aa9da3baf4fbd32b5a2c59d70bf2f224f700 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 10 Jul 2024 17:10:26 -0700
Subject: [PATCH 1/8] split out resource class data from resource attr, add
some
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/98419
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,9 +1,10 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
-// expected-error@+1 {{invalid resource class specifier 'c' used; expected
'b', 's', 't', or 'u'}}
-float a : register(c0, space1);
+// valid, The register keywor
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/87578
>From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 3 Apr 2024 13:15:59 -0700
Subject: [PATCH 01/12] implement binding type error for t/cbuffers and
rwbuffers
@@ -115,6 +115,30 @@ StringRef Triple::getArchName(ArchType Kind, SubArchType
SubArch) {
if (SubArch == AArch64SubArch_arm64e)
return "arm64e";
break;
+ case Triple::dxil:
+switch (SubArch) {
+case Triple::NoSubArch:
+case Triple::DXILSubArch_v1_0:
+
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/87578
>From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 3 Apr 2024 13:15:59 -0700
Subject: [PATCH 01/13] implement binding type error for t/cbuffers and
rwbuffers
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/90809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/92011
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/101256
>From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 26 Jul 2024 15:41:01 -0700
Subject: [PATCH 1/8] first attempt
---
clang/docs/LanguageExtensions.rst
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/101433
This PR attaches the resource attributes, `HLSLResourceAttr` and
`HLSLResourceClassAttr`, to the handle contained within such resource classes
like `RWBuffer`. CodeGen will now search for fields within HLSL re
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/101433
>From b17ddcc6f2081135125d6178b22d033bcf7c0998 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 31 Jul 2024 17:01:56 -0700
Subject: [PATCH 1/3] add attrs to handle in record decl, add ast dump test to
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/101543
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,10 @@
+; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s
2>&1 | FileCheck %s
+
+; DXIL operation length does not support double overload type
+; CHECK: LLVM ERROR: Invalid Overload
+
+define noundef double @test_length_double2(<2 x double> nou
@@ -280,18 +280,22 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl
*D, GlobalVariable *GV) {
const auto *RD = Ty->getAsCXXRecordDecl();
if (!RD)
return;
- const auto *HLSLResAttr = RD->getAttr();
- const auto *HLSLResClassAttr = RD->getAttr();
- if (!HLSLR
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/101433
>From b17ddcc6f2081135125d6178b22d033bcf7c0998 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 31 Jul 2024 17:01:56 -0700
Subject: [PATCH 1/4] add attrs to handle in record decl, add ast dump test to
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/101433
>From b17ddcc6f2081135125d6178b22d033bcf7c0998 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 31 Jul 2024 17:01:56 -0700
Subject: [PATCH 1/5] add attrs to handle in record decl, add ast dump test to
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/101433
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,10 @@
+; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s
2>&1 | FileCheck %s
+
+; DXIL operation length does not support scalar types
+; CHECK: error: invalid intrinsic signature
+
+define noundef float @test_length_float(float noundef %p0) {
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/101256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 commented:
Other than my nits, looks good to me
https://github.com/llvm/llvm-project/pull/101240
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/101240
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2862,6 +2862,10 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D,
else if (const auto *NT = dyn_cast(Attr))
NewAttr = S.HLSL().mergeNumThreadsAttr(D, *NT, NT->getX(), NT->getY(),
NT->getZ());
+ else if (const auto *NT
@@ -144,6 +145,25 @@ HLSLNumThreadsAttr *SemaHLSL::mergeNumThreadsAttr(Decl *D,
HLSLNumThreadsAttr(getASTContext(), AL, X, Y, Z);
}
+HLSLWaveSizeAttr *SemaHLSL::mergeWaveSizeAttr(Decl *D,
+ const AttributeCommonInfo &AL,
+
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-library -x hlsl -ast-dump -o
- %s | FileCheck %s
+
+// CHECK-LABLE:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> w0 'void ()'
+// CHECK:HLSLWaveSizeAttr 0x{{[0-9a-f]+}} <{{.*}}> 128 0 0
+ [numthreads(8,8,1)]
+ [WaveSize(
@@ -0,0 +1,19 @@
+; RUN: opt -S -dxil-metadata-emit %s | FileCheck %s
+
+target triple = "dxilv1.3-unknown-shadermodel6.3-library"
+
+define void @"?f1@@YAXXZ"() #0 {
+entry:
+ ret void
+}
+
+define void @"?f2@MyNamespace@@YAXXZ"() #0 {
+entry:
+ ret void
+}
+
b
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/101240
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/102275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -916,7 +916,7 @@ float4 lerp(float4, float4, float4);
/// \brief Returns the length of the specified floating-point vector.
/// \param x [in] The vector of floats, or a scalar float.
///
-/// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + �).
+/// Length is
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/102414
Much like #98193, this PR takes some more data out of the resource attribute,
specifically the ROV data.
This PR introduces a new attribute called HLSLROVAttr, which contains data on
whether or not the decl th
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102414
>From c35e4ec3f8ea27eedc0658921d8d9055451acd91 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 7 Aug 2024 19:34:54 -0700
Subject: [PATCH 1/2] split out ROV from resource attr
---
clang/include/clang/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102414
>From c35e4ec3f8ea27eedc0658921d8d9055451acd91 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 7 Aug 2024 19:34:54 -0700
Subject: [PATCH 1/3] split out ROV from resource attr
---
clang/include/clang/
@@ -459,7 +468,407 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD,
// the resource attr could be on the record decl itself or on one of
// its fields (the resource handle, most commonly)
bob80905 wrote:
Yes, I think I may have left support for that
@@ -0,0 +1,76 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// This test validates the diagnostics that are emitted when a variable with a
"resource" type
+// is bound to a register using the register annotation
+
+// expe
@@ -0,0 +1,131 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer", we use a substitute UDT
+// to test the 't' binding type for this test.
+
+template
+struct [[hlsl::resource_class(SRV)]] MyTemplated
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/104239
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/104239
>From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 14 Aug 2024 14:02:22 -0700
Subject: [PATCH 1/3] create texture dimension attr
---
clang/include/clang/Ba
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/104239
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/104239
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
+
+
+// CHECK: -HLSLTextureDimensionAttr 0x{{[0-9a-f]+}} 1
+struct [[hlsl::texture_dimension(1)]] Eg1 {
bob80905 wrote:
Yes, buffer resources won
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/104239
>From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 14 Aug 2024 14:02:22 -0700
Subject: [PATCH 1/4] create texture dimension attr
---
clang/include/clang/Ba
@@ -0,0 +1,71 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// This test validates the diagnostics that are emitted when a variable with a
"resource" type
+// is bound to a register using the register annotation
+
+/*
+tem
@@ -1547,6 +1547,9 @@ def DXILValidation : DiagGroup<"dxil-validation">;
// Warning for HLSL API availability
def HLSLAvailability : DiagGroup<"hlsl-availability">;
+// Warnings for legacy binding behavior
+def DisallowLegacyBindingRules : DiagGroup<"disallow-legacy-binding-ru
@@ -503,9 +503,11 @@ void
HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
Decl = BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "RWBuffer")
.addSimpleTemplateParams(*SemaPtr, {"element_type"})
.Record;
+
onCompletion(Decl, [th
@@ -459,7 +467,412 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,412 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD,
// the resource attr could be on the record decl itself or on one of
// its fields (the resource handle, most commonly)
-const auto *Attr = TheRecordDecl->getAttr();
+const auto *Attr = TheRec
201 - 300 of 603 matches
Mail list logo