Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ATOM-16433] AZSLc: Revert Matrix3x3 padding. #7

Conversation

galibzon
Copy link
Contributor

[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'

Signed-off-by: garrieta [email protected]

[ATOM-16433] AZSLc: Revert Matrix3x3 padding.
Trigger Error When identifying alignment issues.
Provide option to bypass error.

Signed-off-by: garrieta [email protected]

Throw Exception When Data Layout Will Encounter Alignment Differences
With DXC '-fvk-use-dx-layout'

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'
-------------------------------------------------------------

Signed-off-by: garrieta <[email protected]>
@galibzon galibzon force-pushed the Atom/garrieta/ATOM-16433/floatRxC_alignment branch from d7aecb0 to 148e0b8 Compare September 21, 2021 17:49
@galibzon galibzon merged commit 695ebd7 into o3de:development Sep 22, 2021
galibzon added a commit to aws-lumberyard-dev/o3de-azslc that referenced this pull request Oct 14, 2021
Throw Exception When Data Layout Will Encounter Alignment Differences
With DXC '-fvk-use-dx-layout'

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'.
Alternatively you can use the option '--no-alignment-validation' to void this error and compile as is.:
- 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'
-------------------------------------------------------------

Signed-off-by: garrieta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants