egl: return EGL config when r/g/b sizes are not set
The check is already done for alpha. Do a similar check for r/g/b sizes. The problem was discovered because the default scenegraph context in QSGContext::defaultSurfaceFormat does not have r/g/b set. Change-Id: I2f529c9d5cc7dbc61a27722336e8099e7be08965 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This commit is contained in:
parent
d40ab8b9f5
commit
cb97d846e2
@ -256,11 +256,10 @@ EGLConfig q_configFromGLFormat(EGLDisplay display, const QSurfaceFormat &format,
|
|||||||
eglGetConfigAttrib(display, configs[index], EGL_GREEN_SIZE, &green);
|
eglGetConfigAttrib(display, configs[index], EGL_GREEN_SIZE, &green);
|
||||||
eglGetConfigAttrib(display, configs[index], EGL_BLUE_SIZE, &blue);
|
eglGetConfigAttrib(display, configs[index], EGL_BLUE_SIZE, &blue);
|
||||||
eglGetConfigAttrib(display, configs[index], EGL_ALPHA_SIZE, &alpha);
|
eglGetConfigAttrib(display, configs[index], EGL_ALPHA_SIZE, &alpha);
|
||||||
if (red == confAttrRed &&
|
if ((confAttrRed == 0 || red == confAttrRed) &&
|
||||||
green == confAttrGreen &&
|
(confAttrGreen == 0 || green == confAttrGreen) &&
|
||||||
blue == confAttrBlue &&
|
(confAttrBlue == 0 || blue == confAttrBlue) &&
|
||||||
(confAttrAlpha == 0 ||
|
(confAttrAlpha == 0 || alpha == confAttrAlpha)) {
|
||||||
alpha == confAttrAlpha)) {
|
|
||||||
cfg = configs[index];
|
cfg = configs[index];
|
||||||
delete [] configs;
|
delete [] configs;
|
||||||
return cfg;
|
return cfg;
|
||||||
|
Loading…
Reference in New Issue
Block a user