Merge pull request #1914 from NZJenkins/reserved_constants_flag

Treat X_D3DSCM_NORESERVEDCONSTANTS as a flag
This commit is contained in:
PatrickvL 2020-06-02 14:27:02 +02:00 committed by GitHub
commit ab6b4786bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}