|
|
@@ -1977,37 +1977,37 @@ namespace bgfx
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- if (hasFrontFacing)
|
|
|
+ if (hasPrimitiveId)
|
|
|
{
|
|
|
- if (profile->id < 400)
|
|
|
+ if (profile->id >= 400)
|
|
|
{
|
|
|
preprocessor.writef(
|
|
|
- " \\\n\t%sfloat __vface : VFACE"
|
|
|
+ " \\\n\t%suint gl_PrimitiveID : SV_PrimitiveID"
|
|
|
, arg++ > 0 ? ", " : " "
|
|
|
);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- preprocessor.writef(
|
|
|
- " \\\n\t%sbool gl_FrontFacing : SV_IsFrontFace"
|
|
|
- , arg++ > 0 ? ", " : " "
|
|
|
- );
|
|
|
+ bx::write(_messageWriter, &messageErr, "gl_PrimitiveID builtin is not supported by D3D9 HLSL.\n");
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (hasPrimitiveId)
|
|
|
+ if (hasFrontFacing)
|
|
|
{
|
|
|
- if (profile->id >= 400)
|
|
|
+ if (profile->id < 400)
|
|
|
{
|
|
|
preprocessor.writef(
|
|
|
- " \\\n\t%suint gl_PrimitiveID : SV_PrimitiveID"
|
|
|
+ " \\\n\t%sfloat __vface : VFACE"
|
|
|
, arg++ > 0 ? ", " : " "
|
|
|
);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- bx::write(_messageWriter, &messageErr, "gl_PrimitiveID builtin is not supported by D3D9 HLSL.\n");
|
|
|
- return false;
|
|
|
+ preprocessor.writef(
|
|
|
+ " \\\n\t%sbool gl_FrontFacing : SV_IsFrontFace"
|
|
|
+ , arg++ > 0 ? ", " : " "
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
|