@@ -1121,6 +1121,11 @@
CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn,
if (Decls[i])
EmitRuntimeCall(Decls[i]);
+if (getLangOpts().HLSL)
+ if (llvm::Function *ResInitFn =
+ CGM.getHLSLRuntime().createResourceBindingInitFn())
@@ -5622,6 +5622,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl
*D,
getCUDARuntime().handleVarRegistration(D, *GV);
}
+ if (LangOpts.HLSL)
+getHLSLRuntime().handleGlobalVarDefinition(D, GV);
hekota wrote:
Done: https://github.com/m
@@ -28,13 +28,60 @@ class AttributeCommonInfo;
class IdentifierInfo;
class ParsedAttr;
class Scope;
+class VarDecl;
+
+using llvm::dxil::ResourceClass;
// FIXME: This can be hidden (as static function in SemaHLSL.cpp) once we no
// longer need to create builtin buffer types
@@ -28,13 +28,60 @@ class AttributeCommonInfo;
class IdentifierInfo;
class ParsedAttr;
class Scope;
+class VarDecl;
+
+using llvm::dxil::ResourceClass;
// FIXME: This can be hidden (as static function in SemaHLSL.cpp) once we no
// longer need to create builtin buffer types
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/111203
>From f545a14e11556c91d10b14617e3588fe5eae6d42 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 4 Oct 2024 12:21:51 -0700
Subject: [PATCH 1/6] [HLSL] Collect explicit resource binding information
(part 1)
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/111207
>From a13f62d2b5cf1bd1ee7016fce5e0fd95531bf7a2 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 4 Oct 2024 13:19:27 -0700
Subject: [PATCH 1/4] [HLSL] Add handle initialization for simple resource
declarati
@@ -985,88 +1034,85 @@ SemaHLSL::TakeLocForHLSLAttribute(const
HLSLAttributedResourceType *RT) {
return LocInfo;
}
-// get the record decl from a var decl that we expect
-// represents a resource
-static CXXRecordDecl *getRecordDeclFromVarDecl(VarDecl *VD) {
- const Type *
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/111207
>From a13f62d2b5cf1bd1ee7016fce5e0fd95531bf7a2 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 4 Oct 2024 13:19:27 -0700
Subject: [PATCH 1/5] [HLSL] Add handle initialization for simple resource
declarati
https://github.com/hekota approved this pull request.
LGTM, thank you for the fix! Interesting that it fires up, the switch covers
all enum values.
https://github.com/llvm/llvm-project/pull/112767
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/111207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2228,3 +2242,62 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+// Walks though existing explicit bindings, finds the actual resource class
+// decl the binding applies to and sets it to attr->ResourceField.
+// Additional pr
@@ -115,12 +114,14 @@ struct Eg13{
MySRV s1;
MySRV s2;
};
-// expected-warning@+4{{binding type 'u' only applies to types containing UAV
resources}}
// expected-warning@+3{{binding type 'u' only applies to types containing UAV
resources}}
-// expected-warning@+2{{binding
@@ -4493,28 +4493,34 @@ void CXXNameMangler::mangleType(const
ArrayParameterType *T) {
}
void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
- mangleType(T->getWrappedType());
+ llvm::SmallString<64> Str("_Res");
const HLSLAttributedResourceType::Attri
@@ -11533,6 +11539,18 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType
RHS, bool OfBlockPointer,
return {};
return LHS;
}
+ case Type::HLSLAttributedResource: {
+const HLSLAttributedResourceType *LHSTy =
+LHS->castAs();
+const HLSLAttribut
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/111203
>From f545a14e11556c91d10b14617e3588fe5eae6d42 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 4 Oct 2024 12:21:51 -0700
Subject: [PATCH 1/3] [HLSL] Collect explicit resource binding information
(part 1)
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/111203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4588,6 +4588,35 @@ def HLSLResourceBinding: InheritableAttr {
let LangOpts = [HLSL];
let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>];
let Documentation = [HLSLResourceBindingDocs];
+ let AdditionalMembers = [{
+ enum class RegisterType : unsigned
@@ -1135,21 +1147,19 @@ static void ValidateMultipleRegisterAnnotations(Sema
&S, Decl *TheDecl,
RegisterType otherRegType = getRegisterType(attr->getSlot());
if (RegisterTypesDetected[static_cast(otherRegType)]) {
-if (PreviousConflicts[TheDecl].count(othe
@@ -2228,3 +2242,62 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) {
Ty.addRestrict();
return Ty;
}
+
+// Walks though existing explicit bindings, finds the actual resource class
+// decl the binding applies to and sets it to attr->ResourceField.
+// Additional pr
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/111203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/111203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/111203
>From f545a14e11556c91d10b14617e3588fe5eae6d42 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 4 Oct 2024 12:21:51 -0700
Subject: [PATCH 1/4] [HLSL] Collect explicit resource binding information
(part 1)
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113206
>From ae8b3c909231915f87631665b06321a9f9baff33 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Mon, 21 Oct 2024 12:17:58 -0700
Subject: [PATCH 1/2] [HLSL][NFC] Move IsIntangibleType from SemaHLSL to Type
to ma
@@ -5030,6 +5030,29 @@ bool Type::hasSizedVLAType() const {
return false;
}
+bool Type::isHLSLIntangibleType() const {
+ const Type *Ty = getUnqualifiedDesugaredType();
+
+ // check if it's a builtin type first (simple check, no need to cache it)
hekota wr
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/113206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/113397
Changes `StructuredBuffer` resource class to SRV (read-only) according to
existing [DXC](https://godbolt.org/z/EjY9jbv4W) implementation and [Proposal
for mapping resource attributes](https://github.com/llvm/wg-
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113397
>From 7e7812cff9c1d82c8402e840975e3fc5fd726001 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 22 Oct 2024 16:18:24 -0700
Subject: [PATCH 1/2] [HLSL] Update resource class of StructuredBuffer to SRV
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/110327
>From 4f235c0e9c539cdaa2bab9a7f8228f33c0fea2b8 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 26 Sep 2024 14:34:16 -0700
Subject: [PATCH 1/9] Add codegen for existing resource types and make
HLSLAttribut
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113643
>From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 20:32:28 -0700
Subject: [PATCH 1/2] [HLSL] Add AppendStructuredBuffer and
ConsumeStructuredBuffer
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/113648
Adds `RasterizerOrderedStructuredBuffer` definition to HLSLExternalSemaSource.
Adds separate tests for the AST shape and element types. Adds
constructor/handle.fromBinding and subscript test cases to shared test
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/113648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/113649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/113649
None
>From 0dbe1b5888b93d6996e89351617e027d6828 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 21:27:07 -0700
Subject: [PATCH] [HLSL][NFC] Cleanup - removed unused includes and param, fix
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{/s}}StructuredBuffer
hekota wrote:
"/s" is a space in the flavor of reg
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/113477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
+
+// NOTE: The number in type name and whether the struct is packed or not will
mostly
+// likely change once subscript oper
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
+
+// NOTE: The number in type name and whether the struct is packed or not will
mostly
+// likely change once subscript oper
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/114139
UAVs and SRVs have already been converted to use LLVM target types and we can
disable generating of the !hlsl.uavs and !hlsl.srvs! annotations. This will
enable adding tests for structured buffers with user defi
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/114148
Introduces `__builtin_hlsl_buffer_update_counter` clang buildin that is used to
implement the `IncrementCounter` and `DecrementCounter` methods on
`RWStructuredBuffer` and `RasterizerOrderedStructuredBuffer` (se
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota approved this pull request.
LGTM! Please add a note to the PR description about why is are you changing
atan2 to erff in clang/test/CodeGenCXX/builtin-calling-conv.cpp.
https://github.com/llvm/llvm-project/pull/113636
___
cfe
https://github.com/hekota commented:
LGTM!
https://github.com/llvm/llvm-project/pull/114273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113643
>From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 20:32:28 -0700
Subject: [PATCH 1/5] [HLSL] Add AppendStructuredBuffer and
ConsumeStructuredBuffer
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113648
>From b8a47223444e72f2a6759178de15f6d1a13dff99 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 21:22:32 -0700
Subject: [PATCH 1/5] [HLSL] Add RasterizerOrderedStructuredBuffer definition
to HL
@@ -4846,7 +4846,6 @@ def HLSLSaturate : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
-
hekota wrote:
This is intentional - I'm removing an extra empty line.
https://github.com/llvm/llvm-project/pull/114148
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/114148
>From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 29 Oct 2024 16:02:26 -0700
Subject: [PATCH 1/5] [HLSL] Add Increment/DecrementCounter methods to
structured b
https://github.com/hekota approved this pull request.
https://github.com/llvm/llvm-project/pull/115045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -559,7 +559,7 @@ class CompilerInstance : public ModuleLoader {
bool hasSema() const { return (bool)TheSema; }
Sema &getSema() const {
-assert(TheSema && "Compiler instance has no Sema object!");
hekota wrote:
Oops, this should not be there! :)
ht
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113648
>From b8a47223444e72f2a6759178de15f6d1a13dff99 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 21:22:32 -0700
Subject: [PATCH 1/6] [HLSL] Add RasterizerOrderedStructuredBuffer definition
to HL
hekota wrote:
Since your PR that adds `__builtin_hlsl_is_typed_resource_element_compatible`
is merged do you want to incorporate here?
https://github.com/llvm/llvm-project/pull/112600
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
@@ -483,10 +581,105 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S, RC);
}
+BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context,
+ SourceLocation NameLoc,
+
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota requested changes to this pull request.
If you are going to store `isHLSLLineVectorLayoutCompatibleType` on a
declaration you need to modify addMember to analyze newly added members. Then
move the IsLineVectorLayoutCompatibleType implementation from SemaHLSL to Type
a
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/114139
>From f9b74fe0a9631a01edbad1e8c8e02ca05e3ee0ee Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 29 Oct 2024 15:22:27 -0700
Subject: [PATCH 1/3] [HLSL] Remove old resource annotations for UAVs and SRVs
UAVs
@@ -253,4 +253,9 @@ FIELD(IsAnyDestructorNoReturn, 1, NO_MERGE)
/// type that is intangible). HLSL only.
FIELD(IsHLSLIntangible, 1, NO_MERGE)
+/// Whether the record type is line vector layout compatible (that is,
+/// it has at most 4 elements, does not exceed 16 bytes, is ho
@@ -2163,6 +2163,51 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
}
+bool SemaHLSL::IsLineVectorLayoutCompatibleType(clang::QualType QT) {
+ if (QT.isNull())
+return false;
+
+ llvm::SmallVector QTTypes;
+ BuildFlattenedTypeList(QT, QTTypes);
+
+ assert(QT
@@ -2163,6 +2163,51 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
}
+bool SemaHLSL::IsLineVectorLayoutCompatibleType(clang::QualType QT) {
+ if (QT.isNull())
+return false;
+
+ llvm::SmallVector QTTypes;
+ BuildFlattenedTypeList(QT, QTTypes);
--
@@ -8459,6 +8460,12 @@ inline bool Type::isHLSLBuiltinIntangibleType() const {
false;
}
+inline bool Type::isHLSLLineVectorLayoutCompatibleType() const {
+#define HLSL_LINE_VECTOR_LAYOUT_COMPATIBLE_TYPE(Name, Id, SingletonId)
\
+ is##Id##Type() ||
+ return isH
@@ -2163,6 +2163,51 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
}
+bool SemaHLSL::IsLineVectorLayoutCompatibleType(clang::QualType QT) {
+ if (QT.isNull())
+return false;
+
+ llvm::SmallVector QTTypes;
+ BuildFlattenedTypeList(QT, QTTypes);
+
+ assert(QT
hekota wrote:
LGTM! I'm not familiar with the SPIR-V side though.
https://github.com/llvm/llvm-project/pull/112400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -483,10 +582,101 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S, RC);
}
+BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context,
+ SourceLocation NameLoc,
+
@@ -323,30 +324,99 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename */
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113648
>From b8a47223444e72f2a6759178de15f6d1a13dff99 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 21:22:32 -0700
Subject: [PATCH 1/2] [HLSL] Add RasterizerOrderedStructuredBuffer definition
to HL
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/114139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113643
>From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 20:32:28 -0700
Subject: [PATCH 1/3] [HLSL] Add AppendStructuredBuffer and
ConsumeStructuredBuffer
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/112400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/112400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/113477
Add tests for RWStructuredBuffer class definition. Use shared test files for
all structured buffers' constructor and subscript tests. Keep AST and
element-type tests separate for each buffer type because they lo
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
+
+// NOTE: The number in type name and whether the struct is packed or not will
mostly
+// likely change once subscript oper
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113643
>From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 20:32:28 -0700
Subject: [PATCH 1/6] [HLSL] Add AppendStructuredBuffer and
ConsumeStructuredBuffer
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113643
>From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 20:32:28 -0700
Subject: [PATCH 1/7] [HLSL] Add AppendStructuredBuffer and
ConsumeStructuredBuffer
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4883,6 +4882,12 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLBufferUpdateCounter : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_buffer_update_counter"];
+ let Attributes = [NoThrow];
+ let Prototype = "uint32
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113477
>From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Wed, 23 Oct 2024 10:29:44 -0700
Subject: [PATCH 1/5] [HLSL] Add RWStructuredBuffer definition to
HLSLExternalSemaS
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113477
>From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Wed, 23 Oct 2024 10:29:44 -0700
Subject: [PATCH 1/4] [HLSL] Add RWStructuredBuffer definition to
HLSLExternalSemaS
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113477
>From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Wed, 23 Oct 2024 10:29:44 -0700
Subject: [PATCH 1/3] [HLSL] Add RWStructuredBuffer definition to
HLSLExternalSemaS
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/113397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{^\W}}StructuredBuffer
hekota wrote:
Thanks Tex! I forgot `^` has differ
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
+
+// NOTE: The number in type name and whether the struct is packed or not will
mostly
+// likely change once subscript oper
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/113643
Adds AppendStructuredBuffer and ConsumeStructuredBuffer to
HLSLExternalSemaSource. Adds separate tests for the AST shape and element
types, and adds constructor/handle.fromBinding test case to shared test file
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/113649
>From 0dbe1b5888b93d6996e89351617e027d6828 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 24 Oct 2024 21:27:07 -0700
Subject: [PATCH 1/2] [HLSL][NFC] Cleanup - removed unused includes and param,
fix
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{/s}}StructuredBuffer
hekota wrote:
I've update it to use `{^\W}}`.
htt
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{/s}}StructuredBuffer
hekota wrote:
This ensures that we match Structure
@@ -4,21 +4,30 @@
// NOTE: SPIRV codegen for resource types is not yet implemented
StructuredBuffer Buf : register(t10);
+RWStructuredBuffer Buf2 : register(u5, space1);
// CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer",
float, 0, 0), float }
+// CHE
@@ -2163,6 +2163,51 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
}
+bool SemaHLSL::IsLineVectorLayoutCompatibleType(clang::QualType QT) {
+ if (QT.isNull())
+return false;
+
+ llvm::SmallVector QTTypes;
+ BuildFlattenedTypeList(QT, QTTypes);
--
hekota wrote:
> If you are going to store `isHLSLLineVectorLayoutCompatibleType` on a
> declaration you need to modify addMember to analyze newly added members. Then
> move the IsLineVectorLayoutCompatibleType implementation from SemaHLSL to
> Type and use the bit on the record type decl inste
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/114148
>From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 29 Oct 2024 16:02:26 -0700
Subject: [PATCH 1/2] [HLSL] Add Increment/DecrementCounter methods to
structured b
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/114148
>From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 29 Oct 2024 16:02:26 -0700
Subject: [PATCH 1/2] [HLSL] Add Increment/DecrementCounter methods to
structured b
https://github.com/hekota approved this pull request.
LGTM! Please remove the whitespace-only change in
clang/include/clang/AST/Type.h.
https://github.com/llvm/llvm-project/pull/113730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder {
return Builder;
}
};
+
+// Builder for methods of builtin types. Allows adding methods to builtin types
+// using the builder pattern like this:
+//
+// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
401 - 500 of 862 matches
Mail list logo