Justin Bogner
2f39d138dc
[DirectX] Handle dx.RawBuffer in DXILResourceAccess ( #121725 )
...
This adds handling for raw and structured buffers when lowering resource
access via `llvm.dx.resource.getpointer`.
Fixes #121714
2025-01-23 21:35:34 -08:00
Justin Bogner
2c7c07df82
[DirectX] Remove the "checked" variants of dx.resource.load ( #120778 )
...
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}`.
2025-01-07 07:18:54 -08:00
Justin Bogner
aa07f92210
[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
2024-12-19 12:17:21 -07:00
Justin Bogner
0fca76d576
[DirectX] Introduce the DXILResourceAccess pass ( #116726 )
...
This pass transforms resource access via `llvm.dx.resource.getpointer`
into buffer loads and stores.
Fixes #114848 .
2024-12-18 10:13:45 -07:00