[ATOM-16433] AZSLc: Revert Matrix3x3 padding.
Trigger Error When identifying alignment issues.
Provide option to bypass error.
This is v1.7.29
This is the exhaustive solution to validate the struct/class/SRG Layout data alignment problem
when:
1- There are float or float2 variables
preceded by matrices or structs that end in matrices of type:
float2x2, float3x2, float4x2
In such case the "float" or "float2" should be prepadded by a float3
variable and the solution is describbed in the error produced
by AZSLc.
2- The other cases are when "float" type variables
are preceded by matrices or structs that end in matrices of type:
float2x3, float3x3, float4x3 In such case the "float" must be prepadded by a float2 variables.
This solution is describbed in the error produced
by AZSLc.
Alternatively the user can skip this aligment error validation with
'--no-aligment-validation' command line option.
Error message example:
tests\Emission\AsError\matRC_padding.azsl(,)
: IR error #131: Detected potential alignment issues related with DXC
flag '-fvk-use-dx-layout':
A 'float3' variable should be added before the variable 'm_f3' in
'struct /A/SD2/m_f3' at Line number 21 of
'D:\o3de-azslc\tests\Emission\AsError\matRC_padding.azsl'
A 'float3' variable should be added before the variable 'm_f5' in
'struct /A/SD2/m_f5' at Line number 23 of
'D:\o3de-azslc\tests\Emission\AsError\matRC_padding.azsl'
[ATOM-16433] AZSLc: Revert Matrix3x3 padding. Trigger Error When identifying alignment issues. Provide option to bypass error.
This is v1.7.29
This is the exhaustive solution to validate the struct/class/SRG Layout data alignment problem when: 1- There are float or float2 variables preceded by matrices or structs that end in matrices of type: float2x2, float3x2, float4x2 In such case the "float" or "float2" should be prepadded by a float3 variable and the solution is describbed in the error produced by AZSLc.
2- The other cases are when "float" type variables are preceded by matrices or structs that end in matrices of type: float2x3, float3x3, float4x3 In such case the "float" must be prepadded by a float2 variables. This solution is describbed in the error produced by AZSLc.
Alternatively the user can skip this aligment error validation with '--no-aligment-validation' command line option.
Error message example:
tests\Emission\AsError\matRC_padding.azsl(,) : IR error #131: Detected potential alignment issues related with DXC flag '-fvk-use-dx-layout':
A 'float3' variable should be added before the variable 'm_f5' in 'struct /A/SD2/m_f5' at Line number 23 of 'D:\o3de-azslc\tests\Emission\AsError\matRC_padding.azsl'
Signed-off-by: garrieta garrieta@amazon.com
[ATOM-16433] AZSLc: Revert Matrix3x3 padding. Trigger Error When identifying alignment issues. Provide option to bypass error.
Signed-off-by: garrieta garrieta@amazon.com