csyonghe / Spire

Other
174 stars 22 forks source link

Vertex shader `gl_Position` output being passed to fragment shader unnecessarily #39

Closed tangent-vector closed 7 years ago

tangent-vector commented 7 years ago

If I declare a simple vertex + fragment shader, then I find that the projCoord computed in my vertex shader is being declared as a VS output and an FS input, even though the value is never used in the FS.

It seems like the logic for determining which components are "live" coming out of a stage needs to understand that system-consumed "outputs" in a given stage do not actual make the corresponding component live-out (although they do make it "live" from a DCE perspective).

csyonghe commented 7 years ago

I think I have already fixed this issue, probably I haven't checked them in. I'll make sure this is fixed in the next commit.

tangent-vector commented 7 years ago

This issue has been resolved, and I can confirm the fix. Closing.