Commit 85e4419f by apatrick@chromium.org

Only round back buffer to 64 pixels when vendor ID in Intel.

This is actually to fix AMD / Intel switchable systems when using integrated Intel where the source rectangle to Present is not respected. Review URL: https://codereview.appspot.com/6459101 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1254 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 909f21cc
......@@ -19,4 +19,8 @@
#define snprintf _snprintf
#endif
#define VENDOR_ID_AMD 0x1002
#define VENDOR_ID_INTEL 0x8086
#define VENDOR_ID_NVIDIA 0x10DE
#endif // COMMON_ANGLEUTILS_H_
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 1253
#define BUILD_REVISION 1254
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -290,9 +290,18 @@ bool Surface::resetSwapChain(int backbufferWidth, int backbufferHeight)
presentParameters.BackBufferHeight = backbufferHeight;
// http://crbug.com/140239
// Some AMD GPUs / drivers appear to round swap chain surfaces to a multiple of 64 pixels in width.
// This rounds the width up rather than down.
presentParameters.BackBufferWidth = (presentParameters.BackBufferWidth + 63) / 64 * 64;
// http://crbug.com/143434
//
// Some AMD/Intel switchable systems / drivers appear to round swap chain surfaces to a multiple of 64 pixels in width
// when using the integrated Intel. This rounds the width up rather than down.
//
// Some non-switchable AMD GPUs / drivers do not respect the source rectangle to Present. Therefore, when the vendor ID
// is not Intel, the back buffer width must be exactly the same width as the window or horizontal scaling will occur.
D3DADAPTER_IDENTIFIER9* adapterIdentifier = mDisplay->getAdapterIdentifier();
if (adapterIdentifier->VendorId == VENDOR_ID_INTEL)
{
presentParameters.BackBufferWidth = (presentParameters.BackBufferWidth + 63) / 64 * 64;
}
result = device->CreateAdditionalSwapChain(&presentParameters, &mSwapChain);
......
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