summaryrefslogtreecommitdiffstats
path: root/tests/auto/opengl
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-03-17 15:23:37 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-03-28 11:17:52 +0000
commitdd385741605df2dd0cd977ebd8cd49cbf5d90271 (patch)
tree69b8ffc25069c21a1d777d77ef2d9032e0a2f5d1 /tests/auto/opengl
parentbae0c4c11a6dda52e5d1e9d6d7d0de3ebd47642b (diff)
Switch to RGB(A|X)8888[_Premultiplied] for QOpenGLFBO readbacks on GLES
Instead of the never-ending blacklisting of "broken" drivers, simply switch to always choosing a byte ordered QImage format with OpenGL ES, and keep on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo. There is nothing broken with not supporting BGRA for glReadPixels even when GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded into the spec to begin with) is present. We do not have a good way to tell if BGRA_EXT is supported for glReadPixels or not, so just skip the whole problem altogether. Task-number: QTBUG-59283 Task-number: QTBUG-59303 Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/opengl')
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index cf92c9fab6..7dfa8e4e22 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -1195,7 +1195,9 @@ void tst_QGL::currentFboSync()
QGLFramebufferObject::bindDefault();
- QCOMPARE(fbo1.toImage(), fbo2Image);
+ // Convert the QGLFBO's result since QOpenGLFBO uses a wider
+ // variety of possible return formats.
+ QCOMPARE(fbo1.toImage().convertToFormat(fbo2Image.format()), fbo2Image);
}
{