[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-08-29 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/156075 >From cfaf08898c046baaa41cb1cbe75ed9682da8bc1f Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 29 Aug 2025 13:40:55 -0400 Subject: [PATCH 1/2] [HLSL] Add copy assignment and construtor to resource type

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-08-29 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/156075 The wrapper used to hold the handle for resource type has just the default copy constructor and assignment operator. This causes clang to insert memcpys when it does an assignment of a resource type. The memcpy

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-29 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/155664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/155664 >From 95b0e22f32c62e973749d25286079515ba94e6ab Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 26 Aug 2025 13:12:42 -0400 Subject: [PATCH 1/2] [HLSL][SPIRV] Add -fhlsl-spv-use-unknown-image-format opti

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/155664 >From 95b0e22f32c62e973749d25286079515ba94e6ab Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 26 Aug 2025 13:12:42 -0400 Subject: [PATCH] [HLSL][SPIRV] Add -fhlsl-spv-use-unknown-image-format option T

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/155664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DirectX] Remove uniformity bit from resource initialization intrinsics (PR #155332)

2025-08-26 Thread Steven Perron via cfe-commits
s-perron wrote: This test is specifically looking for the bit you are removing to make sure that the correct capabilities are emitted. In this case, we expect the `StorageImageArrayNonUniformIndexing` to be emitted. This test should probably be XFAIL until th

[clang] [llvm] [HLSL][DirectX] Remove uniformity bit from resource initialization intrinsics (PR #155332)

2025-08-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: You will have to update the spir-v backend. We use that bit determine which capabilities are required. See https://github.com/llvm/llvm-project/blob/5d4aa87ca5176a54b8395141df565255e3fde9ed/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp#L4279 I would

[clang] [llvm] [HLSL][DirectX] Remove uniformity bit from resource initialization intrinsics (PR #155332)

2025-08-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/155332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Codegen for indexing of sub-arrays of multi-dimensional resource arrays (PR #154248)

2025-08-25 Thread Steven Perron via cfe-commits
@@ -190,6 +192,71 @@ static void createResourceCtorArgs(CodeGenModule &CGM, CXXConstructorDecl *CD, Args.add(RValue::get(NameStr), AST.getPointerType(AST.CharTy.withConst())); } +// Initializes local resource array variable. For multi-dimensional arrays it +// calls itself

[clang] [HLSL] Codegen for indexing of sub-arrays of multi-dimensional resource arrays (PR #154248)

2025-08-25 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/154248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/151554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 01/12] [SPIRV][HLSL] Add DXC compatibility option for extension

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron auto_merge_enabled https://github.com/llvm/llvm-project/pull/151554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 01/11] [SPIRV][HLSL] Add DXC compatibility option for extension

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 01/10] [SPIRV][HLSL] Add DXC compatibility option for extension

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -118,6 +118,48 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg)); } +Parser::ParsedSemantic Parser::ParseHLSLSemantic() { + assert(Tok.is(tok::identifier) && "Not a

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -118,6 +118,48 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg)); } +Parser::ParsedSemantic Parser::ParseHLSLSemantic() { + assert(Tok.is(tok::identifier) && "Not a

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -838,8 +854,6 @@ void SemaHLSL::CheckSemanticAnnotation( DiagnoseAttrStageMismatch(AnnotationAttr, ST, {llvm::Triple::Compute}); break; case attr::HLSLSV_Position: -// TODO(#143523): allow use on other shader types & output once the overall -// semantic log

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: My only concern is that the parser does not allow digits in the middle of the semantic name. I believe that is possible for user semantics. It works for DXC. Otherwise LGTM. https://github.com/llvm/llvm-project/pull/152537

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/152537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -118,6 +118,48 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg)); } +Parser::ParsedSemantic Parser::ParseHLSLSemantic() { + assert(Tok.is(tok::identifier) && "Not a

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -118,6 +118,48 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg)); } +Parser::ParsedSemantic Parser::ParseHLSLSemantic() { + assert(Tok.is(tok::identifier) && "Not a

[clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-18 Thread Steven Perron via cfe-commits
s-perron wrote: Should this have a case where just the space is specified? ``` RWBuffer E[15] : register(space2); ``` https://github.com/llvm/llvm-project/pull/152454 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/152454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: LGTM, just a suggestion for another test. https://github.com/llvm/llvm-project/pull/152454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -42,5 +44,15 @@ struct S { }; RWStructuredBuffer T3S0 : register(u3); +// Resource array elements are initialized on access; make sure there is not call +// to initialize RWBuffer. s-perron wrote: ```suggestion // Resource array elements are initialized o

[clang] [HLSL][SPIRV] Add vk::binding attribute (PR #150957)

2025-08-05 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/150957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add support for fixed-size global resource arrays (PR #152209)

2025-08-05 Thread Steven Perron via cfe-commits
s-perron wrote: I'll see what I can do. I'm on vacation right now. I need to make the change you suggested https://github.com/llvm/llvm-project/pull/152209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-01 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/8] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-01 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/7] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-01 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/6] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-01 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/5] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-01 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/4] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-08-01 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/3] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-07-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/151554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-07-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/151554 >From 900c99b8b3f317adcb8d897dbdc5f90fb91b4ddf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 31 Jul 2025 12:16:43 -0400 Subject: [PATCH 1/2] [SPIRV][HLSL] Add DXC compatibility option for extension T

[clang] [HLSL][SPIRV] Add vk::binding attribute (PR #150957)

2025-07-31 Thread Steven Perron via cfe-commits
@@ -4894,6 +4894,14 @@ def HLSLSV_GroupIndex: HLSLAnnotationAttr { let Documentation = [HLSLSV_GroupIndexDocs]; } +def HLSLVkBinding : InheritableAttr { + let Spellings = [CXX11<"vk", "binding">]; + let Subjects = SubjectList<[HLSLBufferObj, ExternalGlobalVar], ErrorDiag>;

[clang] [llvm] [SPIRV][HLSL] Add DXC compatibility option for extension (PR #151554)

2025-07-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/151554 The default behaviour in DXC is to allow all extesions the compiler knows about. We did the same in clang: all extensions that clang knows about. However, this causes the shader to use different extensions becau

[clang] [HLSL][SPIRV] Add vk::binding attribute (PR #150957)

2025-07-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/150957 The vk::binding attribute allows users to explicitly set the set and binding for a resource in SPIR-V without chaning the "register" attribute, which will be used when targeting DXIL. Fixes https://github.com/l

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Steven Perron via cfe-commits
https://github.com/s-perron 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

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-07-02 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-07-02 Thread Steven Perron via cfe-commits
s-perron wrote: The failing spir-v test is caused by an update to spir-val (https://github.com/KhronosGroup/SPIRV-Tools/pull/6184), and is unrelated to this change. https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-com

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-07-02 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/5] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-07-02 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/4] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-07-02 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/4] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-07-02 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/3] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [HLSL] Remove dead code in Type.cpp [NFC] (PR #146365)

2025-06-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/146365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Remove dead code in Type.cpp [NFC] (PR #146365)

2025-06-30 Thread Steven Perron via cfe-commits
s-perron wrote: The test failures are unrelated to this change. https://github.com/llvm/llvm-project/pull/146365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-06-30 Thread Steven Perron via cfe-commits
@@ -4855,6 +4857,17 @@ LinkageInfo LinkageComputer::computeTypeLinkageInfo(const Type *T) { return computeTypeLinkageInfo(cast(T) ->getContainedType() ->getCanonicalTypeInternal()); + case Type::H

[clang] [HLSL] Remove dead code in Type.cpp [NFC] (PR #146365)

2025-06-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/146365 In a case statement for Type::HLSLInlineSpirv, the first statment returns, and the remaining statement are never executed. This removes the dead code. https://github.com/llvm/llvm-project/pull/134034/files/7d8e

[clang] [HLSL][SPIRV] Add option to add all KHR extensions (PR #145536)

2025-06-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/145536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Add option to add all KHR extensions (PR #145536)

2025-06-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/145536 >From af0773cd9677d90d2fe2466fa113d70983fc2c32 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 24 Jun 2025 11:41:12 -0400 Subject: [PATCH 1/2] [HLSL][SPIRV] Add option to add all KHR extensions In DXC,

[clang] [HLSL][SPIRV] Handle `uint` type for spec constant (PR #145577)

2025-06-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/145577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add option for VK layouts (PR #145327)

2025-06-25 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/145327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-06-25 Thread Steven Perron via cfe-commits
@@ -4855,6 +4857,17 @@ LinkageInfo LinkageComputer::computeTypeLinkageInfo(const Type *T) { return computeTypeLinkageInfo(cast(T) ->getContainedType() ->getCanonicalTypeInternal()); + case Type::H

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-25 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/3] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-25 Thread Steven Perron via cfe-commits
s-perron wrote: @michalpaszkowski The SPIR-V backend meeting was canceled, so we won't be able to talk about this there. Do you have any feedback? https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL][SPIRV] Handle `uint` type for spec constant (PR #145577)

2025-06-24 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/145577 The testing only tried `unsigned int` and not `uint`. We want to correctly handle these surgared types as specialization constants. >From 2bed922b3bd084fa43c8dc1843fb5bf67731e5ab Mon Sep 17 00:00:00 2001 From:

[clang] [HLSL][SPIRV] Handle `uint` type for spec constant (PR #145577)

2025-06-24 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/145577 >From 44cb96a30dc3b2b28449661a52ac5a73c63e2139 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 24 Jun 2025 15:44:10 -0400 Subject: [PATCH] [HLSL][SPIRV] Handle `uint` type for spec constant The testing

[clang] [HLSL][SPIRV] Add option to add all KHR extensions (PR #145536)

2025-06-24 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/145536 In DXC, there is an option to enable all KHR extension. This is added by passing the KHR option to the SPIR-V backend, which will enable all of the appropriate extensions. Part of https://github.com/llvm/llvm-p

[clang] [HLSL] Add option for VK layouts (PR #145327)

2025-06-24 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/145327 >From 43f9f0e69c121c25f0519340f2aaa236f9820cba Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 19 Jun 2025 14:27:46 -0400 Subject: [PATCH] [HLSL] Add option for VK layouts We add the options to the dri

[clang] [HLSL] Don't use CreateRuntimeFunction for intrinsics (PR #145334)

2025-06-23 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/145334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

2025-06-23 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/144934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add option for VK layouts (PR #145327)

2025-06-23 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/145327 We add the options to the driver, so that the one option that is being implemented at this time can be used. Issue an error for the other options. When we start to implement the other options, we will have to f

[clang] scalar layout (PR #145063)

2025-06-20 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/145063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Boolean in a RawBuffer should be i32 and Boolean vector in a RawBuffer should be (PR #144929)

2025-06-20 Thread Steven Perron via cfe-commits
https://github.com/s-perron 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

[clang] scalar layout (PR #145063)

2025-06-20 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/145063 - **[HLSL][SPIRV] Allow large z value in numthreads** - **Implement DXC layout cli options.** - **[HLSL] Add option for VK layouts** >From 0b809d5a51a76ef76a68574b8dc447de10d4654a Mon Sep 17 00:00:00 2001 From

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-20 Thread Steven Perron via cfe-commits
s-perron wrote: @michalpaszkowski Any problems with me creating the new parallel type `spirv.SignedImage`? https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

2025-06-20 Thread Steven Perron via cfe-commits
@@ -1033,12 +1033,15 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) { void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) { llvm::VersionTuple SMVersion = getASTContext().getTargetInfo().getTriple().getOSVersion(); + bool IsDXI

[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/144934 The current validation checks for numthreads assume that the target is DXIL so the version checks inadvertently issue error when targeting SPIR-V. >From 0b809d5a51a76ef76a68574b8dc447de10d4654a Mon Sep 17 00:0

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/3] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-19 Thread Steven Perron via cfe-commits
@@ -346,8 +346,9 @@ bool sampledTypeIsSignedInteger(const llvm::Type *HandleType) { if (TET->getTargetExtName() == "spirv.Image") { return false; } - return TET->getTypeParameter(0)->isIntegerTy(); -} + assert(TET->getTargetExtName() == "spirv.SignedImage") { +re

[clang] [HLSL][SPIRV] Reapply "[HLSL][SPIRV] Add vk::constant_id attribute." (PR #144902)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/144902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Reapply "[HLSL][SPIRV] Add vk::constant_id attribute." (PR #144902)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/144902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH 1/2] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version:

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-19 Thread Steven Perron via cfe-commits
@@ -341,6 +341,13 @@ class SPIRVInstructionSelector : public InstructionSelector { GIntrinsic &HandleDef, MachineInstr &Pos) const; }; +bool sampledTypeIsSignedInteger(const llvm::Type *HandleType) { + const TargetExtType *TET = cast(HandleTy

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/144774 >From 7d3d8bb30863dd860183f7b9635aa34b72a9c3ae Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19:45 -0400 Subject: [PATCH] [HLSL][SPRIV] Handle sign RWBuffer correctly MIME-Version: 1.0

[clang] Revert "[HLSL][SPIRV] Add vk::constant_id attribute." (PR #144812)

2025-06-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/144812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[HLSL][SPIRV] Add vk::constant_id attribute." (PR #144812)

2025-06-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/144812 Reverts llvm/llvm-project#143544 >From 9d775256000726929f826ec164aa514d4a6e2288 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 19:30:17 -0400 Subject: [PATCH] Revert "[HLSL][SPIRV] Add vk:

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-18 Thread Steven Perron via cfe-commits
s-perron wrote: https://lab.llvm.org/buildbot/#/builders/24/builds/9606 https://github.com/llvm/llvm-project/pull/143544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] signed buffer (PR #144774)

2025-06-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/144774 - **Add sign extend image operand.** - **[HLSL][SPRIV] Handle sign RWBuffer correctly** >From 488fb5961105305e50e3d787f286354754a73fe9 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 18 Jun 2025 09:19

[clang] [llvm] [HLSL][SPIR-V] Fix LinkageAttribute emission for BuiltIn (PR #144701)

2025-06-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/144701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-16 Thread Steven Perron via cfe-commits
@@ -1661,6 +1661,11 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, return; } + if (Context.getLangOpts().HLSL && !D->isInExportDeclContext()) { +GV->setVisibility(llvm::GlobalValue::HiddenVisibility); s-perron wrote: I'll look i

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-16 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/143544 >From 954a86f3c8da88c4ac276231a40cd88e6f628253 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 30 May 2025 12:32:21 -0400 Subject: [PATCH 1/7] [HLSL][SPIRV] Add vk::constant_id attribute. The vk::const

[clang] [llvm] [HLSL][SPIRV] Use resource names (PR #143412)

2025-06-13 Thread Steven Perron via cfe-commits
s-perron wrote: Broken builds fixed by #144116 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

[clang] [llvm] [HLSL] Run finalize linkage pass for all targets (PR #134260)

2025-06-13 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/134260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Run finalize linkage pass for all targets (PR #134260)

2025-06-13 Thread Steven Perron via cfe-commits
s-perron wrote: In discussions with the teams implementing HLSL, we changed the design for the `export` keyword in HLSL. See https://github.com/llvm/wg-hlsl/blob/02098f6d85af1534c296c71790a24df55bd40374/proposals/0026-symbol-visibility.md https://github.com/llvm/llvm-project/pull/134260 _

[clang] [llvm] [HLSL][SPIRV] Use resource names (PR #143412)

2025-06-13 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed 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

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-13 Thread Steven Perron via cfe-commits
https://github.com/s-perron ready_for_review 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

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-11 Thread Steven Perron via cfe-commits
@@ -213,7 +213,8 @@ getScopeFromNormalizedScopeName(StringRef ScopeName) { .Case("vk", AttributeCommonInfo::Scope::VK) .Case("msvc", AttributeCommonInfo::Scope::MSVC) .Case("omp", AttributeCommonInfo::Scope::OMP) - .Case("riscv", AttributeCommonInfo::Scop

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-11 Thread Steven Perron via cfe-commits
@@ -774,6 +775,77 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, return EmitRuntimeCall( Intrinsic::getOrInsertDeclaration(&CGM.getModule(), ID)); } + case Builtin::BI__builtin_get_spirv_spec_constant_bool: + case Builtin::BI__builtin_get_sp

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-11 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/143544 >From 954a86f3c8da88c4ac276231a40cd88e6f628253 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 30 May 2025 12:32:21 -0400 Subject: [PATCH 1/3] [HLSL][SPIRV] Add vk::constant_id attribute. The vk::const

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-11 Thread Steven Perron via cfe-commits
@@ -213,7 +213,8 @@ getScopeFromNormalizedScopeName(StringRef ScopeName) { .Case("vk", AttributeCommonInfo::Scope::VK) .Case("msvc", AttributeCommonInfo::Scope::MSVC) .Case("omp", AttributeCommonInfo::Scope::OMP) - .Case("riscv", AttributeCommonInfo::Scop

[clang] [llvm] [HLSL][SPIRV] Use resource names (PR #143412)

2025-06-11 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/143412 >From fadeeac5a79cbae0edffbabbe383d7451c254afb Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Mon, 9 Jun 2025 12:53:06 -0400 Subject: [PATCH 1/2] [HLSL][SPIRV] Use resource names The SPIR-V backend does no

[clang] [llvm] [HLSL][SPIRV] Use resource names (PR #143412)

2025-06-11 Thread Steven Perron via 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

[clang] [HLSL][Driver] Make vk1.3 the default. (PR #143384)

2025-06-11 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/143384 >From ee4c25c47d58ba8707d8a36934186bce3c9fde4f Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Mon, 9 Jun 2025 10:21:47 -0400 Subject: [PATCH 1/2] [HLSL][Driver] Make vk1.3 the default. The HLSL driver curr

[clang] [HLSL][Driver] Make vk1.3 the default. (PR #143384)

2025-06-10 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/143384 >From ee4c25c47d58ba8707d8a36934186bce3c9fde4f Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Mon, 9 Jun 2025 10:21:47 -0400 Subject: [PATCH 1/2] [HLSL][Driver] Make vk1.3 the default. The HLSL driver curr

[clang] [HLSL][SPIR-V] Change SPV AS map for groupshared (PR #143519)

2025-06-10 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/143519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >