<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/DirectX/BufferLoad.ll, 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>[DirectX] Add support for typedBufferLoad and Store for RWBuffer&lt;double2&gt; and RWBuffer&lt;double&gt; (#139996)</title>
<updated>2025-05-30T15:16:19+00:00</updated>
<author>
<name>Sarah Spall</name>
<email>sarahspall@microsoft.com</email>
</author>
<published>2025-05-30T15:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7f34d3acbac3df2bceb5f6450413706bde38908c'/>
<id>7f34d3acbac3df2bceb5f6450413706bde38908c</id>
<content type='text'>
typedBufferLoad of double/double2 is expanded to a typedBufferLoad of a
&lt;2 x i32&gt;/&lt;4 x i32&gt; and asdouble
typedBufferStore of a double/double2 is expanded to a splitdouble and a
typedBufferStore of a &lt;2 x i32&gt;/&lt;4 x i32&gt;
Add tests showing result of intrinsic expansion for typedBufferLoad and
typedBufferStore
Add tests showing dxil op lowering can handle typedBufferLoad and
typedBufferStore where the target type doesn't match the typedBufferLoad
and typedBufferStore type
Closes #104423</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
typedBufferLoad of double/double2 is expanded to a typedBufferLoad of a
&lt;2 x i32&gt;/&lt;4 x i32&gt; and asdouble
typedBufferStore of a double/double2 is expanded to a splitdouble and a
typedBufferStore of a &lt;2 x i32&gt;/&lt;4 x i32&gt;
Add tests showing result of intrinsic expansion for typedBufferLoad and
typedBufferStore
Add tests showing dxil op lowering can handle typedBufferLoad and
typedBufferStore where the target type doesn't match the typedBufferLoad
and typedBufferStore type
Closes #104423</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Add resource name argument to llvm.dx.handlefrom[implicit]binding intrinsics (#139991)</title>
<updated>2025-05-28T05:57:01+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2025-05-28T05:57:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=27675ccdd6315b560f5f90db34f6a4520fa26b6b'/>
<id>27675ccdd6315b560f5f90db34f6a4520fa26b6b</id>
<content type='text'>
Adds resource name argument to `llvm.dx.handlefrombinding` and `llvm.dx.handlefromimplicitbinding` intrinsics.
SPIR-V currently does not seem to need the resource names so this change only affects DirectX binding intrinsics.

Part 2/4 of https://github.com/llvm/llvm-project/issues/105059</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds resource name argument to `llvm.dx.handlefrombinding` and `llvm.dx.handlefromimplicitbinding` intrinsics.
SPIR-V currently does not seem to need the resource names so this change only affects DirectX binding intrinsics.

Part 2/4 of https://github.com/llvm/llvm-project/issues/105059</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Change placeholders from `undef` to `poison` used in fully instantiated vector [NFC] (#130970)</title>
<updated>2025-03-16T09:47:48+00:00</updated>
<author>
<name>Pedro Lobo</name>
<email>pedro.lobo@tecnico.ulisboa.pt</email>
</author>
<published>2025-03-16T09:47:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de03e102d1ea4da1c62b9ad735848d8869d08b44'/>
<id>de03e102d1ea4da1c62b9ad735848d8869d08b44</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DXIL] Define and generate `DXILAttribute` and `DXILProperty` (#117072)</title>
<updated>2025-01-22T01:33:45+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>50529406+inbelic@users.noreply.github.com</email>
</author>
<published>2025-01-22T01:33:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=011b618644113996e2c0a8e57db40f89d20878e3'/>
<id>011b618644113996e2c0a8e57db40f89d20878e3</id>
<content type='text'>
- Redefines `DXILAttribute` to denote a function attribute, compatible
to how it was define in DXC/LLVM 3.7
- Fix how `DXILAttribute` is emitted to be a struct of set attributes
instead of an "or" of the enums
- Implement the lowering of `DXILAttribute` to LLVM function attributes
in `DXILOpBuilder.cpp`. A custom mapping is defined.
- Audit all current ops to specify the correct attributes consistent
with DXC. This is done here to allow for testing.
- Update testcases in `llvm/test/CodeGen/DirectX` of all ops with
attributes to match that attributes are set
- Update testcases of ops that had previously incorrectly set attributes
to check there is no attributes set
- Defines `DXILProperty` to denote the other type of attributes from DXC
used to query properties.
- Emit `DXILProperty` as a struct of set attributes.
- Updates `DXIL.td` to specify applicable `DXILProperty`s on ops

Note: `DXILProperty` was referred to as 'queryable attributes' in design
discussion. Changed to property to allow for better expression in
`DXIL.td`

Resolves #114461
Resolves #115912</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Redefines `DXILAttribute` to denote a function attribute, compatible
to how it was define in DXC/LLVM 3.7
- Fix how `DXILAttribute` is emitted to be a struct of set attributes
instead of an "or" of the enums
- Implement the lowering of `DXILAttribute` to LLVM function attributes
in `DXILOpBuilder.cpp`. A custom mapping is defined.
- Audit all current ops to specify the correct attributes consistent
with DXC. This is done here to allow for testing.
- Update testcases in `llvm/test/CodeGen/DirectX` of all ops with
attributes to match that attributes are set
- Update testcases of ops that had previously incorrectly set attributes
to check there is no attributes set
- Defines `DXILProperty` to denote the other type of attributes from DXC
used to query properties.
- Emit `DXILProperty` as a struct of set attributes.
- Updates `DXIL.td` to specify applicable `DXILProperty`s on ops

Note: `DXILProperty` was referred to as 'queryable attributes' in design
discussion. Changed to property to allow for better expression in
`DXIL.td`

Resolves #114461
Resolves #115912</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Remove the "checked" variants of `dx.resource.load` (#120778)</title>
<updated>2025-01-07T15:18:54+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2025-01-07T15:18:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2c7c07df828e5be1480c38d2a93a82294da10b47'/>
<id>2c7c07df828e5be1480c38d2a93a82294da10b47</id>
<content type='text'>
We'd introduced separate versions of `llvm.dx.resource.load` with a
struct return to handle the CheckAccessFullyMapped case without making
the IR for the common case unnecessarily complicated. However, at this
point the common case is really `resource.getpointer`, so the ergonomics
of a simplified version of `load` don't actually gain us as much as the
cost of having multiple opcodes.

Drop the `dx.resource.loadchecked` functions and have `dx.resource.load`
consistently return `{element_type, i1}`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We'd introduced separate versions of `llvm.dx.resource.load` with a
struct return to handle the CheckAccessFullyMapped case without making
the IR for the common case unnecessarily complicated. However, at this
point the common case is really `resource.getpointer`, so the ergonomics
of a simplified version of `load` don't actually gain us as much as the
cost of having multiple opcodes.

Drop the `dx.resource.loadchecked` functions and have `dx.resource.load`
consistently return `{element_type, i1}`.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX][SPIRV] Consistent names for HLSL resource intrinsics (#120466)</title>
<updated>2024-12-19T19:17:21+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2024-12-19T19:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa07f922103ebe8e78c8da4c754b43af3c129f3e'/>
<id>aa07f922103ebe8e78c8da4c754b43af3c129f3e</id>
<content type='text'>
Rename HLSL resource-related intrinsics to be consistent with the naming
conventions discussed in [wg-hlsl:0014].

This is an entirely mechanical change, consisting of the following
commands and automated formatting.

```sh
git grep -l handle.fromBinding | xargs perl -pi -e \
  's/(dx|spv)(.)handle.fromBinding/$1$2resource$2handlefrombinding/g'
git grep -l typedBufferLoad_checkbit | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferLoad_checkbit/$1$2resource$2loadchecked$2typedbuffer/g'
git grep -l typedBufferLoad | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferLoad/$1$2resource$2load$2typedbuffer/g'
git grep -l typedBufferStore | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferStore/$1$2resource$2store$2typedbuffer/g'
git grep -l bufferUpdateCounter | xargs perl -pi -e \
  's/(dx|spv)(.)bufferUpdateCounter/$1$2resource$2updatecounter/g'
git grep -l cast_handle | xargs perl -pi -e \
  's/(dx|spv)(.)cast.handle/$1$2resource$2casthandle/g'
```

[wg-hlsl:0014]: https://github.com/llvm/wg-hlsl/blob/main/proposals/0014-consistent-naming-for-dx-intrinsics.md</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename HLSL resource-related intrinsics to be consistent with the naming
conventions discussed in [wg-hlsl:0014].

This is an entirely mechanical change, consisting of the following
commands and automated formatting.

```sh
git grep -l handle.fromBinding | xargs perl -pi -e \
  's/(dx|spv)(.)handle.fromBinding/$1$2resource$2handlefrombinding/g'
git grep -l typedBufferLoad_checkbit | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferLoad_checkbit/$1$2resource$2loadchecked$2typedbuffer/g'
git grep -l typedBufferLoad | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferLoad/$1$2resource$2load$2typedbuffer/g'
git grep -l typedBufferStore | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferStore/$1$2resource$2store$2typedbuffer/g'
git grep -l bufferUpdateCounter | xargs perl -pi -e \
  's/(dx|spv)(.)bufferUpdateCounter/$1$2resource$2updatecounter/g'
git grep -l cast_handle | xargs perl -pi -e \
  's/(dx|spv)(.)cast.handle/$1$2resource$2casthandle/g'
```

[wg-hlsl:0014]: https://github.com/llvm/wg-hlsl/blob/main/proposals/0014-consistent-naming-for-dx-intrinsics.md</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Update DXIL op codes for annotateHandle and createHandleFromBinding to match the spec and DXC (#114473)</title>
<updated>2024-11-04T19:56:57+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2024-11-04T19:56:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19ad7dd8dc92f2999c7651945451f3a24e034df9'/>
<id>19ad7dd8dc92f2999c7651945451f3a24e034df9</id>
<content type='text'>
DXIL spec for reference:
[DXIL.rst](https://github.com/microsoft/DirectXShaderCompiler/blob/5704c4744e8752adf5c1bacbf94638f30ff330fd/docs/DXIL.rst?plain=1#L2330).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DXIL spec for reference:
[DXIL.rst](https://github.com/microsoft/DirectXShaderCompiler/blob/5704c4744e8752adf5c1bacbf94638f30ff330fd/docs/DXIL.rst?plain=1#L2330).</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Implement typedBufferLoad_checkbit (#108087)</title>
<updated>2024-09-11T23:24:38+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2024-09-11T23:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=34e20f18f0a77cece57e13e179dcf5b58992a705'/>
<id>34e20f18f0a77cece57e13e179dcf5b58992a705</id>
<content type='text'>
This represents a typedBufferLoad that's followed by
"CheckAccessFullyMapped". It returns an extra `i1` representing that
value.

Fixes #108085</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This represents a typedBufferLoad that's followed by
"CheckAccessFullyMapped". It returns an extra `i1` representing that
value.

Fixes #108085</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Lower `@llvm.dx.typedBufferLoad` to DXIL ops</title>
<updated>2024-09-09T20:21:22+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2024-09-09T20:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3f22756f391e20040fa3581206b77c409433bd9f'/>
<id>3f22756f391e20040fa3581206b77c409433bd9f</id>
<content type='text'>
The `@llvm.dx.typedBufferLoad` intrinsic is lowered to `@dx.op.bufferLoad`.
There's some complexity here in translating to scalarized IR, which I've
abstracted out into a function that should be useful for samples, gathers, and
CBuffer loads.

I've also updated the DXILResources.rst docs to match what I'm doing here and
the proposal in llvm/wg-hlsl#59. I've removed the content about stores and raw
buffers for now with the expectation that it will be added along with the work.

Note that this change includes a bit of a hack in how it deals with
`getOverloadKind` for the `dx.ResRet` types - we need to adjust how we deal
with operation overloads to generate a table directly rather than proxy through
the OverloadKind enum, but that's left for a later change here.

Part of #91367

Pull Request: https://github.com/llvm/llvm-project/pull/104252
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `@llvm.dx.typedBufferLoad` intrinsic is lowered to `@dx.op.bufferLoad`.
There's some complexity here in translating to scalarized IR, which I've
abstracted out into a function that should be useful for samples, gathers, and
CBuffer loads.

I've also updated the DXILResources.rst docs to match what I'm doing here and
the proposal in llvm/wg-hlsl#59. I've removed the content about stores and raw
buffers for now with the expectation that it will be added along with the work.

Note that this change includes a bit of a hack in how it deals with
`getOverloadKind` for the `dx.ResRet` types - we need to adjust how we deal
with operation overloads to generate a table directly rather than proxy through
the OverloadKind enum, but that's left for a later change here.

Part of #91367

Pull Request: https://github.com/llvm/llvm-project/pull/104252
</pre>
</div>
</content>
</entry>
</feed>
