HLSL: implement #pragma pack_matrix(layout)
This adds support for #pragma pack_matrix() to the HLSL front end. The pragma sets the default matrix layout for subsequent unqualified matrices in structs or buffers. Explicit qualification overrides the pragma value. Matrix layout is not permitted at the structure level in HLSL, so only leaves which are matrix types can be so qualified. Note that due to the semantic (not layout) difference in first matrix indirections between HLSL and SPIR-V, the sense of row and column major are flipped. That's independent of this PR: just a factor to note. A column_major qualifier appears as a RowMajor member decoration in SPIR-V modules, and vice versa.
This commit is contained in:
parent
7497e7c9f3
commit
6a264bed88
4 changed files with 329 additions and 0 deletions
|
|
@ -195,6 +195,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
{"hlsl.logicalConvert.frag", "main"},
|
||||
{"hlsl.logical.unary.frag", "main"},
|
||||
{"hlsl.loopattr.frag", "main"},
|
||||
{"hlsl.matpack-pragma.frag", "main"},
|
||||
{"hlsl.mip.operator.frag", "main"},
|
||||
{"hlsl.mip.negative.frag", "main"},
|
||||
{"hlsl.mip.negative2.frag", "main"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue