diff options
| author | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2013-03-31 21:15:58 -0300 |
|---|---|---|
| committer | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2013-03-31 21:15:58 -0300 |
| commit | 5ae8bec2fd6fd74ed1d7d0e9db0ca83fd4eb5820 (patch) | |
| tree | 874513be1d33ef60c6d2f245c50f320a371c83bc /Source | |
| parent | f432d6038e353f98cbe0fa522bd9d6034027246e (diff) | |
Disable dual source blend until a valid support test is found
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Plugins/Plugin_VideoDX9/Src/main.cpp | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index 793b520d18..589b29c66b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -103,7 +103,7 @@ void InitBackendInfo() g_Config.backend_info.bUseMinimalMipCount = true; g_Config.backend_info.bSupports3DVision = true; g_Config.backend_info.bSupportsSeparateAlphaFunction = device_caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND; - // Dual source blend will be tested later because in most devices the support is not declared in the device caps + // Dual source blend disabled by default until a proper method to test for support is found g_Config.backend_info.bSupportsDualSourceBlend = false; g_Config.backend_info.bSupportsFormatReinterpretation = true; g_Config.backend_info.bSupportsPixelLighting = C_PLIGHTS + 40 <= maxConstants && C_PMATERIALS + 4 <= maxConstants; @@ -189,45 +189,7 @@ void VideoBackend::Video_Prepare() PixelShaderManager::Init(); CommandProcessor::Init(); PixelEngine::Init(); - DLCache::Init(); - // Test fo dual source blend support - // We can only support dual source blend if we first suport a separate alpha function - g_Config.backend_info.bSupportsDualSourceBlend = g_Config.backend_info.bSupportsSeparateAlphaFunction; - if(g_Config.backend_info.bSupportsDualSourceBlend) - { - // Test all the belnding modes that dual source blend requires - DWORD d3d_state = 0; - DWORD d3d_old_state = 0; - D3D::dev->SetRenderState(D3DRS_ALPHABLENDENABLE, true); - D3D::dev->GetRenderState(D3DRS_SRCBLEND, &d3d_old_state); - // Test for source D3DBLEND_SRCCOLOR2 support - D3D::dev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR2); - D3D::dev->GetRenderState(D3DRS_SRCBLEND, &d3d_state); - g_Config.backend_info.bSupportsDualSourceBlend = (d3d_state == D3DBLEND_SRCCOLOR2); - // Test for source D3DBLEND_INVSRCCOLOR2 support - d3d_state = 0; - D3D::dev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_INVSRCCOLOR2); - D3D::dev->GetRenderState(D3DRS_SRCBLEND, &d3d_state); - g_Config.backend_info.bSupportsDualSourceBlend = g_Config.backend_info.bSupportsDualSourceBlend && d3d_state == D3DBLEND_INVSRCCOLOR2; - // Restore original state - D3D::dev->SetRenderState(D3DRS_SRCBLEND, d3d_old_state); - - d3d_old_state = 0; - D3D::dev->GetRenderState(D3DRS_DESTBLEND, &d3d_old_state); - // Test for destination D3DBLEND_SRCCOLOR2 support - D3D::dev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR2); - D3D::dev->GetRenderState(D3DRS_DESTBLEND, &d3d_state); - g_Config.backend_info.bSupportsDualSourceBlend = g_Config.backend_info.bSupportsDualSourceBlend && d3d_state == D3DBLEND_SRCCOLOR2; - // test for destination D3DBLEND_INVSRCCOLOR2 support - d3d_state = 0; - D3D::dev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR2); - D3D::dev->GetRenderState(D3DRS_DESTBLEND, &d3d_state); - g_Config.backend_info.bSupportsDualSourceBlend = g_Config.backend_info.bSupportsDualSourceBlend && d3d_state == D3DBLEND_INVSRCCOLOR2; - // Restore original state - D3D::dev->SetRenderState(D3DRS_DESTBLEND, d3d_old_state); - - D3D::dev->SetRenderState(D3DRS_ALPHABLENDENABLE, false); - } + DLCache::Init(); // Notify the core that the video backend is ready Host_Message(WM_USER_CREATE); } |
