[clang] [HLSL] Fix OpaqueValueExpr handling in InitListExpr (PR #156750)

2025-09-09 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/156750 >From 3fa3bc0ae3e3f24368d7ffeed2595580d0e982a1 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 3 Sep 2025 16:09:17 -0400 Subject: [PATCH 1/2] [HLSL] Fix OpaqueValueExpr handling in InitListExpr The Opa

[clang] [llvm] Explicit types in cbuffer layouts (PR #156919)

2025-09-09 Thread Steven Perron via cfe-commits
s-perron wrote: I'm seeing a problem for SPIR-V that we may need to work out. I understand why you do it, and I don't have a solution yet. ``` // This struct has a size of 12 bytes (float + float2). // In a cbuffer array, HLSL layout rules require each element to start on a // 16-byte boundary.

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-09 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: LGTM https://github.com/llvm/llvm-project/pull/155866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-07 Thread Steven Perron via cfe-commits
@@ -1,49 +1,65 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ s-perron wrote: rebased. https://github.com/llvm/llvm-project/pull/156075 ___ cfe-commits mailing list cfe-commit

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

2025-09-07 Thread Steven Perron via cfe-commits
@@ -1,49 +1,65 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ -// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s - -// This test verifies handling of multi-dimensional local arrays of resources -// when used as a function a

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

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

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

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

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

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

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

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

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

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

[clang] [llvm] Explicit types in cbuffer layouts (PR #156919)

2025-09-05 Thread Steven Perron via cfe-commits
@@ -111,53 +118,52 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( if (!PackOffsets || PO != -1) { if (!layoutField(FD, EndOffset, FieldOffset, FieldType, PO)) return nullptr; -Layout.push_back(FieldOffset); -LayoutEle

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

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

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

2025-09-03 Thread Steven Perron via cfe-commits
@@ -828,11 +828,27 @@ llvm::Instruction *CGHLSLRuntime::getConvergenceToken(BasicBlock &BB) { class OpaqueValueVisitor : public RecursiveASTVisitor { public: - llvm::SmallPtrSet OVEs; + llvm::SmallVector OVEs; + llvm::SmallPtrSet Visited; OpaqueValueVisitor() {} + bo

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

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

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

2025-09-03 Thread Steven Perron via cfe-commits
@@ -1,49 +1,65 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ s-perron wrote: Looking at the change, and it seems like the the CRLF was replaced with LF. My editors must have done that without me knowing. I can try to r

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

2025-09-03 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/156075 >From aaecbc5efd38190e8aedd9b3e3c95b2ede791a09 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-09-03 Thread Steven Perron via cfe-commits
@@ -828,11 +828,27 @@ llvm::Instruction *CGHLSLRuntime::getConvergenceToken(BasicBlock &BB) { class OpaqueValueVisitor : public RecursiveASTVisitor { public: - llvm::SmallPtrSet OVEs; + llvm::SmallVector OVEs; + llvm::SmallPtrSet Visited; OpaqueValueVisitor() {} + bo

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

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

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

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

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

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

[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

  1   2   3   4   5   >