Add --hlsl-dx-position-w option
authorGreg Fischer <greg@lunarg.com>
Wed, 17 Nov 2021 01:42:12 +0000 (18:42 -0700)
committerGreg Fischer <greg@lunarg.com>
Wed, 17 Nov 2021 01:42:12 +0000 (18:42 -0700)
commite9564feb55492127cc3c556502bfa46875fc3992
treee481b3c27184466b187ab09462fe639753b54cbc
parent8a7860e4cb6c30b8ebbc6662788b3a27505f8fb4
Add --hlsl-dx-position-w option

This reciprocates the w component of SV_Position in HLSL fragment shaders
to provide DirectX compatibility for HLSL shaders in Vulkan.

Fixes #2244
StandAlone/StandAlone.cpp
Test/baseResults/hlsl.w-recip.frag.out [new file with mode: 0644]
Test/hlsl.w-recip.frag [new file with mode: 0644]
Test/runtests
glslang/HLSL/hlslParseHelper.cpp
glslang/MachineIndependent/ShaderLang.cpp
glslang/MachineIndependent/linkValidate.cpp
glslang/MachineIndependent/localintermediate.h
glslang/Public/ShaderLang.h