diff --git a/doc/opengl-support.dox b/doc/opengl-support.dox index 3a3ad8c25..e885670c9 100644 --- a/doc/opengl-support.dox +++ b/doc/opengl-support.dox @@ -237,7 +237,7 @@ GLSL 4.50 | done @extension{ARB,robustness} | done @extension3{KHR,texture_compression_astc_ldr,texture_compression_astc_hdr} (also in ES) | | @extension{KHR,texture_compression_astc_hdr} (also in ES) | | -@extension{ARB,robustness_isolation} | | +@extension{ARB,robustness_isolation} | done @extension{ARB,bindless_texture} | | @extension{ARB,compute_variable_group_size} | | @extension{ARB,indirect_parameters} | | diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index 9e2062824..a5861b97b 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -63,6 +63,8 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,AMD,shader_trinary_minmax), _extension(GL,ARB,robustness), _extension(GL,ARB,robustness_isolation), + _extension(GL,ARB,robustness_application_isolation), + _extension(GL,ARB,robustness_share_group_isolation), _extension(GL,ARB,bindless_texture), _extension(GL,ARB,compute_variable_group_size), _extension(GL,ARB,indirect_parameters), diff --git a/src/Magnum/Extensions.h b/src/Magnum/Extensions.h index 262779e5d..78e6fb118 100644 --- a/src/Magnum/Extensions.h +++ b/src/Magnum/Extensions.h @@ -146,6 +146,8 @@ namespace GL { _extension(GL,ARB,texture_view, GL210, GL430) // #124 _extension(GL,ARB,vertex_attrib_binding, GL210, GL430) // #125 _extension(GL,ARB,robustness_isolation, GL210, None) // #126 + _extension(GL,ARB,robustness_application_isolation, GL210, None) // #126 + _extension(GL,ARB,robustness_share_group_isolation, GL210, None) // #126 _extension(GL,ARB,ES3_compatibility, GL330, GL430) // #127 _extension(GL,ARB,explicit_uniform_location, GL210, GL430) // #128 _extension(GL,ARB,fragment_layer_viewport, GL300, GL430) // #129 diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index f963ed86a..f7af7e6ce 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -436,7 +436,10 @@ class Sdl2Application::Configuration { Debug = SDL_GL_CONTEXT_DEBUG_FLAG, /**< Create debug context */ /** Create context with robust access */ - RobustAccess = SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG + RobustAccess = SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG, + + /** Create context with reset isolation */ + ResetIsolation = SDL_GL_CONTEXT_RESET_ISOLATION_FLAG }; /** @@ -447,7 +450,7 @@ class Sdl2Application::Configuration { */ #ifndef DOXYGEN_GENERATING_OUTPUT typedef Containers::EnumSet Flags; + SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG|SDL_GL_CONTEXT_RESET_ISOLATION_FLAG> Flags; #else typedef Containers::EnumSet Flags; #endif diff --git a/src/Magnum/Renderer.h b/src/Magnum/Renderer.h index 90d0cdf26..f36701e06 100644 --- a/src/Magnum/Renderer.h +++ b/src/Magnum/Renderer.h @@ -1040,6 +1040,12 @@ class MAGNUM_EXPORT Renderer { * OpenGL calls. If OpenGL extension @extension{ARB,robustness} or ES * extension @es_extension{EXT,robustness} is not available, this * function always returns @ref ResetNotificationStrategy::NoResetNotification. + * + * For the reset notification to work, additionally to the extension + * support the context must be created with + * @ref Platform::Sdl2Application::Configuration::Flag::RobustAccess "Platform::*Application::Configuration::Flag::RobustAccess" + * flag. + * * @see @ref graphicsResetStatus(), @fn_gl{Get} with * @def_gl{RESET_NOTIFICATION_STRATEGY_ARB} */ @@ -1084,7 +1090,22 @@ class MAGNUM_EXPORT Renderer { * Reset causes all context state to be lost. If OpenGL extension * @extension{ARB,robustness} or ES extension @es_extension{EXT,robustness} * is not available, this function always returns @ref GraphicsResetStatus::NoError. - * @see @ref resetNotificationStrategy(), @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness} + * + * For the reset notification to work, additionally to the extension + * support the context must be created with + * @ref Platform::Sdl2Application::Configuration::Flag::RobustAccess "Platform::*Application::Configuration::Flag::RobustAccess" + * flag. + * + * If the reset occurs, @extension{ARB,robustness_isolation} + * extension is supported and context is created with + * @ref Platform::Sdl2Application::Configuration::Flag::ResetIsolation "Platform::*Application::Configuration::Flag::ResetIsolation", + * advertised support for @extension{ARB,robustness_application_isolation} + * indicates that no other application on the system will be affected + * by the graphics reset. Advertised support for + * @extension{ARB,robustness_share_group_isolation} indicates that no + * other share group will be affected by the graphics reset. + * @see @ref resetNotificationStrategy(), + * @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness} */ static GraphicsResetStatus graphicsResetStatus();