Make nvidia resets opt-in based on QSurfaceFormat::ResetNotification
We can't be sure every user will check the return value from makeCurrent and reset appropriately. Even though after a reset a user will be left with the same garbage as before, it's safer than a potential infinite loop. Change-Id: I5b328c654ad2a89c5b8c4399e2eb38150f4f384b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
1c463000ed
commit
63a433f6c8
@ -302,7 +302,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
|
||||
contextAttributes << GLX_CONTEXT_PROFILE_MASK_ARB << GLX_CONTEXT_ES2_PROFILE_BIT_EXT;
|
||||
}
|
||||
|
||||
if (supportsRobustness && supportsVideoMemoryPurge) {
|
||||
if (supportsRobustness && supportsVideoMemoryPurge && m_format.testOption(QSurfaceFormat::ResetNotification)) {
|
||||
QVector<int> contextAttributesWithNvidiaReset = contextAttributes;
|
||||
|
||||
contextAttributesWithNvidiaReset << GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB << GLX_LOSE_CONTEXT_ON_RESET_ARB;
|
||||
|
Loading…
x
Reference in New Issue
Block a user