Commit 5716cf03 by Nicolas Capens

Enumerate RGB config formats.

Bug 25390254 Change-Id: Ibd8fc3a957f9ecf5480490e9504fa7041c7c9fa2 Reviewed-on: https://swiftshader-review.googlesource.com/4186Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent b77b8776
......@@ -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;
......
......@@ -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[] =
......
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