You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending the the following fragment shader through SpirvToolsEliminateDeadInputComponents() and SpirvToolsAnalyzeDeadOutputStores() results in t getting eliminated, but not pos. Can't pos also be eliminated? The analyze pass is correctly detecting that only c is being used, and only returning it as part of the livelocs.
And then similarly, SpirvToolsEliminateDeadOutputStores() would need to also to remove pos.
in Vertex
{
vec3 pos;
vec4 c;
vec2 t;
} iVert;
out vec4 fragColor;
void main()
{
vec4 color = vec4(iVert.c);
fragColor = color;
}
Compiled using 'auto map locations'.
Thanks
The text was updated successfully, but these errors were encountered:
mbechard
changed the title
SpirvToolsEliminateDeadInputComponents() seems to only strips trailing members from blocks
Request: allow SpirvToolsEliminateDeadInputComponents() to strips non-trailing members from blocks
Apr 3, 2024
mbechard
changed the title
Request: allow SpirvToolsEliminateDeadInputComponents() to strips non-trailing members from blocks
Request: allow SpirvToolsEliminateDeadInputComponents() to strip non-trailing members from blocks
Apr 3, 2024
As you are likely aware, moving non-trailing members of input blocks in vertex shaders is impossible and would cause incompatibility at the vertex input interface. Likewise for output blocks in frag shaders and the frag output interface.
Technically we could remove non-trailing members from other shader interfaces but we would have to add logic to remap any OpAccessChain instructions that index into the block because the positions of the remaining members would change. This is very do-able. It would not cause any changes to the larger workflow. It would just be some coding effort.
Sending the the following fragment shader through SpirvToolsEliminateDeadInputComponents() and SpirvToolsAnalyzeDeadOutputStores() results in
t
getting eliminated, but notpos
. Can'tpos
also be eliminated? The analyze pass is correctly detecting that onlyc
is being used, and only returning it as part of the livelocs.And then similarly, SpirvToolsEliminateDeadOutputStores() would need to also to remove
pos
.Vertex
Fragment
Compiled using 'auto map locations'.
Thanks
The text was updated successfully, but these errors were encountered: