@@ -44,7 +42,10 @@ foreach(f ${assets})
install(FILES ${asset_dir}/${f}
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc"
COMPONENT clang-doc)
- copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
+ foreach(config ${CMAKE_CONFIGURATION_TYPES})
bob8
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/102683
This PR adds the normalize intrinsic and an HLSL function that uses it.
The SPIRV backend is also implemented.
Used https://github.com/llvm/llvm-project/pull/101256 as a reference, along
with https://github.co
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 1/5] suboptimal expansion of normalize done
---
clang/include/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 1/6] suboptimal expansion of normalize done
---
clang/include/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 1/7] suboptimal expansion of normalize done
---
clang/include/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 1/8] suboptimal expansion of normalize done
---
clang/include/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From 547b4da91b20811db156a8c73fcb2f381cfed7bd Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 1/8] suboptimal expansion of normalize done
---
clang/include/
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/4] split out ROV from resource attr
---
clang/include/clang/
@@ -4725,6 +4725,12 @@ def HLSLMad : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLNormalize : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_normalize"];
bob80905 wrote:
I don't believe normalize is an elementwise opera
@@ -18584,6 +18584,29 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
CGM.getHLSLRuntime().getLengthIntrinsic(), ArrayRef{X},
nullptr, "hlsl.length");
}
+ case Builtin::BI__builtin_hlsl_normalize: {
+Value *X = EmitScalarExpr(E->getArg
@@ -229,6 +230,75 @@ static bool expandLog10Intrinsic(CallInst *Orig) {
return expandLogIntrinsic(Orig, numbers::ln2f / numbers::ln10f);
}
+static bool expandNormalizeIntrinsic(CallInst *Orig) {
+ Value *X = Orig->getOperand(0);
+ Type *Ty = Orig->getType();
+ Type *EltTy
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From 547b4da91b20811db156a8c73fcb2f381cfed7bd Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 1/9] suboptimal expansion of normalize done
---
clang/include/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/102683
>From 547b4da91b20811db156a8c73fcb2f381cfed7bd Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 9 Aug 2024 10:48:10 -0700
Subject: [PATCH 01/11] suboptimal expansion of normalize done
---
clang/includ
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/5] 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/6] split out ROV from resource attr
---
clang/include/clang/
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/102683
___
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/103489
>From bb704124a6aa45fa733347ef24b5f9b462567b92 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 13 Aug 2024 17:06:28 -0700
Subject: [PATCH 1/2] remove unused var, and unneeded extract element
---
llvm
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/102414
___
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/104239
This PR creates a new attribute in HLSL, "TextureDimension", which specifies
the dimension of a specific texture resource.
This PR is another necessary part of completing
https://github.com/llvm/llvm-project/
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/2] create texture dimension attr
---
clang/include/clang/Ba
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/103489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bob80905 wrote:
> What is this attribute supposed to mean? I think we need some design here
> before we create the attribute, as it isn't clear to me that a single integer
> covers our needs. The texture kinds that need to be representable by this and
> whatever other attributes we design are
@@ -459,7 +467,506 @@ 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,506 @@ 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,506 @@ 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,506 @@ 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,506 @@ 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,506 @@ 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,506 @@ 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 {
@@ -492,14 +999,21 @@ void SemaHLSL::handleResourceBindingAttr(Decl *D, const
ParsedAttr &AL) {
// Validate.
if (!Slot.empty()) {
switch (Slot[0]) {
bob80905 wrote:
I've cleaned up a bit, and realized I no longer needed to pass `Slot`, when I
could j
@@ -459,7 +467,506 @@ 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 {
bob80905 wrote:
I've created an issue here to test the space parameter:
https://github.com/llvm/llvm-project/issues/104521
https://github.com/llvm/llvm-project/pull/97103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
@@ -459,7 +467,506 @@ 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 {
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 1/2] implement binding type error for t/cbuffers and rwbuffers
-
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 1/3] implement binding type error for t/cbuffers and rwbuffers
-
@@ -119,8 +119,10 @@ struct BuiltinTypeDeclBuilder {
ResourceKind RK, bool IsROV) {
if (Record->isCompleteDefinition())
return *this;
-Record->addAttr(HLSLResourceAttr::CreateImplicit(Record->getASTContext(),
-
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 1/4] implement binding type error for t/cbuffers and rwbuffers
-
bob80905 wrote:
Should a test be added when the return type is a different float type than the
first arg type?
https://github.com/llvm/llvm-project/pull/94559
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
@@ -2923,6 +2923,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
SetSqrtFPAccuracy(Call);
return RValue::get(Call);
}
+
+case Builtin::BItan:
bob80905 wrote:
What is the difference between `BItanf` an
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/14] implement binding type error for t/cbuffers and
rwbuffers
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/15] implement binding type error for t/cbuffers and
rwbuffers
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/15] implement binding type error for t/cbuffers and
rwbuffers
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/96346
`MaybeParseHLSLAnnotations` should be run on Field Decls instead of just
assuming that any colon after a field decl is a bitfield. In the case that HLSL
is the language, the code after the colon may be an annot
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// previously, this test would result in an error shown below on the line that
+// declares variable a in struct Eg9:
+// error: use of undeclared identifier
+// 'SV_Dispat
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/96346
___
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/96346
>From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Fri, 21 Jun 2024 11:25:22 -0700
Subject: [PATCH 1/2] parse hlsl annotations on struct, add test
---
clang/lib/
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
bob80905 wrote:
There are currently no candidate attributes that have subjects that are field
decls other than SV_DispatchThreadID. In other words, SV_DispatchTh
@@ -482,15 +484,18 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
bool IsROV) {
return BuiltinTypeDeclBuilder(Decl)
.addHandleMember()
- .addDefaultHandleConstructor(S, RC)
- .annot
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 1/5] implement binding type error for t/cbuffers and rwbuffers
-
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 1/5] implement binding type error for t/cbuffers and rwbuffers
-
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/89309
The attribute name "HLSLSemantics" is confusing, because semantics aren't
always the annotation that are applied to specific variables. The name for this
attribute needs to be less specific. This PR changes the
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 1/6] implement binding type error for t/cbuffers and rwbuffers
-
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/89309
>From 58f7f1c7f99f29fea39b5bd83bb74d3770a6f985 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Thu, 18 Apr 2024 13:38:51 -0700
Subject: [PATCH 1/2] rename hlsl semantics to hlsl annotations
---
clang/inclu
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 1/7] implement binding type error for t/cbuffers and rwbuffers
-
https://github.com/bob80905 converted_to_draft
https://github.com/llvm/llvm-project/pull/86175
___
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/101256
This PR adds the length intrinsic and an HLSL function that uses it.
The SPIRV implementation is left for a future PR.
Fixes #99134
>From 7027cf254ae1b6acfdfbbf5dbeda3c4d6a4b3c43 Mon Sep 17 00:00:00 2001
From:
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/2] first attempt
---
clang/docs/LanguageExtensions.rst
@@ -249,6 +249,7 @@ DWARF Support in Clang
Floating Point Support in Clang
---
+- Add ``__builtin_elementwise_length``builtin for floating point types only.
bob80905 wrote:
Ah, this was a habit that seems to no longer be justified.
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
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
/*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(),
ArrayRef{X, Y, S}, nullptr, "hlsl.lerp");
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
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/4] first attempt
---
clang/docs/LanguageExtensions.rst
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
/*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(),
ArrayRef{X, Y, S}, nullptr, "hlsl.lerp");
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
@@ -1079,6 +1079,28 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
+if (SemaRef.checkArgCount(TheCall, 1))
+ return true;
+if (SemaRef.Pr
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
/*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(),
ArrayRef{X, Y, S}, nullptr, "hlsl.lerp");
}
+ case Builtin::BI__builtin_hlsl_elementwise_length: {
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
--check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+sou
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/5] first attempt
---
clang/docs/LanguageExtensions.rst
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/6] first attempt
---
clang/docs/LanguageExtensions.rst
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/7] first attempt
---
clang/docs/LanguageExtensions.rst
@@ -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
@@ -459,7 +467,475 @@ 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 {
bob80905 wrote:
Just an FYI, the syntax for adding a resource_class attribute as currently
implemented looks like this:
`[[hlsl::resource_class(SRV)]]`
In your description, you may want to update this and other similar attributes.
https://github.com/llvm/llvm-project/pull/97362
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/89309
___
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/87578
>From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 3 Apr 2024 13:15:59 -0700
Subject: [PATCH 1/8] implement binding type error for t/cbuffers and rwbuffers
-
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
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 1/9] implement binding type error for t/cbuffers and rwbuffers
-
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -12154,6 +12154,8 @@ def err_hlsl_missing_semantic_annotation : Error<
def err_hlsl_init_priority_unsupported : Error<
"initializer priorities are not supported in HLSL">;
+def err_hlsl_mismatching_register_resource_type_and_name: Error<"invalid
register name prefix '%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/10] implement binding type error for t/cbuffers and
rwbuffers
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/11] implement binding type error for t/cbuffers and
rwbuffers
@@ -44,7 +44,7 @@ void foo2() {
// expected-warning@+1 {{'register' attribute only applies to
cbuffer/tbuffer and external global variables}}
extern RWBuffer U2 : register(u5);
}
-// FIXME: expect-error once fix
https://github.com/llvm/llvm-project/issues/57886.
+// expec
@@ -44,7 +44,7 @@ void foo2() {
// expected-warning@+1 {{'register' attribute only applies to
cbuffer/tbuffer and external global variables}}
extern RWBuffer U2 : register(u5);
}
-// FIXME: expect-error once fix
https://github.com/llvm/llvm-project/issues/57886.
+// expec
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/105907
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6067,6 +6082,9 @@ namespace {
void VisitBTFTagAttributedTypeLoc(BTFTagAttributedTypeLoc TL) {
// nothing
}
+void VisitHLSLResourcedAttributedTypeLoc(HLSLAttributedResourceTypeLoc TL)
{
bob80905 wrote:
I am unsure if this function is name
@@ -8803,6 +8821,12 @@ static void processTypeAttrs(TypeProcessingState &state,
QualType &type,
attr.setUsedAsTypeAttr();
break;
}
+case ParsedAttr::AT_HLSLResourceClass:
bob80905 wrote:
Could you add a TODO to add more cases for the attri
@@ -799,6 +799,19 @@ static bool
IsEquivalentExceptionSpec(StructuralEquivalenceContext &Context,
return true;
}
+// Determine structural equivalence of two instances of
+// HLSLAttributedResourceType::Attributes
+static bool
+IsStructurallyEquivalent(StructuralEquivalenceC
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/106181
___
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/106181
___
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/106316
This PR adds `StructuredBuffer` to `HLSLExternalSemaSource.cpp`, by copying the
logic from RWBuffer but just replacing the name with StructuredBuffer. The
change now allows StructuredBuffers to be defined in H
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106316
>From 7089ee170132c4a7529f6729919641f1db462566 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 27 Aug 2024 17:26:58 -0700
Subject: [PATCH] add StructuredBuffer to hlsl external sema source
---
clang/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106316
>From 7089ee170132c4a7529f6729919641f1db462566 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 27 Aug 2024 17:26:58 -0700
Subject: [PATCH] add StructuredBuffer to hlsl external sema source
---
clang/
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/106316
>From 7089ee170132c4a7529f6729919641f1db462566 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 27 Aug 2024 17:26:58 -0700
Subject: [PATCH 1/2] add StructuredBuffer to hlsl external sema source
---
cl
https://github.com/bob80905 ready_for_review
https://github.com/llvm/llvm-project/pull/106316
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,103 @@
+// 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 created
https://github.com/llvm/llvm-project/pull/106471
This PR adds the step intrinsic and an HLSL function that uses it.
The SPIRV backend is also implemented.
Used https://github.com/llvm/llvm-project/pull/102683 as a reference.
Fixes https://github.com/llvm/llvm
101 - 200 of 563 matches
Mail list logo