HLSL: add geometry stage support for clip/cull distance
Changes: (1) Allow clip/cull builtins as both input and output in the same shader stage. Previously, not enough data was tracked to handle this. (2) Handle the extra array dimension in GS inputs. The synthesized external variable can now be created with the extra array dimension if needed, and the form conversion code is able to handle it as well. For example, both of these GS inputs would result in the same synthesized external type: triangle in float4 clip[3] : SV_ClipDistance triangle in float2 clip[3][2] : SV_ClipDistance In the second case, the inner array dimension packs with the 2-vector of floats into an array[4], which there is an array[3] of due to the triangle geometry.
Showing
- Test/baseResults/hlsl.clipdistance-1.geom.out 694 additions, 110 deletionsTest/baseResults/hlsl.clipdistance-1.geom.out
- Test/baseResults/hlsl.clipdistance-2.geom.out 761 additions, 8 deletionsTest/baseResults/hlsl.clipdistance-2.geom.out
- Test/baseResults/hlsl.clipdistance-3.geom.out 830 additions, 0 deletionsTest/baseResults/hlsl.clipdistance-3.geom.out
- Test/baseResults/hlsl.clipdistance-4.geom.out 819 additions, 0 deletionsTest/baseResults/hlsl.clipdistance-4.geom.out
- Test/baseResults/hlsl.semantic.geom.out 169 additions, 8 deletionsTest/baseResults/hlsl.semantic.geom.out
- Test/hlsl.clipdistance-1.geom 4 additions, 7 deletionsTest/hlsl.clipdistance-1.geom
- Test/hlsl.clipdistance-2.geom 1 addition, 1 deletionTest/hlsl.clipdistance-2.geom
- Test/hlsl.clipdistance-3.frag 0 additions, 2 deletionsTest/hlsl.clipdistance-3.frag
- Test/hlsl.clipdistance-3.geom 20 additions, 0 deletionsTest/hlsl.clipdistance-3.geom
- Test/hlsl.clipdistance-4.geom 21 additions, 0 deletionsTest/hlsl.clipdistance-4.geom
- gtests/Hlsl.FromFile.cpp 2 additions, 0 deletionsgtests/Hlsl.FromFile.cpp
- hlsl/hlslParseHelper.cpp 115 additions, 60 deletionshlsl/hlslParseHelper.cpp
- hlsl/hlslParseHelper.h 8 additions, 4 deletionshlsl/hlslParseHelper.h
Loading
Please register or sign in to comment