<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/CodeGen/CGHLSLRuntime.cpp, branch users/nico/python-1</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>Clarify some code based on static analysis complaints; NFC (#145679)</title>
<updated>2025-06-26T10:55:48+00:00</updated>
<author>
<name>Aaron Ballman</name>
<email>aaron@aaronballman.com</email>
</author>
<published>2025-06-26T10:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d3fd7921d4d7158a487bdc839c9fa6c3b650b997'/>
<id>d3fd7921d4d7158a487bdc839c9fa6c3b650b997</id>
<content type='text'>
In one case, we have a null pointer check that's unnecessary because the
only caller of the function already asserts the value is non-null.

In the other case, we've got an anti-pattern of `is` followed by `get`.
The logic was easier to repair by changing `get` to `cast`.

Neither case is a functional change.

Fixes #145525</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In one case, we have a null pointer check that's unnecessary because the
only caller of the function already asserts the value is non-null.

In the other case, we've got an anti-pattern of `is` followed by `get`.
The logic was easier to repair by changing `get` to `cast`.

Neither case is a functional change.

Fixes #145525</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][RootSignature] Add `fdx-rootsignature-version` option to specify root signature version (#144813)</title>
<updated>2025-06-24T23:21:24+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>finn.c.plum@gmail.com</email>
</author>
<published>2025-06-24T23:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e93a0d0d1ed790173e23247fa2833cdac30b8268'/>
<id>e93a0d0d1ed790173e23247fa2833cdac30b8268</id>
<content type='text'>
This pr provides the ability to specify the root signature version as a
compiler option and to retain this in the root signature decl.

It also updates the methods to serialize the version when dumping the
declaration and to output the version when generating the metadata.

- Update `DXContainer.hI` to define the root signature versions
- Update `Options.td` and `LangOpts.h` to define the
`fdx-rootsignature-version` compiler option
- Update `Options.td` to provide an alias `force-rootsig-ver` in
clang-dxc
- Update `Decl.[h|cpp]` and `SeamHLSL.cpp` so that `RootSignatureDecl`
will retain its version type
- Updates `CGHLSLRuntime.cpp` to generate the extra metadata field
- Add tests to illustrate

Resolves https://github.com/llvm/llvm-project/issues/126557.

Note: this does not implement validation based on versioning.
https://github.com/llvm/llvm-project/issues/129940 is required to
retrieve the version and use it for validations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr provides the ability to specify the root signature version as a
compiler option and to retain this in the root signature decl.

It also updates the methods to serialize the version when dumping the
declaration and to output the version when generating the metadata.

- Update `DXContainer.hI` to define the root signature versions
- Update `Options.td` and `LangOpts.h` to define the
`fdx-rootsignature-version` compiler option
- Update `Options.td` to provide an alias `force-rootsig-ver` in
clang-dxc
- Update `Decl.[h|cpp]` and `SeamHLSL.cpp` so that `RootSignatureDecl`
will retain its version type
- Updates `CGHLSLRuntime.cpp` to generate the extra metadata field
- Add tests to illustrate

Resolves https://github.com/llvm/llvm-project/issues/126557.

Note: this does not implement validation based on versioning.
https://github.com/llvm/llvm-project/issues/129940 is required to
retrieve the version and use it for validations.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Emit a version in the dx.rootsignatures metadata (#145113)</title>
<updated>2025-06-20T23:21:47+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2025-06-20T23:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b9fe9e0bc7421d89f38ade857c91f0ae153ad9c'/>
<id>6b9fe9e0bc7421d89f38ade857c91f0ae153ad9c</id>
<content type='text'>
In #144957 the backend was updated to expect a version in the metadata,
but since the frontend wasn't updated this breaks compilation. This is a
somewhat temporary fix to that until #144813 lands.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In #144957 the backend was updated to expect a version in the metadata,
but since the frontend wasn't updated this breaks compilation. This is a
somewhat temporary fix to that until #144813 lands.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][SPIR-V] Fix LinkageAttribute emission for BuiltIn (#144701)</title>
<updated>2025-06-18T15:26:40+00:00</updated>
<author>
<name>Nathan Gauër</name>
<email>brioche@google.com</email>
</author>
<published>2025-06-18T15:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3af4d4e8100fda2a7e1bd0dbbe0914b584ad08d6'/>
<id>3af4d4e8100fda2a7e1bd0dbbe0914b584ad08d6</id>
<content type='text'>
BuiltIn variables were missing the visibility attribute, which caused
the Linkage capability to be emitted by the backend.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BuiltIn variables were missing the visibility attribute, which caused
the Linkage capability to be emitted by the backend.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Use hidden visibility for external linkage. (#140292)</title>
<updated>2025-06-16T20:44:55+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-06-16T20:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a027eb4472ee8fa504c98bef655cac8c8bfe333a'/>
<id>a027eb4472ee8fa504c98bef655cac8c8bfe333a</id>
<content type='text'>
Implements

https://github.com/llvm/wg-hlsl/blob/main/proposals/0026-symbol-visibility.md.

The change is to stop using the `hlsl.export` attribute. Instead,
symbols with "program linkage" in HLSL will have export linkage with
default visibility, and symbols with "external linkage" in HLSL will
have export linkage with hidden visibility.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements

https://github.com/llvm/wg-hlsl/blob/main/proposals/0026-symbol-visibility.md.

The change is to stop using the `hlsl.export` attribute. Instead,
symbols with "program linkage" in HLSL will have export linkage with
default visibility, and symbols with "external linkage" in HLSL will
have export linkage with hidden visibility.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Remove unused includes (NFC) (#144285)</title>
<updated>2025-06-16T04:00:36+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-16T04:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c01532177ff61a768d5dc1ea541f9a8d986497fa'/>
<id>c01532177ff61a768d5dc1ea541f9a8d986497fa</id>
<content type='text'>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][SPIRV] Use resource names (#143412)</title>
<updated>2025-06-13T16:21:38+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-06-13T16:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bd33eef7f1013bea24289a898f788a2efe9d8282'/>
<id>bd33eef7f1013bea24289a898f788a2efe9d8282</id>
<content type='text'>
The SPIR-V backend does not have access to the original name of a
resource in the source, so it tries to create a name. This leads to some
problems with reflection.
    
That is why start to pass the name of the resource from Clang to the
SPIR-V backend.
    
Fixes #138533</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPIR-V backend does not have access to the original name of a
resource in the source, so it tries to create a name. This leads to some
problems with reflection.
    
That is why start to pass the name of the resource from Clang to the
SPIR-V backend.
    
Fixes #138533</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][SPIR-V] Handle SV_Position builtin in PS (#141759)</title>
<updated>2025-06-11T12:22:54+00:00</updated>
<author>
<name>Nathan Gauër</name>
<email>brioche@google.com</email>
</author>
<published>2025-06-11T12:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50f534e21cfb47aaf44e1613f71b56cca55ba395'/>
<id>50f534e21cfb47aaf44e1613f71b56cca55ba395</id>
<content type='text'>
This commit is using the same mechanism as vk::ext_builtin_input to
implement the SV_Position semantic input.
The HLSL signature is not yet ready for DXIL, hence this commit only
implements the SPIR-V side.

This is incomplete as it doesn't allow the semantic on hull/domain and
other shaders, but it's a first step to validate the overall
input/output
semantic logic.

Fixes https://github.com/llvm/llvm-project/issues/136969</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit is using the same mechanism as vk::ext_builtin_input to
implement the SV_Position semantic input.
The HLSL signature is not yet ready for DXIL, hence this commit only
implements the SPIR-V side.

This is incomplete as it doesn't allow the semantic on hull/domain and
other shaders, but it's a first step to validate the overall
input/output
semantic logic.

Fixes https://github.com/llvm/llvm-project/issues/136969</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (#138530)</title>
<updated>2025-06-04T11:22:37+00:00</updated>
<author>
<name>Nathan Gauër</name>
<email>brioche@google.com</email>
</author>
<published>2025-06-04T11:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=20d70196c9a4da344d0944f3c78447c3bd7079c7'/>
<id>20d70196c9a4da344d0944f3c78447c3bd7079c7</id>
<content type='text'>
This variable attribute is used in HLSL to add Vulkan specific builtins
in a shader.
The attribute is documented here:

https://github.com/microsoft/hlsl-specs/blob/17727e88fd1cb09013cb3a144110826af05f4dd5/proposals/0011-inline-spirv.md

Those variable, even if marked as `static` are externally initialized by
the pipeline/driver/GPU. This is handled by moving them to a specific
address space `hlsl_input`, also added by this commit.

The design for input variables in Clang can be found here:
https://github.com/llvm/wg-hlsl/blob/355771361ef69259fef39a65caef8bff9cb4046d/proposals/0019-spirv-input-builtin.md


Co-authored-by: Justin Bogner &lt;mail@justinbogner.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This variable attribute is used in HLSL to add Vulkan specific builtins
in a shader.
The attribute is documented here:

https://github.com/microsoft/hlsl-specs/blob/17727e88fd1cb09013cb3a144110826af05f4dd5/proposals/0011-inline-spirv.md

Those variable, even if marked as `static` are externally initialized by
the pipeline/driver/GPU. This is handled by moving them to a specific
address space `hlsl_input`, also added by this commit.

The design for input variables in Clang can be found here:
https://github.com/llvm/wg-hlsl/blob/355771361ef69259fef39a65caef8bff9cb4046d/proposals/0019-spirv-input-builtin.md


Co-authored-by: Justin Bogner &lt;mail@justinbogner.com&gt;</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>
</feed>
