egl emulator: fixes for covegl conformance test

Support for eglChooseConfig with configs==NULL.
Also added small change to query EGL_LARGEST_PBUFFER attrib of surfaces.
Fixed error print in QemuPipeStream::readFully.

Those changes make sure that covegl completes & passes on the emulator with Translator
on linux in the backend.

Change-Id: I892917ec102ae85d56a16a7cb321e8c12e7083f1
This commit is contained in:
Stas Gurtovoy
2011-07-11 13:53:36 +03:00
committed by David 'Digit' Turner
parent 5dd421c56b
commit 201584b1d4
4 changed files with 12 additions and 7 deletions

View File

@@ -808,7 +808,12 @@ EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface eglSurface, EGLint attribu
case EGL_SWAP_BEHAVIOR:
*value = surface->getSwapBehavior();
break;
//TODO: complete other attributes
case EGL_LARGEST_PBUFFER:
// not modified for a window or pixmap surface
// and we ignore it when creating a PBuffer surface (default is EGL_FALSE)
if (surface->getSurfaceType() & EGL_PBUFFER_BIT) *value = EGL_FALSE;
break;
//TODO: complete other attributes
default:
LOGE("eglQuerySurface %x EGL_BAD_ATTRIBUTE", attribute);
ret = setErrorFunc(EGL_BAD_ATTRIBUTE, EGL_FALSE);
@@ -987,9 +992,8 @@ EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLC
//
EGLThreadInfo *tInfo = getEGLThreadInfo();
if (tInfo->currentContext == context &&
context &&
context->draw == draw &&
context->read == read) {
(context == NULL ||
(context && context->draw == draw && context->read == read))) {
return EGL_TRUE;
}