From: Nicolas Capens Date: Fri, 30 Oct 2015 17:54:24 +0000 (-0400) Subject: Enumerate RGB config formats. X-Git-Tag: android-x86-7.1-r1~809 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5716cf0328806cc6617727643881f1a3ae14ac26;p=android-x86%2Fexternal-swiftshader.git Enumerate RGB config formats. Bug 25390254 Change-Id: Ibd8fc3a957f9ecf5480490e9504fa7041c7c9fa2 Reviewed-on: https://swiftshader-review.googlesource.com/4186 Reviewed-by: Alexis Hétu Tested-by: Nicolas Capens Reviewed-by: Nicolas Capens --- diff --git a/src/OpenGL/libEGL/Config.cpp b/src/OpenGL/libEGL/Config.cpp index 060c70a30..3f290b55c 100644 --- a/src/OpenGL/libEGL/Config.cpp +++ b/src/OpenGL/libEGL/Config.cpp @@ -33,7 +33,7 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, mBindToTextureRGB = EGL_FALSE; mBindToTextureRGBA = EGL_FALSE; - switch (renderTargetFormat) + switch(renderTargetFormat) { case sw::FORMAT_A1R5G5B5: mRedSize = 5; @@ -54,6 +54,13 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, mAlphaSize = 8; mBindToTextureRGBA = EGL_TRUE; break; + case sw::FORMAT_A8B8G8R8: + mRedSize = 8; + mGreenSize = 8; + mBlueSize = 8; + mAlphaSize = 8; + mBindToTextureRGBA = EGL_TRUE; + break; case sw::FORMAT_R5G6B5: mRedSize = 5; mGreenSize = 6; @@ -67,6 +74,13 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, mAlphaSize = 0; mBindToTextureRGB = EGL_TRUE; break; + case sw::FORMAT_X8B8G8R8: + mRedSize = 8; + mGreenSize = 8; + mBlueSize = 8; + mAlphaSize = 0; + mBindToTextureRGBA = EGL_TRUE; + break; default: UNREACHABLE(renderTargetFormat); // Other formats should not be valid } @@ -83,7 +97,7 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, #endif ; - switch (depthStencilFormat) + switch(depthStencilFormat) { case sw::FORMAT_NULL: mDepthSize = 0; diff --git a/src/OpenGL/libEGL/Display.cpp b/src/OpenGL/libEGL/Display.cpp index ce452fc97..231d22c9a 100644 --- a/src/OpenGL/libEGL/Display.cpp +++ b/src/OpenGL/libEGL/Display.cpp @@ -148,9 +148,11 @@ bool Display::initialize() sw::FORMAT_A1R5G5B5, // sw::FORMAT_A2R10G10B10, // The color_ramp conformance test uses ReadPixels with UNSIGNED_BYTE causing it to think that rendering skipped a colour value. sw::FORMAT_A8R8G8B8, + sw::FORMAT_A8B8G8R8, sw::FORMAT_R5G6B5, // sw::FORMAT_X1R5G5B5, // Has no compatible OpenGL ES renderbuffer format - sw::FORMAT_X8R8G8B8 + sw::FORMAT_X8R8G8B8, + sw::FORMAT_X8B8G8R8 }; const sw::Format depthStencilFormats[] =