Re-order builtin inputs to try and avoid suspected AMD driver bug

* In principle the fake SV_ inputs should be able to come in any order, but it
  seems if SV_IsFrontFace is last it can get undefined/wrong results (e.g.
  returning 1 when front-face culling is enabled or vice-versa). Moving it to
  the first seems to fix the issue, and at least shouldn't make anything any
  worse.
This commit is contained in:
baldurk
2022-10-28 14:12:51 +01:00
parent 28b63fe56c
commit 91a77c1698
+11 -6
View File
@@ -2052,18 +2052,23 @@ struct PSInitialData
if(usePrimitiveID)
{
extractHlsl += R"(
void ExtractInputsPS(PSInput IN, float4 debug_pixelPos : SV_Position, uint prim : SV_PrimitiveID,
uint sample : SV_SampleIndex, uint covge : SV_Coverage,
bool fface : SV_IsFrontFace)
void ExtractInputsPS(PSInput IN,
float4 debug_pixelPos : SV_Position,
uint prim : SV_PrimitiveID,
uint fface : SV_IsFrontFace,
uint sample : SV_SampleIndex,
uint covge : SV_Coverage)
{
)";
}
else
{
extractHlsl += R"(
void ExtractInputsPS(PSInput IN, float4 debug_pixelPos : SV_Position,
uint sample : SV_SampleIndex, uint covge : SV_Coverage,
bool fface : SV_IsFrontFace)
void ExtractInputsPS(PSInput IN,
float4 debug_pixelPos : SV_Position,
uint fface : SV_IsFrontFace,
uint sample : SV_SampleIndex,
uint covge : SV_Coverage)
{
)";
}