Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15, 6.2, 6.5, 6.6, 6.7, 6.8
-
None
-
-
6d7bf2a49 (dev), 6a8284f36 (6.7), 2ec6b4d3e (6.6), b505f56c1 (tqtc/lts-6.5)
Description
I want to bypass this slowdown code: https://github.com/qt/qtwayland/blob/92ba57d7ceca3d9d072ee121ab44eff17637cbec/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp#L371-L375
I do the following thing:
#include <QtWidgets> int main (int argc, char** argv) { QApplication app(argc, argv); QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); fmt.setSwapInterval(0); QSurfaceFormat::setDefaultFormat(fmt); QWidget widget; widget.show(); qWarning() << widget.windowHandle()->format().swapInterval(); return app.exec(); }
And run with QT_WIDGETS_RHI=1 environment variable set. Result is 1 while I expect it to be 0.
My guess is it's because window()->requestedFormat() is not provided here as third argument so it uses a default-constructed QSurfaceFormat that defaults to 1.
Attachments
For Gerrit Dashboard: QTBUG-120477 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
528037,3 | QWaylandEglWindow: Pass window surface format to q_glFormatFromConfig | dev | qt/qtwayland | Status: MERGED | +2 | 0 |
529269,2 | QWaylandEglWindow: Pass window surface format to q_glFormatFromConfig | 6.7 | qt/qtwayland | Status: MERGED | +2 | 0 |
529323,2 | QWaylandEglWindow: Pass window surface format to q_glFormatFromConfig | 6.6 | qt/qtwayland | Status: MERGED | +2 | 0 |
529471,2 | QWaylandEglWindow: Pass window surface format to q_glFormatFromConfig | tqtc/lts-6.5 | qt/tqtc-qtwayland | Status: MERGED | +2 | 0 |