Treat X_D3DSCM_NORESERVEDCONSTANTS as a flag

This commit is contained in:
Anthony Miles 2020-06-03 00:07:02 +12:00
parent e5af2b1754
commit 201ab08043
1 changed files with 3 additions and 2 deletions

View File

@ -3905,8 +3905,9 @@ void UpdateViewPortOffsetAndScaleConstants()
// Store viewport offset and scale in constant registers 58 (c-38) and
// 59 (c-37) used for screen space transformation.
// We only do this if X_D3DSCM_NORESERVEDCONSTANTS is not set, since enabling this flag frees up these registers for shader used
if (g_Xbox_VertexShaderConstantMode != X_D3DSCM_NORESERVEDCONSTANTS)
{
// Treat this as a flag
// Test Case: GTA III, Soldier of Fortune II
if (!(g_Xbox_VertexShaderConstantMode & X_D3DSCM_NORESERVEDCONSTANTS)) {
g_pD3DDevice->SetVertexShaderConstantF(X_D3DSCM_RESERVED_CONSTANT_SCALE + X_D3DSCM_CORRECTION, vScale, 1);
g_pD3DDevice->SetVertexShaderConstantF(X_D3DSCM_RESERVED_CONSTANT_OFFSET + X_D3DSCM_CORRECTION, vOffset, 1);
}