Add EGL_NV_n_buffer extension.
diff --git a/api/EGL/egl.h b/api/EGL/egl.h
index 3e2f7e7..909a6e5 100644
--- a/api/EGL/egl.h
+++ b/api/EGL/egl.h
@@ -33,12 +33,12 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: 726475c203 $ on $Git commit date: 2018-10-03 23:51:49 -0700 $
+** Khronos $Git commit SHA1: f75e2d7c46 $ on $Git commit date: 2019-03-18 01:54:09 -0700 $
*/
#include <EGL/eglplatform.h>
-/* Generated on date 20181204 */
+/* Generated on date 20190320 */
/* Generated C header for:
* API: egl
diff --git a/api/EGL/eglext.h b/api/EGL/eglext.h
index ac49a91..7818f79 100644
--- a/api/EGL/eglext.h
+++ b/api/EGL/eglext.h
@@ -33,12 +33,12 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: b3f95aa849 $ on $Git commit date: 2019-03-18 01:50:25 -0700 $
+** Khronos $Git commit SHA1: f75e2d7c46 $ on $Git commit date: 2019-03-18 01:54:09 -0700 $
*/
#include <EGL/eglplatform.h>
-#define EGL_EGLEXT_VERSION 20190318
+#define EGL_EGLEXT_VERSION 20190320
/* Generated C header for:
* API: egl
@@ -1108,6 +1108,12 @@
#define EGL_CUDA_DEVICE_NV 0x323A
#endif /* EGL_NV_device_cuda */
+#ifndef EGL_NV_n_buffer
+#define EGL_NV_n_buffer 1
+#define EGL_TRIPLE_BUFFER_NV 0x3230
+#define EGL_QUADRUPLE_BUFFER_NV 0x3231
+#endif /* EGL_NV_n_buffer */
+
#ifndef EGL_NV_native_query
#define EGL_NV_native_query 1
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
diff --git a/api/egl.xml b/api/egl.xml
index b2adace..45e7f24 100644
--- a/api/egl.xml
+++ b/api/egl.xml
@@ -617,7 +617,9 @@
<enum value="0x322D" name="EGL_BAD_OUTPUT_LAYER_EXT"/>
<enum value="0x322E" name="EGL_BAD_OUTPUT_PORT_EXT"/>
<enum value="0x322F" name="EGL_SWAP_INTERVAL_EXT"/>
- <unused start="0x3230" end="0x3232"/>
+ <enum value="0x3230" name="EGL_TRIPLE_BUFFER_NV"/>
+ <enum value="0x3231" name="EGL_QUADRUPLE_BUFFER_NV"/>
+ <unused start="0x3232"/>
<enum value="0x3233" name="EGL_DRM_DEVICE_FILE_EXT"/>
<enum value="0x3234" name="EGL_DRM_CRTC_EXT"/>
<enum value="0x3235" name="EGL_DRM_PLANE_EXT"/>
@@ -2924,6 +2926,12 @@
<enum name="EGL_CUDA_DEVICE_NV"/>
</require>
</extension>
+ <extension name="EGL_NV_n_buffer" supported="egl">
+ <require>
+ <enum name="EGL_TRIPLE_BUFFER_NV"/>
+ <enum name="EGL_QUADRUPLE_BUFFER_NV"/>
+ </require>
+ </extension>
<extension name="EGL_NV_native_query" supported="egl">
<require>
<command name="eglQueryNativeDisplayNV"/>
diff --git a/extensions/NV/EGL_NV_n_buffer.txt b/extensions/NV/EGL_NV_n_buffer.txt
new file mode 100644
index 0000000..9004652
--- /dev/null
+++ b/extensions/NV/EGL_NV_n_buffer.txt
@@ -0,0 +1,157 @@
+Name
+
+ NV_triple_buffer
+ NV_quadruple_buffer
+
+Name Strings
+
+ EGL_NV_triple_buffer
+ EGL_NV_quadruple_buffer
+
+Contributors
+
+ Daniel Kartch, NVIDIA Corporation
+ Tom McReynolds, NVIDIA Corporation
+ Santanu Thangaraj, NVIDIA Corporation
+
+Contact
+
+ Daniel Kartch, NVIDIA Corporation (dkartch 'at' nvidia.com)
+
+Status
+
+ Complete.
+
+Version
+
+ Version 1 - February 28, 2019
+
+Number
+
+ 133
+
+Extension Type
+
+ EGL display extension
+
+Dependencies
+
+ Requires EGL 1.0
+
+ This extension is written against the wording of the EGL 1.3
+ Specification.
+
+Overview
+
+ NV_triple_buffer and NV_quadruple_buffer allow applications to
+ request additional back buffers, in order to produce greater and
+ less variable frame rates.
+
+ This document describes two related extensions, one dependent on
+ the other. Implementations may choose to support only
+ NV_triple_buffer and not NV_quadruple_buffer, but not vice versa.
+
+New Types
+
+ None
+
+New Procedures and Functions
+
+ None
+
+New Tokens
+
+ Added by NV_triple_buffer:
+
+ Accepted as a value for EGL_RENDER_BUFFER in the <attrib_list>
+ parameter of eglCreateWindowSurface:
+
+ EGL_TRIPLE_BUFFER_NV 0x3230
+
+ Added by NV_quadruple_buffer:
+
+ Accepted as a value for EGL_RENDER_BUFFER in the <attrib_list>
+ parameter of eglCreateWindowSurface:
+
+ EGL_QUADRUPLE_BUFFER_NV 0x3231
+
+Additions to the EGL 1.3 Specification:
+
+ Insert after third sentence of second paragraph of Section 2.2.2
+ (Rendering Models):
+
+ Windows may have more than one back buffer, allowing rendering
+ of a new frame to proceed while the copy requested by
+ eglSwapBuffers is still pending.
+
+ Replace the third sentence of the EGL_RENDER_BUFFER description in
+ Section 3.5.1 (Creating On-Screen Rendering Surfaces):
+
+ If its value is EGL_BACK_BUFFER, EGL_TRIPLE_BUFFER_NV, or
+ EGL_QUADRUPLE_BUFFER_NV, then client APIs should render into
+ the current back buffer. The implementation should provide
+ at least one, two, or three back buffers, respectively, which
+ will be used in rotation each frame.
+
+ Change first sentence of third bullet point of eglQueryContext
+ description in Section 3.7.4 (Context Queries):
+
+ If the context is bound to a window surface, then either
+ EGL_SINGLE_BUFFER, EGL_BACK_BUFFER, EGL_TRIPLE_BUFFER_NV, or
+ EGL_QUADRUPLE_BUFFER_NV may be returned.
+
+ Replace first sentence of eglSwapBuffers description in
+ Section 3.9.1
+ (Posting to a Window):
+
+ If surface is a back-buffered window surface, then the current
+ color buffer is copied to the native window associated with
+ that surface. If there is more than one back buffer, then the
+ next color buffer in rotation becomes current, and rendering
+ of the next frame may proceed before the copy takes place,
+ provided any previous swaps from the new current buffer have
+ completed.
+
+Issues
+
+ 1. Why do we need triple-buffering?
+
+ RESOLVED: With only a single back buffer and a non-zero swap
+ interval, eglSwapBuffers must block rendering to the back-
+ buffer until the copy has completed. This can leave the CPU
+ and/or GPU idle, wasting valuable compute time, and possibly
+ cause the next frame to be delivered later than otherwise could
+ have been. Additional buffers allow rendering to continue even
+ when a frame is awaiting display, maximizing our use of
+ computational resources.
+
+ 2. Why quadruple-buffering? Isn't triple-buffering enough to
+ produce frames as fast as the processor(s) and swap interval
+ allow?
+
+ RESOLVED: When there is only a single rendering stream
+ operating on a system, triple-buffering is sufficient. However,
+ if other threads are contending for resources, variable
+ latencies may be introduced. This is especially problematic
+ with video, where any deviation in frame rate from the recorded
+ media can produce visible artifacts. Additional buffers smooth
+ out these latencies, allowing a steady frame rate.
+
+ 3. Then why not arbitrary n-buffering?
+
+ RESOLVED: The TRIPLE/QUADRUPLE buffer specification fits nicely
+ into the RENDER_BUFFER attribute already in use for
+ eglCreateWindowSurface. Arbitrary buffer counts would require a
+ new attribute. Additionally, case studies indicated no
+ significant benefit to using more than three back buffers,
+ especially when factoring in the added memory cost.
+
+Revision History
+
+ #2 (February 28, 2019) Santanu Thangaraj
+ - Marked issues 1,2 and 3 as resolved.
+ - Included extension type section.
+ - Corrected line length violations.
+
+ #1 (August 12, 2008) Daniel Kartch
+ - Initial Draft
diff --git a/index.php b/index.php
index 0173d97..acebac2 100644
--- a/index.php
+++ b/index.php
@@ -333,6 +333,8 @@
</li>
<li value=132> <a href="extensions/ANDROID/EGL_ANDROID_GLES_layers.txt">EGL_ANDROID_GLES_layers</a>
</li>
+<li value=133> <a href="extensions/NV/EGL_NV_n_buffer.txt">EGL_NV_n_buffer</a>
+</li>
</ol>
<h6> Providing Feedback on the Registry </h6>
diff --git a/registry.tcl b/registry.tcl
index 981406e..e70e892 100644
--- a/registry.tcl
+++ b/registry.tcl
@@ -684,4 +684,9 @@
flags public
filename extensions/ANDROID/EGL_ANDROID_GLES_layers.txt
}
-# Next free extension number: 132
+extension EGL_NV_n_buffer {
+ number 133
+ flags public
+ filename extensions/NV/EGL_NV_n_buffer.txt
+}
+# Next free extension number: 134