mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-25 04:09:41 +00:00
5e5b12e931
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.
7 lines
253 B
GLSL
7 lines
253 B
GLSL
float4 main(in float4 pos : SV_Position,
|
|
in float clip[2] : SV_ClipDistance, // array of scalar float
|
|
in float cull[2] : SV_CullDistance) : SV_Target0 // array of scalar float
|
|
{
|
|
return pos + clip[0] + cull[0];
|
|
}
|