microsoft / microsoft/DirectXShaderCompiler
Multiple subscript into descriptor heaps are allowed.
Open
Nobody has claimed this yet.
bug
incorrect-code
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
Accessing the heaps through multiple subscript expressions is accepted, but seems like this is wrong:
// RUN: %dxc -T cs_6_6 %s | FileCheck %s
[numthreads(1, 1, 1)]
void main() {
RWStructuredBuffer<uint> a = SamplerDescriptorHeap[0][1][2];
a[0] = 10;
}
%1 = call %dx.types.Handle @dx.op.createHandleFromHeap(i32 218, i32 2, i1 true, i1 false) ; CreateHandleFromHeap(index,samplerHeap,nonUniformIndex)
Environment
- DXC version: HEAD (128e6ce2be8f09539c97cf28d6066d9a6b32b15c)
- Host Operating System: Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the inline HLSL reproducer with %dxc and FileCheck to confirm how repeated descriptor-heap subscripts are accepted. Trace the compiler handling for descriptor-heap subscripting, then add a regression check covering the intended rejection or diagnostic for multiple subscripts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100