microsoft / microsoft/DirectXShaderCompiler
[SPIR-V] support externally initialized non-floating-point column-major matrices
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
The following code is supported when targeting DirectX but is gated by an error when targeting spirv
https://hlsl.godbolt.org/z/zr9P6GKhx
struct A {
RWStructuredBuffer<int3x2> Buf;
};
A a1;
A a2;
[numthreads(1,1,1)]
void main() {
int3x2 m = a1.Buf[0];
a2.Buf[0] = m * 2;
}
https://github.com/microsoft/DirectXShaderCompiler/blob/b87d15dbd0bca2a1ef9c9f4d957de8784ec13fe5/tools/clang/test/CodeGenSPIRV/vk.layout.non-fp-matrix.array.struct.error.hlsl#L37
https://github.com/microsoft/DirectXShaderCompiler/blob/b87d15dbd0bca2a1ef9c9f4d957de8784ec13fe5/tools/clang/test/CodeGenSPIRV/vk.layout.non-fp-matrix.error.hlsl#L19
For now marking these as not supported for the offload test suite when targeting spirv.
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 with tools/clang/test/CodeGenSPIRV/vk.layout.non-fp-matrix.array.struct.error.hlsl and tools/clang/test/CodeGenSPIRV/vk.layout.non-fp-matrix.error.hlsl, then reproduce the linked HLSL example when targeting SPIR-V. Done means externally initialized non-floating-point column-major matrices are supported for this case and the relevant test coverage reflects the accepted behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100