Treat X_D3DSCM_NORESERVEDCONSTANTS as a flag
This commit is contained in:
parent
e5af2b1754
commit
201ab08043
|
@ -3905,8 +3905,9 @@ void UpdateViewPortOffsetAndScaleConstants()
|
||||||
// Store viewport offset and scale in constant registers 58 (c-38) and
|
// Store viewport offset and scale in constant registers 58 (c-38) and
|
||||||
// 59 (c-37) used for screen space transformation.
|
// 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
|
// 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_SCALE + X_D3DSCM_CORRECTION, vScale, 1);
|
||||||
g_pD3DDevice->SetVertexShaderConstantF(X_D3DSCM_RESERVED_CONSTANT_OFFSET + X_D3DSCM_CORRECTION, vOffset, 1);
|
g_pD3DDevice->SetVertexShaderConstantF(X_D3DSCM_RESERVED_CONSTANT_OFFSET + X_D3DSCM_CORRECTION, vOffset, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue