Vulkan: Fix SpirV Error in Tessellation Control Shader When feature varyingsRequireMatchingPrecisionInSpirv is enabled, in the generated SpirV, if the shader output varying precision needs to be adjusted, we create a new shader varying to replace the original shader output varying, and save the original shader output varying to the replacement shader output varying at the end of the function. However, this does not work for tessellation control shader, because the SpirV generated will perform following equivalent peudo code: layout (vertices=3) out; in mediump float tc_in[]; out mediump float tc_out[]; highp float original_out[]; void main() { original_out[gl_InvocationID] = tc_in[gl_InvocationID]; // some other code in between tc_out = original_out; } The last line will attempt to write to all indice of tc_out. However, according to the spec, "each tessellation control shader invocation may write only to those outputs corresponding to its output patch vertex. Tessellation control shader must use the special variable gl_InvocationID as the vertex number index when writing to per-vertex output variables." This change fixes the problem by keeping the precision of tessellation control shader output as it is, and adjust the precision of tessellation evaluation shader input instead. Bug: b/42266751 Change-Id: I398545e2cbbf703c716d6738f1ba278baac4171f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6521225 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>