Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
4.8.5, 5.5.1, 5.12.3, 5.14.1
-
None
-
Microsoft Visual C++ Compiler 16.3.29509.3 (amd64) compiler on Windows 10. I've attached a qtdiag output.
Description
I work on a GUI Qt application. It also does some CUDA calculations. I started investigating VRAM issues because we were getting CUDA out of memory issues. I realized an empty Qt window with just a call to OpenGL or an empty QQuickWidget (I've attached two small programs to reproduce) was taking 1500-1600 MB of VRAM. (I have 4000 MB total). I have a laptop with two graphics cards : an integrated Intel and an NVIDIA Quadro T1000. The bug only happens when :
- the application is running on the NVIDIA graphics card (configured in NVIDIA control panel)
- the application is full screen or maximized (1920*1080).
- I set
QSurfaceFormat defaultFormat; defaultFormat.setSamples(10);
- I use an empty OpenGL widget or an empty QQuickWidget.
I shared two example prograls to help reproduce the issue. One for OpenGL (it's a stripped down version of the Qt example gui/openglwindow). And another with the QQuickWidget. (I create a MainWindow and set a QQuickWidget as the central widget).
The bug occurs if I use only the laptop screen or if I use external monitors too.
The bug does not occur if :
- I disable the intel chipset. Everything runs on the NVIDIA graphics card then. The program only uses 100-200 MB of VRAM.
- I disable antialiasing in the NVIDIA control panel.
- I run the program on the intel chipset. (It doesn't have VRAM. The program uses about 200 MB of RAM).
I tried upgrading from Qt 5.12.3 to 5.14.1, the issue remains. I tried upgrading the NVIDIA drivers. I measured VRAM usage with the nvidia-smi command line tool and with the windows task manager.
The only work around I see for the moment is to set the sampling to 0.
I've found some related discussions :
- https://bugreports.qt.io/browse/QTBUG-26268
- https://forum.qt.io/topic/76840/qt-quick-vram-and-performance