<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[HLSL] Update Frontend to support version 1.2 of root signature (#160616)</title>
<updated>2025-10-01T21:23:37+00:00</updated>
<author>
<name>joaosaffran</name>
<email>joaosaffranllvm@gmail.com</email>
</author>
<published>2025-10-01T21:23:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f2c8c42821a8c6de8984a1e7a932233cf221d5c1'/>
<id>f2c8c42821a8c6de8984a1e7a932233cf221d5c1</id>
<content type='text'>
This patch updates the frontend to support version 1.2 of root
signatures, it adds parsing, metadata generation and a few tests.

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates the frontend to support version 1.2 of root
signatures, it adds parsing, metadata generation and a few tests.

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][HLSL] Remove confusing enum aliases / duplicates (#153909)</title>
<updated>2025-08-18T15:58:33+00:00</updated>
<author>
<name>Damyan Pepper</name>
<email>damyanp@microsoft.com</email>
</author>
<published>2025-08-18T15:58:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cc49f3b3e1ddb77ebd888ef87c3b0e87c69e201b'/>
<id>cc49f3b3e1ddb77ebd888ef87c3b0e87c69e201b</id>
<content type='text'>
Remove:

* DescriptorType enum - this almost exactly shadowed the ResourceClass
enum
* ClauseType aliased ResourceClass

Although these were introduced to make the HLSL root signature handling
code a bit cleaner, they were ultimately causing confusion as they
appeared to be unique enums that needed to be converted between each
other.

Closes #153890</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove:

* DescriptorType enum - this almost exactly shadowed the ResourceClass
enum
* ClauseType aliased ResourceClass

Although these were introduced to make the HLSL root signature handling
code a bit cleaner, they were ultimately causing confusion as they
appeared to be unique enums that needed to be converted between each
other.

Closes #153890</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Refactoring DXILABI.h to not depend on scope printer (#153840)</title>
<updated>2025-08-16T01:33:44+00:00</updated>
<author>
<name>joaosaffran</name>
<email>joaosaffran@gmail.com</email>
</author>
<published>2025-08-16T01:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=37729d8ceb91edaece07eea6ab45fe8d0012132c'/>
<id>37729d8ceb91edaece07eea6ab45fe8d0012132c</id>
<content type='text'>
This patch refactors DXILABI to remove the dependency on scope printer. 
Closes: #153827

---------

Co-authored-by: Joao Saffran &lt;{ID}+{username}@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors DXILABI to remove the dependency on scope printer. 
Closes: #153827

---------

Co-authored-by: Joao Saffran &lt;{ID}+{username}@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Add Range Overlap validation (#152229)</title>
<updated>2025-08-14T22:40:11+00:00</updated>
<author>
<name>joaosaffran</name>
<email>126493771+joaosaffran@users.noreply.github.com</email>
</author>
<published>2025-08-14T22:40:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d56fa965243bcdc115b8f262ce79cf2547500c6d'/>
<id>d56fa965243bcdc115b8f262ce79cf2547500c6d</id>
<content type='text'>
As part of the Root Signature Spec, we need to validate if Root
Signatures are not defining overlapping ranges.
Closes: https://github.com/llvm/llvm-project/issues/126645

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;
Co-authored-by: Joao Saffran &lt;{ID}+{username}@users.noreply.github.com&gt;
Co-authored-by: Joao Saffran &lt;jderezende@microsoft.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of the Root Signature Spec, we need to validate if Root
Signatures are not defining overlapping ranges.
Closes: https://github.com/llvm/llvm-project/issues/126645

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;
Co-authored-by: Joao Saffran &lt;{ID}+{username}@users.noreply.github.com&gt;
Co-authored-by: Joao Saffran &lt;jderezende@microsoft.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][HLSL][DirectX] Consolidate `ResourceClassNames` (#152213)</title>
<updated>2025-08-07T23:10:50+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-08-07T23:10:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cb2d56ce960714ce6fce39e8b846326969a30c2d'/>
<id>cb2d56ce960714ce6fce39e8b846326969a30c2d</id>
<content type='text'>
During the split of the various `Frontend/HLSL` libraries, there was an
oversight to duplicate the `ResourceClassNames` definitions. This commit
simply consolidates the definitions into `DXContainer.h` as
`getResourceClasses`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During the split of the various `Frontend/HLSL` libraries, there was an
oversight to duplicate the `ResourceClassNames` definitions. This commit
simply consolidates the definitions into `DXContainer.h` as
`getResourceClasses`</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][HLSL] Replace uses of `getResourceName`/`printEnum` (#152211)</title>
<updated>2025-08-06T23:35:16+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-08-06T23:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=acb5d0c211f72ba370bfeea7e5bf3b108f84895a'/>
<id>acb5d0c211f72ba370bfeea7e5bf3b108f84895a</id>
<content type='text'>
Introduce the `enumToStringRef` enum into `ScopedPrinter.h` that
replicates `enumToString` behaviour, expect that instead of returning a
hex value string, it just returns an empty string. This allows us to
return a StringRef and easily check if an invalid enum was provided
based on the StringRef size

This then uses `enumToStringRef` to remove the redundant
`getResourceName` and `printEnum` functions.

Resolves: https://github.com/llvm/llvm-project/issues/151200.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce the `enumToStringRef` enum into `ScopedPrinter.h` that
replicates `enumToString` behaviour, expect that instead of returning a
hex value string, it just returns an empty string. This allows us to
return a StringRef and easily check if an invalid enum was provided
based on the StringRef size

This then uses `enumToStringRef` to remove the redundant
`getResourceName` and `printEnum` functions.

Resolves: https://github.com/llvm/llvm-project/issues/151200.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (#146124)</title>
<updated>2025-07-04T14:58:58+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>finn.c.plum@gmail.com</email>
</author>
<published>2025-07-04T14:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=56e3fc4c42d1564913e431b91412ca192b50d09a'/>
<id>56e3fc4c42d1564913e431b91412ca192b50d09a</id>
<content type='text'>
This pr breaks-up `HLSLRootSignatureUtils` into separate orthogonal and
meaningful libraries. This prevents it ending up as a dumping grounds of
many different parts.

- Creates a library `RootSignatureMetadata` to contain helper functions
for interacting the root signatures in their metadata representation
- Create a library `RootSignatureValidations` to contain helper
functions that will validate various values of root signatures
- Move the serialization of root signature elements to
`HLSLRootSignature`

Resolves: https://github.com/llvm/llvm-project/issues/145946</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr breaks-up `HLSLRootSignatureUtils` into separate orthogonal and
meaningful libraries. This prevents it ending up as a dumping grounds of
many different parts.

- Creates a library `RootSignatureMetadata` to contain helper functions
for interacting the root signatures in their metadata representation
- Create a library `RootSignatureValidations` to contain helper
functions that will validate various values of root signatures
- Move the serialization of root signature elements to
`HLSLRootSignature`

Resolves: https://github.com/llvm/llvm-project/issues/145946</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][RootSignature] Move RootSignature util functions (#142491)</title>
<updated>2025-06-03T16:59:50+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>finn.c.plum@gmail.com</email>
</author>
<published>2025-06-03T16:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ec5afea773783b73b575d397dfdc8fba1fd596b'/>
<id>9ec5afea773783b73b575d397dfdc8fba1fd596b</id>
<content type='text'>
`HLSLRootSignature.h` was originally created to hold the struct
definitions of an `llvm::hlsl::rootsig::RootElement` and some helper
functions for it.

However, there many users of the structs that don't require any of the
helper methods. This requires us to link the `FrontendHLSL` library,
where we otherwise wouldn't need to.

For instance:
- This [revert](https://github.com/llvm/llvm-project/pull/142005) was
required as it requires linking to the unrequired `FrontendHLSL` library
- As part of the change required here:
https://github.com/llvm/llvm-project/issues/126557. We will want to add
an `HLSLRootSignatureVersion` enum. Ideally this could live with the
root signature struct defs, but we don't want to link the helper objects
into `clang/Basic/TargetOptions.h`

This change allows the struct definitions to be kept in a single header
file and to then have the `FrontendHLSL` library only be linked when
required.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`HLSLRootSignature.h` was originally created to hold the struct
definitions of an `llvm::hlsl::rootsig::RootElement` and some helper
functions for it.

However, there many users of the structs that don't require any of the
helper methods. This requires us to link the `FrontendHLSL` library,
where we otherwise wouldn't need to.

For instance:
- This [revert](https://github.com/llvm/llvm-project/pull/142005) was
required as it requires linking to the unrequired `FrontendHLSL` library
- As part of the change required here:
https://github.com/llvm/llvm-project/issues/126557. We will want to add
an `HLSLRootSignatureVersion` enum. Ideally this could live with the
root signature struct defs, but we don't want to link the helper objects
into `clang/Basic/TargetOptions.h`

This change allows the struct definitions to be kept in a single header
file and to then have the `FrontendHLSL` library only be linked when
required.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][RootSignature] Metadata generation of RootFlags, RootConstants, RootDescriptors (#142010)</title>
<updated>2025-05-30T23:52:19+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>finn.c.plum@gmail.com</email>
</author>
<published>2025-05-30T23:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9cdd33db169d0ba9853f2c9538cb15ec4b506793'/>
<id>9cdd33db169d0ba9853f2c9538cb15ec4b506793</id>
<content type='text'>
Implements metadata generation of a Root Signature from its in-memory
representation. It follows the same style as:
https://github.com/llvm/llvm-project/pull/139633.

This pr handles RootFlags, RootConstants and RootDescriptors.

The metadata follows the format described
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0002-root-signature-in-clang.md#metadata-schema).

- Implement `BuildRoot[Flags|Constants|Descriptors]` into
`HLSLRootSignature.h`
- Add sample testcases demonstrating functionality

Note: there is no validation of metadata nodes as the
`llvm::hlsl::rootsig::RootElement` that generates it will have already
been validated.

First part of https://github.com/llvm/llvm-project/issues/126586.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements metadata generation of a Root Signature from its in-memory
representation. It follows the same style as:
https://github.com/llvm/llvm-project/pull/139633.

This pr handles RootFlags, RootConstants and RootDescriptors.

The metadata follows the format described
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0002-root-signature-in-clang.md#metadata-schema).

- Implement `BuildRoot[Flags|Constants|Descriptors]` into
`HLSLRootSignature.h`
- Add sample testcases demonstrating functionality

Note: there is no validation of metadata nodes as the
`llvm::hlsl::rootsig::RootElement` that generates it will have already
been validated.

First part of https://github.com/llvm/llvm-project/issues/126586.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[HLSL][RootSignature] Implement serialization of `RootConstants` and `RootFlags`" (#142005)</title>
<updated>2025-05-29T18:21:20+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>finn.c.plum@gmail.com</email>
</author>
<published>2025-05-29T18:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dd56693451ba31d1e82a79bf460cdf85b728a246'/>
<id>dd56693451ba31d1e82a79bf460cdf85b728a246</id>
<content type='text'>
The commit caused build failures,
[here](https://lab.llvm.org/buildbot/#/builders/10/builds/6308), due to
a missing linked llvm library (HLSLFrontend) into
`clang/unittests/Parse/CMakeLists.txt`.

While it seems like the fix is straightforwardly to just add this
library, I will revert now to build and verify locally it correctly
fixes it.

Reverts llvm/llvm-project#141130</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The commit caused build failures,
[here](https://lab.llvm.org/buildbot/#/builders/10/builds/6308), due to
a missing linked llvm library (HLSLFrontend) into
`clang/unittests/Parse/CMakeLists.txt`.

While it seems like the fix is straightforwardly to just add this
library, I will revert now to build and verify locally it correctly
fixes it.

Reverts llvm/llvm-project#141130</pre>
</div>
</content>
</entry>
</feed>
