• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    NV_robustness_video_memory_purge
4
5Name Strings
6
7    GL_NV_robustness_video_memory_purge
8    GLX_NV_robustness_video_memory_purge
9    EGL_NV_robustness_video_memory_purge
10
11Contact
12
13    Arthur Huillet, NVIDIA Corporation (ahuillet 'at' nvidia.com)
14
15Contributors
16
17    Arthur Huillet, NVIDIA Corporation
18    Jeff Juliano, NVIDIA Corporation
19
20Status
21
22    Shipping.
23
24Version
25
26    Last Modified Date: May 26, 2016
27    Revision:           5
28
29Number
30
31    Unassigned
32
33Dependencies
34
35    This extension is written against the ARB_robustness and
36    GLX_ARB_create_context extensions.
37
38Overview
39
40    Allow applications to be notified when video memory has been purged.
41
42    The NVIDIA OpenGL driver architecture on Linux has a limitation:
43    resources located in video memory are not persistent across certain
44    events. VT switches, suspend/resume events, and mode switching
45    events may erase the contents of video memory. Any resource that
46    is located exclusively in video memory, such as framebuffer objects
47    (FBOs), will be lost. As the OpenGL specification makes no mention
48    of events where the video memory is allowed to be cleared, the
49    driver attempts to hide this fact from the application, but cannot
50    do it for all resources.
51
52    This extension provides a way for applications to discover when video
53    memory content has been lost, so that the application can re-populate
54    the video memory content as necessary.
55
56    This extension will have a limited lifespan, as planned architectural
57    evolutions in the NVIDIA Linux driver stack will allow
58    video memory to be persistent. Any driver that exposes this
59    extension is a driver that considers video memory to be
60    volatile. Once the driver stack has been improved, the extension
61    will no longer be exposed.
62
63New Procedures and Functions
64
65    NONE
66
67New Tokens
68
69    Returned by GetGraphicsResetStatusARB, in addition to other tokens
70    defined in ARB_robustness:
71
72        PURGED_CONTEXT_RESET_NV    0x92BB
73
74    Accepted as an attribute name in the <*attrib_list> argument of
75    glXCreateContextAttribsARB:
76
77        GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
78
79    Accepted as an attribute name in the <*attrib_list> argument of
80    eglCreateContext:
81
82        EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x334C
83
84Additions to Chapter 2 of the OpenGL 3.2 (Compatibility Profile)
85Specification (OpenGL Operation)
86
87    Modify subsection 2.6 "Graphics Reset Recovery". After:
88        UNKNOWN_CONTEXT_RESET_ARB indicates a detected graphics reset
89        whose cause is unknown.
90
91    add:
92        PURGED_CONTEXT_RESET_NV indicates that video memory was purged
93        in a mode switch event. In that case, the application can no
94        longer count on its resources' content being preserved, and must
95        delete and recreate all buffer objects including FBOs and all
96        textures bound to an FBO, transfer all relevant data again,
97        and re-render to FBOs. Using buffer objects, including FBOs,
98        that haven't been deleted and re-created is undefined behavior.
99        Other objects are unaffected.
100
101        GetGraphicsResetStatusARB() needs to be called at least once
102        every frame, after a Flush(), Finish(), or buffer swapping call.
103
104Additions to the GLX 1.4 Specification
105
106    This extension modifies language specified in the
107    GLX_ARB_create_context and GLX_ARB_create_context_profile
108    extensions.
109
110    Add a new paragraph to the description of glXCreateContextAttribsARB:
111
112        The attribute name GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV,
113        which defaults to GL_FALSE, can be specified as GL_TRUE. In this
114        case, a context reset notification will be generated when video
115        memory content has been lost. This will only take effect if the
116        attribute GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB is set to
117        GLX_LOSE_CONTEXT_ON_RESET_ARB.
118
119Additions to the EGL 1.5 Specification
120
121    Modify the description of eglCreateContext. Add a new section:
122
123        3.7.1.7 OpenGL reset notification for video memory purge events
124
125        The attribute name EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV,
126        which defaults to GL_FALSE, can be specified as GL_TRUE. In this
127        case, a context reset notification will be generated when video
128        memory content has been lost. This will only take effect if the
129        attribute EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY is set
130        to EGL_LOSE_CONTEXT_ON_RESET.
131
132Errors
133
134    NONE
135
136Issues
137
138    (1) Does this extension allow an application to be sure that the
139    rendered image is always perfect?
140
141    Events that clear video memory happen asynchronously to OpenGL
142    clients, so this extension does not guarantee perfect rendering.
143
144    (2) Which NVIDIA drivers are affected?
145
146    Not all NVIDIA drivers expose this extension, but all desktop Linux
147    drivers at the time of its publishing are affected by the issues it
148    addresses.
149
150Example
151
152    create_gl_context();
153    create_resources();
154    while (1) {
155        update_world();
156        if (GetGraphicsResetStatusARB() == PURGED_CONTEXT_RESET_NV) {
157            delete_resources();
158            create_resources();
159        }
160        render_frame();
161    }
162
163Revision History
164
165    #1 April 1, 2016: Arthur Huillet
166        - First draft.
167
168    #2 April 2, 2016: Jeff Juliano
169        - Reflow with line wrap, eliminate tabs.
170
171    #3 April 5, 2016: Arthur Huillet
172        - Rewrite as extension of ARB_robustness.
173
174    #4 April 20, 2016: Arthur Huillet
175        - Improve language.
176
177    #5 May 26, 2016: Arthur Huillet
178        - Add a context creation bit.
179