Closed bejado closed 5 years ago
Sorry about that. I was working on support for scalar block layout, and I think I broke this for you. It seems to be marking that member as packed, when it shouldn't be, since float3
has the correct 16-byte alignment and size for std140
layout. I'll look into this--we're aware that code is in need of serious refactoring (see #1074).
No problem! Thanks for the quick response
Yup, fallout from the scalar matrix support, surprised this wasn't caught in testing, sorry about that. Stepped through and the check goes here: https://github.com/KhronosGroup/SPIRV-Cross/blob/master/spirv_msl.cpp#L2571. Previously there would have been an early out path, and I suspect that was changed quite a lot for scalar support. @cdavis5e I'll wait for a PR to address this issue.
I think I'll start thinking about the packing refactor seriously in the meantime ...
Given the following GLSL:
SPIRV-cross
on the latest master now emits apacked_float3x3
forworldFromModelNormalMatrix
along with atypedef
:Isn't the correct type here a MSL
float3x3
? PreviouslySPIRV-cross
outputfloat3x3
, which has the same packing as GLSL'smat3
understd140
. This commit seems suspect.Command-line: