KhronosGroup / KhronosGroup/glslang

Matrix-majorness ignored when on nested structure members

Open
#1,734 2 comments 0 reactions 0 assignees View on GitHub
HLSL Missing Functionality
Dominant language
C++
Stars
3.6k
Forks
989
Avg merge
1d 2h
Merged PRs (30d)
31

Description

Hi,

So basically it's the same issue as described [here ](https://github.com/KhronosGroup/glslang/issues/789) but with the template version of ConstantBuffer.

```
struct Mybuffer
{
row_major float4x4 m_objectMatrix;
float4 vec1;
};

ConstantBuffer MybuffeCB;

float4 main() : SV_Target0
{
return mul(MybuffeCB.m_objectMatrix, MybuffeCB.vec1);
}
```

This shader always generates RowMajor for the m_objectMatrix even if I use "row_major" or "column_major".

Contributor guide

Open the contributing guide

Research direction

Start with the shader reproducer in this issue and compare its behavior with the linked issue #789. Trace the HLSL ConstantBuffer handling and generated matrix-major metadata, then verify that the explicit row_major or column_major qualifier is preserved for nested structure members.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.