HLSL/SPV: Declare DepthReplacing for shaders declaring SV_Depth* outputs.

This commit is contained in:
John Kessenich
2018-04-13 18:36:58 -06:00
parent 24eae066bb
commit c034c5a8a2
56 changed files with 158 additions and 0 deletions

View File

@@ -9343,11 +9343,17 @@ void HlslParseContext::correctOutput(TQualifier& qualifier)
qualifier.patch = false;
switch (qualifier.builtIn) {
case EbvFragDepth:
intermediate.setDepthReplacing();
intermediate.setDepth(EldAny);
break;
case EbvFragDepthGreater:
intermediate.setDepthReplacing();
intermediate.setDepth(EldGreater);
qualifier.builtIn = EbvFragDepth;
break;
case EbvFragDepthLesser:
intermediate.setDepthReplacing();
intermediate.setDepth(EldLess);
qualifier.builtIn = EbvFragDepth;
break;