<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/SPIRV, branch users/nico/python-2</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>[SPIRV] Add option to add all KHR extensions (#145535)</title>
<updated>2025-07-02T17:50:48+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-07-02T17:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=832cd2df0b564a0643784d647dd55372c80fdb6c'/>
<id>832cd2df0b564a0643784d647dd55372c80fdb6c</id>
<content type='text'>
In DXC, there is an option to enable all KHR extension. I would like to
extend the existing `-spirv-ext` backend commandline option to have the
same capability. It is like the special case for `all` execept it only
adds the `SPV_KHR_*` extensions.

Part of https://github.com/llvm/llvm-project/issues/137650.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In DXC, there is an option to enable all KHR extension. I would like to
extend the existing `-spirv-ext` backend commandline option to have the
same capability. It is like the special case for `all` execept it only
adds the `SPV_KHR_*` extensions.

Part of https://github.com/llvm/llvm-project/issues/137650.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][SPRIV] Handle signed RWBuffer correctly (#144774)</title>
<updated>2025-07-02T16:09:47+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-07-02T16:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=68173c80915955bae8cfc697a98d5d7888f09c67'/>
<id>68173c80915955bae8cfc697a98d5d7888f09c67</id>
<content type='text'>
In Vulkan, the signedness of the accesses to images has to match the
signedness of the backing image.
    
See

https://docs.vulkan.org/spec/latest/chapters/textures.html#textures-input,
where it says the behaviour is undefined if
    
&gt; the signedness of any read or sample operation does not match the
signedness of the image’s format.
    
Users who define say an `RWBuffer&lt;int&gt;` will create a Vulkan image with
a signed integer format. So the HLSL that is generated must match that
expecation.
    
The solution we use is to generate a `spirv.SignedImage` target type for
signed integer instead of `spirv.Image`. The two types are otherwise the
same.
    
The backend will add the `signExtend` image operand to access to the
image to ensure the image is access as a signed image.
    
Fixes #144580</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Vulkan, the signedness of the accesses to images has to match the
signedness of the backing image.
    
See

https://docs.vulkan.org/spec/latest/chapters/textures.html#textures-input,
where it says the behaviour is undefined if
    
&gt; the signedness of any read or sample operation does not match the
signedness of the image’s format.
    
Users who define say an `RWBuffer&lt;int&gt;` will create a Vulkan image with
a signed integer format. So the HLSL that is generated must match that
expecation.
    
The solution we use is to generate a `spirv.SignedImage` target type for
signed integer instead of `spirv.Image`. The two types are otherwise the
same.
    
The backend will add the `signExtend` image operand to access to the
image to ensure the image is access as a signed image.
    
Fixes #144580</pre>
</div>
</content>
</entry>
<entry>
<title>[SPIRV] Add FloatControl2 capability (#144371)</title>
<updated>2025-07-02T12:48:57+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-07-02T12:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4e213159af9eea0716d2cdfbae2c482176608042'/>
<id>4e213159af9eea0716d2cdfbae2c482176608042</id>
<content type='text'>
Add handling for FPFastMathMode in SPIR-V shaders. This is a first pass
that
simply does a direct translation when the proper extension is available.
This will unblock work for HLSL. However, it is not a full solution.

The default math mode for spir-v is determined by the API. When
targeting Vulkan many of the fast math options are assumed. We should do
something particular when targeting Vulkan.

We will also need to handle the hlsl "precise" keyword correctly when
FPFastMathMode is not available.

Unblockes https://github.com/llvm/llvm-project/issues/140739, but we are
keeing it open to track the remaining issues mentioned above.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add handling for FPFastMathMode in SPIR-V shaders. This is a first pass
that
simply does a direct translation when the proper extension is available.
This will unblock work for HLSL. However, it is not a full solution.

The default math mode for spir-v is determined by the API. When
targeting Vulkan many of the fast math options are assumed. We should do
something particular when targeting Vulkan.

We will also need to handle the hlsl "precise" keyword correctly when
FPFastMathMode is not available.

Unblockes https://github.com/llvm/llvm-project/issues/140739, but we are
keeing it open to track the remaining issues mentioned above.</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>[SPIRV] Allow __spirv_SpecConstant in Vulkan shaders (#143543)</title>
<updated>2025-06-17T15:26:47+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-06-17T15:26:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1410e69b641182e942470a90d4a0bb5a2910805f'/>
<id>1410e69b641182e942470a90d4a0bb5a2910805f</id>
<content type='text'>
There is a builtin __spirv_SpecConstant that the SPIR-V backend expands
into a specialization constant. However, it is currently only enable for
OpenCL shaders, and not the graphic shaders.

We want to use it for specialization constants coming from HLSL, so we
are enabling it for graphic shaders as well.

Implements https://github.com/llvm/wg-hlsl/pull/287

Fixes https://github.com/llvm/llvm-project/issues/142991</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a builtin __spirv_SpecConstant that the SPIR-V backend expands
into a specialization constant. However, it is currently only enable for
OpenCL shaders, and not the graphic shaders.

We want to use it for specialization constants coming from HLSL, so we
are enabling it for graphic shaders as well.

Implements https://github.com/llvm/wg-hlsl/pull/287

Fixes https://github.com/llvm/llvm-project/issues/142991</pre>
</div>
</content>
</entry>
<entry>
<title>[SPIRV] Fix ExecutionMode_fragment.ll test (#144116)</title>
<updated>2025-06-13T17:26:26+00:00</updated>
<author>
<name>Steven Perron</name>
<email>stevenperron@google.com</email>
</author>
<published>2025-06-13T17:26:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=493c1612d6f8f7a40d0bf0ba28fb753be83fac1c'/>
<id>493c1612d6f8f7a40d0bf0ba28fb753be83fac1c</id>
<content type='text'>
Fix test broken by https://github.com/llvm/llvm-project/pull/143412.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix test broken by https://github.com/llvm/llvm-project/pull/143412.</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>[SPIR-V] Fix ExecutionMode generation (#143888)</title>
<updated>2025-06-12T16:13:29+00:00</updated>
<author>
<name>Nathan Gauër</name>
<email>brioche@google.com</email>
</author>
<published>2025-06-12T16:13:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ef1cb8277ac3cb34ce9700a313ed60410dd9f84b'/>
<id>ef1cb8277ac3cb34ce9700a313ed60410dd9f84b</id>
<content type='text'>
PR #141787 added code to emit the Fragment execution model. This
required emitting the OriginUpperLeft ExecutionMode. But this was done
by using the same codepath used for OpEntrypoint.

This has 2 issues:
- the interface variables were added to both OpEntryPoint and
OpExecutionMode.
- the existing OpExecutionMode logic was not used.

This commit fixes this, regrouping OpExecutionMode handling in one
place, and fixing bad codegen issue when interface variiables are added.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR #141787 added code to emit the Fragment execution model. This
required emitting the OriginUpperLeft ExecutionMode. But this was done
by using the same codepath used for OpEntrypoint.

This has 2 issues:
- the interface variables were added to both OpEntryPoint and
OpExecutionMode.
- the existing OpExecutionMode logic was not used.

This commit fixes this, regrouping OpExecutionMode handling in one
place, and fixing bad codegen issue when interface variiables are added.</pre>
</div>
</content>
</entry>
<entry>
<title>[SPIRV] FIX print the symbolic operand for opcode for the operation OpSpecConstantOp (#135756)</title>
<updated>2025-06-11T18:13:01+00:00</updated>
<author>
<name>VISHAKH PRAKASH</name>
<email>vishakh.prakash@multicorewareinc.com</email>
</author>
<published>2025-06-11T18:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fad1972d74aead159a5e91b068cbf736e83836b5'/>
<id>fad1972d74aead159a5e91b068cbf736e83836b5</id>
<content type='text'>
Current implementation outputs opcode is an immediate but spirv-tools
requires that the name of the operation without "Op" is needed for the
instruction OpSpecConstantOp
that is if the opcode is OpBitcast the instruction must be
`%1 = OpSpecConstantOp %6 Bitcast %17` 
instead of 
`%1 = OpBitcast %6 124 %17`

[refer this commit for more
info](https://github.com/KhronosGroup/SPIRV-Tools/commit/0f166be68d4b6624a10d6bf312679505d391ec22)

---------

Co-authored-by: Dmitry Sidorov &lt;dmitry.sidorov@intel.com&gt;
Co-authored-by: Ebin-McW &lt;ebin.jose@multicorewareinc.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current implementation outputs opcode is an immediate but spirv-tools
requires that the name of the operation without "Op" is needed for the
instruction OpSpecConstantOp
that is if the opcode is OpBitcast the instruction must be
`%1 = OpSpecConstantOp %6 Bitcast %17` 
instead of 
`%1 = OpBitcast %6 124 %17`

[refer this commit for more
info](https://github.com/KhronosGroup/SPIRV-Tools/commit/0f166be68d4b6624a10d6bf312679505d391ec22)

---------

Co-authored-by: Dmitry Sidorov &lt;dmitry.sidorov@intel.com&gt;
Co-authored-by: Ebin-McW &lt;ebin.jose@multicorewareinc.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[SPIR-V] Add Fragment execution model (#141787)</title>
<updated>2025-06-10T13:44:11+00:00</updated>
<author>
<name>Nathan Gauër</name>
<email>brioche@google.com</email>
</author>
<published>2025-06-10T13:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65d530193e286a392844586af4b0037e4be41126'/>
<id>65d530193e286a392844586af4b0037e4be41126</id>
<content type='text'>
This commits allows the fragment execution model to be set using the
hlsl.shader attribute.

Fixes #136962</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commits allows the fragment execution model to be set using the
hlsl.shader attribute.

Fixes #136962</pre>
</div>
</content>
</entry>
</feed>
