Disable FLIPEX when the formats are not 32-bit and when swap interval is 0.

TRAC #18108 ANGLEBUG=209 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@764 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent fd80254e
#define MAJOR_VERSION 0
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 763
#define BUILD_REVISION 764
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -191,8 +191,26 @@ bool Surface::resetSwapChain(int backbufferWidth, int backbufferHeight)
// the current process, disable use of FlipEx.
DWORD windowPID;
GetWindowThreadProcessId(mWindow, &windowPID);
if(windowPID != GetCurrentProcessId())
if (windowPID != GetCurrentProcessId())
{
useFlipEx = false;
}
// Various hardware does not support D3DSWAPEFFECT_FLIPEX when either the
// device format or back buffer format is not 32-bit.
HDC deviceContext = GetDC(0);
int deviceFormatBits = GetDeviceCaps(deviceContext, BITSPIXEL);
ReleaseDC(0, deviceContext);
if (mConfig->mBufferSize != 32 || deviceFormatBits != 32)
{
useFlipEx = false;
}
// D3DSWAPEFFECT_FLIPEX is always VSYNCed
if (mSwapInterval == 0)
{
useFlipEx = false;
}
presentParameters.AutoDepthStencilFormat = mConfig->mDepthStencilFormat;
// We set BackBufferCount = 1 even when we use D3DSWAPEFFECT_FLIPEX.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment