KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.9k stars 816 forks source link

Fix HLSL built-in passthrough via inout #3528

Closed Svenny closed 4 months ago

Svenny commented 4 months ago

Without the change this one-liner gets pos output to a varying, not the position built-in.

void main(inout float4 pos : SV_Position, inout float2 uv : TEXCOORD0) {}

I'm not sure if this is the right way to fix it (I even don't really understand the meaning of declaredBuiltIn field)

CLAassistant commented 4 months ago

CLA assistant check
All committers have signed the CLA.

arcady-lunarg commented 4 months ago

Given that this doesn't break anything, I think this is fine. declaredBuiltin seems to be intended for this sort of use.