summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX11
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-01-24 16:58:28 +0100
committerdegasus <wickmarkus@web.de>2013-01-24 16:58:28 +0100
commite0ffdda26e5fb34b2f0d59d5d45b0deda9c90c19 (patch)
tree8e289ea93c97fe7430ae501200b60327f572c7e2 /Source/Plugins/Plugin_VideoDX11
parentd5748ebaef93cd601ae6ab5e12f39dd201593ad0 (diff)
parentd60cc373d1b389215eb63c4e20fe24e902680c7a (diff)
Merge branch 'immediate-removal' into GLSL-master
Conflicts: Source/Core/VideoCommon/Src/PixelShaderGen.cpp Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp immediate-removal is a new created branch seperated from master but reverted the revert of immediate-removal so we get less conflicts by merging
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX11')
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/Render.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
index 830f16a9f6..44eaaf5dcf 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
@@ -471,10 +471,13 @@ void Renderer::SetColorMask()
{
// Only enable alpha channel if it's supported by the current EFB format
UINT8 color_mask = 0;
- if (bpmem.blendmode.alphaupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24))
- color_mask = D3D11_COLOR_WRITE_ENABLE_ALPHA;
- if (bpmem.blendmode.colorupdate)
- color_mask |= D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN | D3D11_COLOR_WRITE_ENABLE_BLUE;
+ if (bpmem.alpha_test.TestResult() != AlphaTest::FAIL)
+ {
+ if (bpmem.blendmode.alphaupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24))
+ color_mask = D3D11_COLOR_WRITE_ENABLE_ALPHA;
+ if (bpmem.blendmode.colorupdate)
+ color_mask |= D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN | D3D11_COLOR_WRITE_ENABLE_BLUE;
+ }
gx_state.blenddc.RenderTarget[0].RenderTargetWriteMask = color_mask;
}
@@ -907,10 +910,8 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
Core::Callback_VideoCopiedToXFB(false);
return;
}
- // this function is called after the XFB field is changed, not after
- // EFB is copied to XFB. In this way, flickering is reduced in games
- // and seems to also give more FPS in ZTP
+ if (field == FIELD_LOWER) xfbAddr -= fbWidth * 2;
u32 xfbCount = 0;
const XFBSourceBase* const* xfbSourceList = FramebufferManager::GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)