[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/148649 >From ad3211d057b106bd713374369d567d0c9f08459f Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Mon, 14 Jul 2025 15:17:53 + Subject: [PATCH 1/3] [NFC][SemaHLSL] Remove check dependent on non-deterministic

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: Although, thinking a bit more, we can actually remove this test entirely. The FileCheck portion was just a nicety to check that the SourceLocation was pointing correctly for this case. However, this is redundant with the other checks that exist to do so. https://github.com/llvm

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/148649 >From ad3211d057b106bd713374369d567d0c9f08459f Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Mon, 14 Jul 2025 15:17:53 + Subject: [PATCH 1/2] [NFC][SemaHLSL] Remove check dependent on non-deterministic

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: @guy-david @bevin-hansson This resolved the build issue for me locally when using `DLLVM_ENABLE_EXSTENSIVE_CHECKS`, can you confirm this resolves the issue for you as well? https://github.com/llvm/llvm-project/pull/148649 ___ cfe-comm

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/148649 - when there are duplicate `RangeInfo`s created and we will attempt to `llvm::sort` or `llvm::stable_sort` them, it does not appear deterministic in which order they will be sorted (because they are equivalent)

[clang] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: @guy-david Thanks for pointing this out, I have a similar report [here](https://github.com/llvm/llvm-project/pull/147115#issuecomment-3069543491). I am taking a look into both now, but I suspect they might be the same issue. https://github.com/llvm/llvm-project/pull/147800 _

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: Hey @bevin-hansson, thanks for pointing this out. Building locally and taking a look into it now. https://github.com/llvm/llvm-project/pull/147115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [HLSL][RootSignature] Allow for multiple parsing errors in `RootSignatureParser` (PR #147832)

2025-07-13 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/147832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Allow for multiple parsing errors in `RootSignatureParser` (PR #147832)

2025-07-13 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147832 >From 02e7ad8a92e01b19d85f9bedf831aac161439ccb Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 21:21:53 + Subject: [PATCH 1/3] [HLSL][RootSignature] Implement multiple diagnostics in `Root

[clang] [HLSL][RootSignature] Allow for multiple parsing errors in `RootSignatureParser` (PR #147832)

2025-07-13 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147832 >From 02e7ad8a92e01b19d85f9bedf831aac161439ccb Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 21:21:53 + Subject: [PATCH 1/3] [HLSL][RootSignature] Implement multiple diagnostics in `Root

[clang] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-13 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/145795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145795 >From 43991791409d376e682c6a482941fcc4cd43b0bc Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 19:25:19 + Subject: [PATCH 1/9] add basic integer range validations --- .../clang/Basic/Diag

[clang] [HLSL][RootSignature] Allow for multiple parsing errors in `RootSignatureParser` (PR #147832)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147832 >From 02e7ad8a92e01b19d85f9bedf831aac161439ccb Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 21:21:53 + Subject: [PATCH 1/3] [HLSL][RootSignature] Implement multiple diagnostics in `Root

[clang] [llvm] [HLSL][RootSignature] Allow for multiple parsing errors in `RootSignatureParser` (PR #147832)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-11 Thread Finn Plummer via cfe-commits
@@ -1083,6 +1084,90 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( bool SemaHLSL::handleRootSignatureElements( ArrayRef Elements) { + // Define some common error handling functions + bool HadError = false; + auto ReportError = [this, &HadError](SourceLocation Loc, uint

[clang] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145795 >From 43991791409d376e682c6a482941fcc4cd43b0bc Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 19:25:19 + Subject: [PATCH 1/8] add basic integer range validations --- .../clang/Basic/Diag

[clang] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/147800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147800 >From a510b930402cd4a6a00f253093d1a3ddfab918ac Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 15:50:55 + Subject: [PATCH 01/11] remove confusing hlsl_unexpected_end_of_params diagnostic

[clang] [llvm] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/147115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-07-10 Thread Finn Plummer via cfe-commits
@@ -14,10 +14,129 @@ #ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H #define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H +#include "DXILRootSignature.h" +#include "llvm/ADT/IntervalMap.h" +#include "llvm/Analysis/DXILResource.h" #include "llvm/IR

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147115 >From 564f6995f40d80acddbda1fce58ddec38613d9fa Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 18:36:38 + Subject: [PATCH 01/15] nfc: introduce wrapper `RootSignatureElement` around `Root

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/147350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-10 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -fsyntax-only %s -verify + +// expected-no-diagnostics + +// Test that we have consistent behaviour for comma parsing. Namely: +// - a single trailing comma is allowed after any parameter +// - a

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-09 Thread Finn Plummer via cfe-commits
inbelic wrote: Added a test to show that it is consistent in allowing a trailing comma after parameter/values https://github.com/llvm/llvm-project/pull/147350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-09 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147350 >From b8644c7d9a44f9480cdbe0b3c46f0899cdcffc28 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Sat, 5 Jul 2025 01:41:26 + Subject: [PATCH 1/9] fix for root elements --- clang/lib/Parse/ParseHLSLRootSigna

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-09 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147350 >From b8644c7d9a44f9480cdbe0b3c46f0899cdcffc28 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Sat, 5 Jul 2025 01:41:26 + Subject: [PATCH 1/7] fix for root elements --- clang/lib/Parse/ParseHLSLRootSigna

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-08 Thread Finn Plummer via cfe-commits
@@ -34,3 +34,7 @@ void bad_root_signature_5() {} // expected-error@+1 {{expected ')' to denote end of parameters, or, another valid parameter of RootConstants}} [RootSignature(MultiLineRootSignature)] void bad_root_signature_6() {} + +// expected-error@+1 {{expected end of str

[clang] [llvm] [NFC][HLSL] Move resource range logic from `SemaHLSL` to `RootSignatureValidations` (PR #147117)

2025-07-08 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/147117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL] Move resource range logic from `SemaHLSL` to `RootSignatureValidations` (PR #147117)

2025-07-08 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-08 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic ready_for_review https://github.com/llvm/llvm-project/pull/147084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147084 >From 34d3879022f65d51002d3abe3aec50a952ca6e18 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 4 Jul 2025 00:13:32 + Subject: [PATCH 1/6] nfc: add phony ASTContext and StringLiteral to ParseHLSL ---

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/145828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147084 >From abef31336baec05dafe2cc7ae32e753790322f68 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 4 Jul 2025 00:13:32 + Subject: [PATCH 1/5] nfc: add phony ASTContext and StringLiteral to ParseHLSL ---

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
@@ -22,3 +23,14 @@ void bad_root_signature_4() {} // expected-error@+1 {{expected ')' to denote end of parameters, or, another valid parameter of RootConstants}} [RootSignature("RootConstants(b0, num32BitConstants = 1, invalid)")] void bad_root_signature_5() {} + +#define Mult

[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/147084 The `SourceLocation` of a `RootSignatureToken` is incorrectly set to be the "offset" into the concatenated string that denotes the rootsignature. This causes an issue when the `StringLiteral` is a multi-line ex

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145828 >From e616ddee9cfaaaf697e4bd83d18e2d10ea86 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:39:13 + Subject: [PATCH 1/6] update `setDefaultFlags` --- .../clang/Parse/ParseHLSLRootS

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/146124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145828 >From e616ddee9cfaaaf697e4bd83d18e2d10ea86 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:39:13 + Subject: [PATCH 1/6] update `setDefaultFlags` --- .../clang/Parse/ParseHLSLRootS

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/146124 >From 91f0a282662bf62e35b6b6254cb96e48a2062162 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:56:24 + Subject: [PATCH 1/7] nfc: move resource range analysis to `HLSLRootSignature` ---

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/146124 >From 91f0a282662bf62e35b6b6254cb96e48a2062162 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:56:24 + Subject: [PATCH 1/6] nfc: move resource range analysis to `HLSLRootSignature` ---

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,56 @@ +//===- RootSignatureMetadata.h - HLSL Root Signature helpers --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
@@ -103,7 +51,7 @@ class ResourceRange { getOverlapping(const RangeInfo &Info) const; // Return the mapped RangeInfo at X or nullptr if no mapping exists - LLVM_ABI const RangeInfo *lookup(uint32_t X) const; + const RangeInfo *lookup(uint32_t X) const; i

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,194 @@ +//===- RootSignatureMetadata.h - HLSL Root Signature helpers --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145828 >From e616ddee9cfaaaf697e4bd83d18e2d10ea86 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:39:13 + Subject: [PATCH 1/6] update `setDefaultFlags` --- .../clang/Parse/ParseHLSLRootS

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/146124 >From 91f0a282662bf62e35b6b6254cb96e48a2062162 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:56:24 + Subject: [PATCH 1/5] nfc: move resource range analysis to `HLSLRootSignature` ---

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/146124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145828 >From e616ddee9cfaaaf697e4bd83d18e2d10ea86 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 16:39:13 + Subject: [PATCH 1/5] update `setDefaultFlags` --- .../clang/Parse/ParseHLSLRootS

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/145986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-07-03 Thread Finn Plummer via cfe-commits
@@ -274,11 +286,23 @@ TEST(HLSLRootSignatureTest, NoneRootFlagsDump) { } TEST(HLSLRootSignatureTest, AllRootFlagsDump) { - RootFlags Flags = RootFlags::ValidFlags; + using llvm::dxbc::RootFlags; + auto ValidRootFlags = RootFlags::AllowInputAssemblerInputLayout | +

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-07-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic deleted https://github.com/llvm/llvm-project/pull/145986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-07-03 Thread Finn Plummer via cfe-commits
@@ -274,11 +286,23 @@ TEST(HLSLRootSignatureTest, NoneRootFlagsDump) { } TEST(HLSLRootSignatureTest, AllRootFlagsDump) { - RootFlags Flags = RootFlags::ValidFlags; + using llvm::dxbc::RootFlags; + auto ValidRootFlags = RootFlags::AllowInputAssemblerInputLayout | +

[clang] [HLSL] Add `-Gis` option to clang-dxc (PR #146448)

2025-07-02 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. https://github.com/llvm/llvm-project/pull/146448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
@@ -200,38 +81,38 @@ struct DescriptorTableClause { uint32_t NumDescriptors = 1; uint32_t Space = 0; uint32_t Offset = DescriptorTableOffsetAppend; - DescriptorRangeFlags Flags; + dxbc::DescriptorRangeFlags Flags; void setDefaultFlags() { switch (Type) {

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
@@ -205,20 +205,22 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) { ASSERT_EQ(std::get(Elem).Space, 0u); ASSERT_EQ(std::get(Elem).Offset, DescriptorTableOffsetAppend); + auto ValidDescriptorRangeFlags = llvm::dxbc::DescriptorRangeFlags(0x1000f)

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
@@ -404,7 +417,7 @@ TEST_F(ParseHLSLRootSignatureTest, ValidSamplerFlagsTest) { ASSERT_TRUE(std::holds_alternative(Elem)); ASSERT_EQ(std::get(Elem).Type, ClauseType::Sampler); ASSERT_EQ(std::get(Elem).Flags, -DescriptorRangeFlags::ValidSamplerFlags); -

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Add bounded parameter validations of Root Elements for non-flag values (PR #145795)

2025-06-26 Thread Finn Plummer via cfe-commits
inbelic wrote: This pr have been converted to a draft until https://github.com/llvm/llvm-project/issues/145940 and https://github.com/llvm/llvm-project/issues/145815 are resolved and the logic can be re-used. https://github.com/llvm/llvm-project/pull/145795 ___

[clang] [HLSL][RootSignature] Add bounded parameter validations of Root Elements for non-flag values (PR #145795)

2025-06-26 Thread Finn Plummer via cfe-commits
https://github.com/inbelic converted_to_draft https://github.com/llvm/llvm-project/pull/145795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Use "stringified" version for diagnostic output of punctuator tokens (PR #145827)

2025-06-26 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/145827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Use "stringified" version for diagnostic output of punctuator tokens (PR #145827)

2025-06-26 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Use "stringified" version for diagnostic output of punctuator tokens (PR #145827)

2025-06-26 Thread Finn Plummer via cfe-commits
@@ -18,3 +18,7 @@ void bad_root_signature_3() {} [RootSignature("DescriptorTable(), invalid")] // expected-error {{expected end of stream to denote end of parameters, or, another valid parameter of RootSignature}} void bad_root_signature_4() {} + +// expected-error@+1 {{expe

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-06-25 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Update `setDefaultFlags` to account for Root Signature Version (PR #145828)

2025-06-25 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/145828 This pr updates `setDefaultFlags` in `HLSLRootSignature.h` to account for which version it should initialize the default flag values for. - Updates `setDefaultFlags` with a `Version` argument and initializes th

[clang] [HLSL][RootSignature] Add bounded parameter validations of Root Elements for non-flag values (PR #145795)

2025-06-25 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145795 >From 7e3f1398ae2ba147822f96dd262a2c6127f0ff68 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 25 Jun 2025 18:16:12 + Subject: [PATCH 1/8] simple prototype first error --- .../clang/Basic/Diagnostic

[clang] [HLSL][RootSignature] Add bounded parameter validations of Root Elements for non-flag values (PR #145795)

2025-06-25 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-25 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144813 >From 6af81bb12430c28f22eba073a38abd7875a2e348 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 18 Jun 2025 21:47:31 + Subject: [PATCH 1/3] [HLSL][RootSignature] Add option to specify version of RootS

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-24 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144813 >From 6af81bb12430c28f22eba073a38abd7875a2e348 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 18 Jun 2025 21:47:31 + Subject: [PATCH 1/5] [HLSL][RootSignature] Add option to specify version of RootS

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-24 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144813 >From 6af81bb12430c28f22eba073a38abd7875a2e348 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 18 Jun 2025 21:47:31 + Subject: [PATCH 1/7] [HLSL][RootSignature] Add option to specify version of RootS

[clang] [HLSL][RootSignature] Enable resource range analysis for remaining `RootElement`s (PR #145109)

2025-06-24 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/145109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Plug-in serialization and add full sample testcase (PR #144769)

2025-06-23 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144769 >From 3761e5204d2d435cc09f392fd2e53c2125fac0ed Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 6 Jun 2025 20:46:10 + Subject: [PATCH 1/3] [HLSL][RootSignature] Plug-in serialization and add full samp

[clang] [HLSL][RootSignature] Enable resource range analysis for remaining `RootElement`s (PR #145109)

2025-06-23 Thread Finn Plummer via cfe-commits
@@ -1116,6 +1116,52 @@ bool SemaHLSL::handleRootSignatureDecl(HLSLRootSignatureDecl *D, Info.Space = Descriptor->Space; Info.Visibility = Descriptor->Visibility; Infos.push_back(Info); +} else if (const auto *Constants = + std::get_if(&E

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-23 Thread Finn Plummer via cfe-commits
https://github.com/inbelic deleted https://github.com/llvm/llvm-project/pull/144813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Plug-in serialization and add full sample testcase (PR #144769)

2025-06-23 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144769 >From 3761e5204d2d435cc09f392fd2e53c2125fac0ed Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 6 Jun 2025 20:46:10 + Subject: [PATCH 1/4] [HLSL][RootSignature] Plug-in serialization and add full samp

[clang] [HLSL][RootSignature] Enable resource range analysis for remaining `RootElement`s (PR #145109)

2025-06-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145109 >From 447dca922263f5a4abec27d8e32302dc1b7a1b5b Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 20 Jun 2025 18:45:55 + Subject: [PATCH 1/8] add collection of RootConstants --- clang/lib/Sema/SemaHLSL

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144813 >From fde2b30c27744d58d0b7f40965324c090cdf1277 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 18 Jun 2025 21:47:31 + Subject: [PATCH 01/13] define root signature versions --- llvm/include/llvm/Supp

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144813 >From fde2b30c27744d58d0b7f40965324c090cdf1277 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 18 Jun 2025 21:47:31 + Subject: [PATCH 01/12] define root signature versions --- llvm/include/llvm/Supp

[clang] [llvm] [HLSL] Emit a version in the dx.rootsignatures metadata (PR #145113)

2025-06-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. https://github.com/llvm/llvm-project/pull/145113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-20 Thread Finn Plummer via cfe-commits
@@ -99,6 +99,12 @@ enum class SamplerFeedbackType : uint32_t { const unsigned MinWaveSize = 4; const unsigned MaxWaveSize = 128; +// D3D_ROOT_SIGNATURE_VERSION +enum class RootSignatureVersion { + rootsig_1_0 = 0x1, + rootsig_1_1 = 0x2, +}; inbelic wrote: Y

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/144813 >From fde2b30c27744d58d0b7f40965324c090cdf1277 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 18 Jun 2025 21:47:31 + Subject: [PATCH 01/11] define root signature versions --- llvm/include/llvm/Supp

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-20 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/140962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-19 Thread Finn Plummer via cfe-commits
inbelic wrote: Going through the commits 1 by 1 should be easier to read then from top to bottom of this diff. https://github.com/llvm/llvm-project/pull/144813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Finn Plummer via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here + if (handleRootSignatureDecl(SignatureDecl, Loc)) +return

  1   2   3   4   5   6   7   >