Quick answer: SPIR-V validation reporting uninitialized output attribute despite the shader writing to it? Conditional writes don't count as initialization - write a default at the top of main().

Vertex shader writes gl_Position conditionally based on a uniform. Validation: output gl_Position may be uninitialized.

Initialize at function entry

void main() {
  gl_Position = vec4(0);
  if (condition) {
    gl_Position = compute();
  }
}

Validators flow-analyze writes. A default at entry satisfies the analysis regardless of branch coverage.

Or restructure to single assignment

gl_Position = condition ? a : b; - the ternary is always-assigned by definition.

Check vendor-specific extensions

Some vendors (Apple, Intel) parse SPIR-V more strictly than the reference. Validation passing on one driver doesn't guarantee all.

“Shader validation is a flow analysis. Make the analysis happy or platforms will refuse to compile.”

Add spirv-val to your pre-commit hook. Catching this at write-time is friendlier than at deploy-time.