[all-commits] [llvm/llvm-project] 782bc4: [DXIL][Analysis] Uniquify duplicate resources in D...
Justin Bogner via All-commits
all-commits at lists.llvm.org
Fri Aug 23 12:07:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 782bc4f669d3c2b52d1c9db121dea6a545216149
https://github.com/llvm/llvm-project/commit/782bc4f669d3c2b52d1c9db121dea6a545216149
Author: Justin Bogner <mail at justinbogner.com>
Date: 2024-08-23 (Fri, 23 Aug 2024)
Changed paths:
M llvm/include/llvm/Analysis/DXILResource.h
M llvm/lib/Analysis/DXILResource.cpp
M llvm/test/Analysis/DXILResource/buffer-frombinding.ll
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list