KhronosGroup / KhronosGroup/SPIRV-Cross
MSL: row/column major issue.
- Dominant language
- GLSL
- Stars
- 2.5k
- Forks
- 713
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 16
Description
the following matrix in HLSL:
```
float4x3 normalMatrix;
```
Gets translated to MSL as:
```
float3x4 normalMatrix;
```
Although the matrix dimensions are correct, the data does not seem to be copied correctly. For instance, an identity matrix ends up in MSL as:
| 1 | 0 | 0 | 0 |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 |
It looks like we are properly generating a float3x4 matrix but with column-major data layout.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the HLSL-to-MSL translation for a float4x3 normalMatrix and compare the resulting matrix data with the reported identity-matrix layout. Done means the generated float3x4 preserves the source matrix's row/column data ordering.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100