add cross-stage check for missing outputs

If an 'in' is present in a shader stage, make sure a matching 'out'
is present in the previous stage. Only enabled when doing Vulkan.

This commit also fixes a bug where previous stage's linkerObjects
got polluted with 'in' variables from the next stage when merging
linker objects.
This commit is contained in:
Malcolm Bechard 2024-07-12 00:51:48 -04:00 committed by arcady-lunarg
parent 6a28e226c7
commit 69249e46b6
6 changed files with 439 additions and 25 deletions

32
Test/iomap.crossStage.vk.2.geom Executable file
View file

@ -0,0 +1,32 @@
#version 460
layout(points) in;
layout(triangle_strip, max_vertices=3) out;
// Not written by vertex shader
in vec4 vgo1[];
in vec4 color[];
out vec4 colorOut;
in VV
{
vec4 val;
} vv[];
out VV2
{
vec4 vv2Val;
};
void main()
{
for (int i = 0; i < 3; i++) {
colorOut = color[i] * vv[i].val;
vv2Val = vec4(1.0);
EmitVertex();
}
EndPrimitive();
}