Commit 4104146a by Nicolas Capens Committed by Nicolas Capens

Fix setting the number of matching configs for an unknown attribute.

BUG=18201982 Change-Id: I638fc7b666490ab7109058b4db31d942013f98a5 Reviewed-on: https://swiftshader-review.googlesource.com/1302Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent faa10f05
......@@ -281,7 +281,7 @@ bool ConfigSet::getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint
while(attribute[0] != EGL_NONE)
{
switch (attribute[0])
switch(attribute[0])
{
case EGL_BUFFER_SIZE: match = config->mBufferSize >= attribute[1]; break;
case EGL_ALPHA_SIZE: match = config->mAlphaSize >= attribute[1]; break;
......@@ -317,7 +317,8 @@ bool ConfigSet::getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint
case EGL_MAX_PBUFFER_HEIGHT: match = config->mMaxPBufferHeight >= attribute[1]; break;
case EGL_MAX_PBUFFER_PIXELS: match = config->mMaxPBufferPixels >= attribute[1]; break;
default:
return false;
UNIMPLEMENTED();
match = false;
}
if(!match)
......
......@@ -254,9 +254,10 @@ void error(EGLint errorCode)
{
egl::setCurrentError(errorCode);
if(errorCode != EGL_SUCCESS)
{
switch(errorCode)
{
case EGL_SUCCESS: break;
case EGL_NOT_INITIALIZED: TRACE("\t! Error generated: not initialized\n"); break;
case EGL_BAD_ACCESS: TRACE("\t! Error generated: bad access\n"); break;
case EGL_BAD_ALLOC: TRACE("\t! Error generated: bad alloc\n"); break;
......@@ -273,6 +274,7 @@ void error(EGLint errorCode)
case EGL_CONTEXT_LOST: TRACE("\t! Error generated: context lost\n"); break;
default: TRACE("\t! Error generated: <0x%X>\n", errorCode); break;
}
}
}
namespace es1
......
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