|
Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
| #
aa07f922 |
| 19-Dec-2024 |
Justin Bogner <mail@justinbogner.com> |
[DirectX][SPIRV] Consistent names for HLSL resource intrinsics (#120466)
Rename HLSL resource-related intrinsics to be consistent with the naming
conventions discussed in [wg-hlsl:0014].
This is
[DirectX][SPIRV] Consistent names for HLSL resource intrinsics (#120466)
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
show more ...
|
| #
3eca15cb |
| 18-Dec-2024 |
Justin Bogner <mail@justinbogner.com> |
[DirectX] Split resource info into type and binding info. NFC (#119773)
This splits the DXILResourceAnalysis pass into TypeAnalysis and
BindingAnalysis passes. The type analysis pass is made immuta
[DirectX] Split resource info into type and binding info. NFC (#119773)
This splits the DXILResourceAnalysis pass into TypeAnalysis and
BindingAnalysis passes. The type analysis pass is made immutable and
populated lazily so that it can be used earlier in the pipeline without
needing to carefully maintain the invariants of the binding analysis.
Fixes #118400
show more ...
|
|
Revision tags: llvmorg-19.1.6 |
|
| #
482237e8 |
| 16-Dec-2024 |
Justin Bogner <mail@justinbogner.com> |
[DirectX] Get resource information via TargetExtType (#119772)
Instead of storing an auxilliary structure with the information from the
DXIL resource target extension types duplicated, access the i
[DirectX] Get resource information via TargetExtType (#119772)
Instead of storing an auxilliary structure with the information from the
DXIL resource target extension types duplicated, access the information
that we can via the type itself.
This also means we need to handle some of the target extension types we
haven't fully defined yet, like Texture and CBuffer. For now we make an
educated guess to what those should look like based on llvm/wg-hlsl#76,
and we can update them fairly easily when we've defined them more
thoroughly.
First part of #118400
show more ...
|
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
| #
782bc4f6 |
| 23-Aug-2024 |
Justin Bogner <mail@justinbogner.com> |
[DXIL][Analysis] Uniquify duplicate resources in DXILResourceAnalysis
If a resources is used multiple times, we should only have one resource record for it. This comes up most prominantly with array
[DXIL][Analysis] Uniquify duplicate resources in DXILResourceAnalysis
If a resources is used multiple times, we should only have one resource record for it. This comes up most prominantly with arrays of resources like so:
```hlsl RWBuffer<float4> BufferArray[10] : register(u0, space4); RWBuffer<float4> B1 = BufferArray[0]; RWBuffer<float4> B2 = BufferArray[SomeIndex]; RWBuffer<float4> B3 = BufferArray[3]; ```
In this case, there's only one resource, but we'll generate 3 different `dx.handle.fromBinding` calls to access different slices.
Note that this adds some API that won't be used until #104447 later in the stack. Trying to avoid that results in unnecessary churn.
Fixes #105143
Pull Request: https://github.com/llvm/llvm-project/pull/105602
show more ...
|
| #
1a2a18fd |
| 20-Aug-2024 |
Justin Bogner <mail@justinbogner.com> |
[DXIL][Analysis] Update test to match comment. NFC (#105409)
The mismatch between the comment on this test and the test itself was
pointed out in
https://github.com/llvm/llvm-project/pull/100699#d
[DXIL][Analysis] Update test to match comment. NFC (#105409)
The mismatch between the comment on this test and the test itself was
pointed out in
https://github.com/llvm/llvm-project/pull/100699#discussion_r1715835841,
but apparently I failed to actually commit the fix.
show more ...
|
|
Revision tags: llvmorg-19.1.0-rc3 |
|
| #
51ede55e |
| 16-Aug-2024 |
Justin Bogner <mail@justinbogner.com> |
Re-Apply "[DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers" (#104517)
Some build configs allow `llvm_unreachable` in a constexpr context, but
not all, so these functions that m
Re-Apply "[DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers" (#104517)
Some build configs allow `llvm_unreachable` in a constexpr context, but
not all, so these functions that map a fully covered enum to a string
can't be constexpr. This version fixes that by dropping constexpr from
those functions.
This reverts commit fcc318ff7960d7de8cbac56eb4f32b44b5261677, reapplying
28d577ecefa1557f5dea5566bf33b885c563d14b.
Original message follows:
This implements the DXILResourceAnalysis pass for `dx.TypedBuffer` and
`dx.RawBuffer` types. This should be sufficient to lower
`dx.handle.fromBinding` for this set of types, but it leaves a number of
TODOs around for other resource types.
This also includes a straightforward `print` method in `ResourceInfo` to
make the analysis testable. This is deliberately different than the
printer in `lib/Target/DirectX/DXILResource.cpp`, which attempts to
print bindings in a format compatible with the comments `dxc` prints. We
will eventually want to make that functionality driven by this analysis
pass, but it isn't sufficient for testing so we need both.
show more ...
|
| #
28d577ec |
| 14-Aug-2024 |
Justin Bogner <mail@justinbogner.com> |
[DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers
This implements the DXILResourceAnalysis pass for `dx.TypedBuffer` and `dx.RawBuffer` types. This should be sufficient to lower
[DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers
This implements the DXILResourceAnalysis pass for `dx.TypedBuffer` and `dx.RawBuffer` types. This should be sufficient to lower `dx.handle.fromBinding` for this set of types, but it leaves a number of TODOs around for other resource types.
This also includes a straightforward `print` method in `ResourceInfo` to make the analysis testable. This is deliberately different than the printer in `lib/Target/DirectX/DXILResource.cpp`, which attempts to print bindings in a format compatible with the comments `dxc` prints. We will eventually want to make that functionality driven by this analysis pass, but it isn't sufficient for testing so we need both.
Pull Request: https://github.com/llvm/llvm-project/pull/100699
show more ...
|