Commit 5714a202 by Fredrik Hubinette Committed by Commit Bot

D3D11: Add RGB10_A2 as a supported EGL pbuffer config format.

Update EGLWindow to select configs that exactly match the requested config. Too many tests make assumptions about the default framebuffer's format. BUG=angleproject:1662 Change-Id: I4cf8aedf51013ca0f3f40f6bbd40f24a4a90561f Reviewed-on: https://chromium-review.googlesource.com/419681Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 93780e6c
......@@ -934,8 +934,10 @@ egl::ConfigSet Renderer11::generateConfigs()
if (mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0)
{
// floating point formats
// Additional high bit depth formats added in D3D 10.0
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb173064.aspx
colorBufferFormats.push_back(GL_RGBA16F);
colorBufferFormats.push_back(GL_RGB10_A2);
}
if (!mPresentPathFastEnabled)
......
......@@ -71,7 +71,7 @@ class CHROMIUMPathRenderingTest : public ANGLETest
setConfigGreenBits(8);
setConfigBlueBits(8);
setConfigAlphaBits(8);
setConfigDepthBits(8);
setConfigDepthBits(24);
setConfigStencilBits(8);
}
......@@ -696,7 +696,7 @@ class CHROMIUMPathRenderingDrawTest : public ANGLETest
setConfigGreenBits(8);
setConfigBlueBits(8);
setConfigAlphaBits(8);
setConfigDepthBits(8);
setConfigDepthBits(24);
setConfigStencilBits(8);
}
......@@ -1050,7 +1050,7 @@ class CHROMIUMPathRenderingWithTexturingTest : public ANGLETest
setConfigGreenBits(8);
setConfigBlueBits(8);
setConfigAlphaBits(8);
setConfigDepthBits(8);
setConfigDepthBits(24);
setConfigStencilBits(8);
}
......
......@@ -267,9 +267,7 @@ bool EGLWindow::initializeGL(OSWindow *osWindow)
// Finish the attribute list
configAttributes.push_back(EGL_NONE);
EGLint configCount;
if (!eglChooseConfig(mDisplay, configAttributes.data(), &mConfig, 1, &configCount) ||
(configCount != 1))
if (!FindEGLConfig(mDisplay, configAttributes.data(), &mConfig))
{
destroyGL();
return false;
......@@ -399,6 +397,11 @@ EGLBoolean EGLWindow::FindEGLConfig(EGLDisplay dpy, const EGLint *attrib_list, E
bool matchFound = true;
for (const EGLint *curAttrib = attrib_list; curAttrib[0] != EGL_NONE; curAttrib += 2)
{
if (curAttrib[1] == EGL_DONT_CARE)
{
continue;
}
EGLint actualValue = EGL_DONT_CARE;
eglGetConfigAttrib(dpy, allConfigs[i], curAttrib[0], &actualValue);
if (curAttrib[1] != actualValue)
......
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