<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 20, 2014 at 9:14 AM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It seems unusual for a new extension to be defined in its own header file rather than the eglext.h file.<br>
<br>
Is there a particular reason for that? Are there other vendors putting their extensions in new header files like this?<br>
<br></blockquote><div><br></div><div>The reason we did that for Chrome is that it makes updating the khronos headers easier (no need to untangle private vs khronos extensions, just copy the new khronos headers over).</div>
<div><br></div><div>Stéphane</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-Brian<div class=""><br>
<br>
<br>
On 05/16/2014 04:05 PM, Chad Versace wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
Ian and Brian,<br>
<br>
How do you feel about importing this EGL extension header from the<br>
Chromium source tree? Do you prefer to import the header or just add its<br>
content to eglmesaext.h?<br>
<br>
I have a slight preference for importing the header.<br>
<br>
-Chad<br>
<br>
On Tue, May 06, 2014 at 12:10:56PM -0700, Sarah Sharp wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
In order to support the (currently unregistered) Chromium-specific EGL<br>
extension eglGetSyncValuesCHROMIUM on Intel systems, we need to import<br>
the Chromium header that defines it. The file was downloaded from<br>
<br>
</div><a href="https://urldefense.proofpoint.com/v1/url?u=https://chromium.googlesource.com/chromium/chromium/%2B/trunk/ui/gl/EGL/eglextchromium.h&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=%2FVSNRsaKb7upderouQ%2FRftkP8qhPrxRicKdXx3XfVSc%3D%0A&s=f0cfb03f402ce20417a8171fea945e2a2c3dce6a0953f37c67ea2c42e71fec02" target="_blank">https://urldefense.proofpoint.<u></u>com/v1/url?u=https://chromium.<u></u>googlesource.com/chromium/<u></u>chromium/%2B/trunk/ui/gl/EGL/<u></u>eglextchromium.h&k=oIvRg1%<u></u>2BdGAgOoM1BIlLLqw%3D%3D%0A&r=<u></u>lGQMzzTgII0I7jefp2FHq7WtZ%<u></u>2BTLs8wadB%2BiIj9xpBY%3D%0A&m=<u></u>%2FVSNRsaKb7upderouQ%<u></u>2FRftkP8qhPrxRicKdXx3XfVSc%3D%<u></u>0A&s=<u></u>f0cfb03f402ce20417a8171fea945e<u></u>2a2c3dce6a0953f37c67ea2c42e71f<u></u>ec02</a><div class="">
<br>
<br>
It is subject to the license found at<br>
<br>
</div><a href="https://urldefense.proofpoint.com/v1/url?u=https://chromium.googlesource.com/chromium/chromium/%2B/trunk/LICENSE&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=%2FVSNRsaKb7upderouQ%2FRftkP8qhPrxRicKdXx3XfVSc%3D%0A&s=2407723a2ca5c591b15d9b78ec2362a9a3c0d624cec2f3005cc3caed97e518d7" target="_blank">https://urldefense.proofpoint.<u></u>com/v1/url?u=https://chromium.<u></u>googlesource.com/chromium/<u></u>chromium/%2B/trunk/LICENSE&k=<u></u>oIvRg1%2BdGAgOoM1BIlLLqw%3D%<u></u>3D%0A&r=<u></u>lGQMzzTgII0I7jefp2FHq7WtZ%<u></u>2BTLs8wadB%2BiIj9xpBY%3D%0A&m=<u></u>%2FVSNRsaKb7upderouQ%<u></u>2FRftkP8qhPrxRicKdXx3XfVSc%3D%<u></u>0A&s=<u></u>2407723a2ca5c591b15d9b78ec2362<u></u>a9a3c0d624cec2f3005cc3caed97e5<u></u>18d7</a><div>
<div class="h5"><br>
<br>
I have imported the header file and added the license text to the top.<br>
The only change was to fix the include guard on the Chromium header to<br>
change the last line from a #define to a #endif, which makes the header<br>
actually compile.<br>
<br>
Signed-off-by: Sarah Sharp <<a href="mailto:sarah.a.sharp@linux.intel.com" target="_blank">sarah.a.sharp@linux.intel.com</a><u></u>><br>
Reviewed-by: Chad Versace <<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>><br>
Cc: Jamey Sharp <<a href="mailto:jamey@minilop.net" target="_blank">jamey@minilop.net</a>><br>
Cc: Ian Romanick <<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>><br>
Cc: Stéphane Marchesin <<a href="mailto:stephane.marchesin@gmail.com" target="_blank">stephane.marchesin@gmail.com</a>><br>
---<br>
<br>
v3: Add an include guard on Chromium header.<br>
<br>
include/EGL/eglext.h | 1 +<br>
include/EGL/eglextchromium.h | 60 ++++++++++++++++++++++++++++++<u></u>++++++++++++++<br>
src/egl/main/Makefile.am | 1 +<br>
3 files changed, 62 insertions(+)<br>
create mode 100644 include/EGL/eglextchromium.h<br>
<br>
diff --git a/include/EGL/eglext.h b/include/EGL/eglext.h<br>
index 243da4a..88b39db 100644<br>
--- a/include/EGL/eglext.h<br>
+++ b/include/EGL/eglext.h<br>
@@ -646,6 +646,7 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);<br>
#endif /* EGL_NV_system_time */<br>
<br>
#include <EGL/eglmesaext.h><br>
+#include <EGL/eglextchromium.h><br>
<br>
#ifdef __cplusplus<br>
}<br>
diff --git a/include/EGL/eglextchromium.h b/include/EGL/eglextchromium.h<br>
new file mode 100644<br>
index 0000000..0cc0976<br>
--- /dev/null<br>
+++ b/include/EGL/eglextchromium.h<br>
@@ -0,0 +1,60 @@<br>
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.<br>
+//<br>
+// Redistribution and use in source and binary forms, with or without<br>
+// modification, are permitted provided that the following conditions are<br>
+// met:<br>
+//<br>
+// * Redistributions of source code must retain the above copyright<br>
+// notice, this list of conditions and the following disclaimer.<br>
+// * Redistributions in binary form must reproduce the above<br>
+// copyright notice, this list of conditions and the following disclaimer<br>
+// in the documentation and/or other materials provided with the<br>
+// distribution.<br>
+// * Neither the name of Google Inc. nor the names of its<br>
+// contributors may be used to endorse or promote products derived from<br>
+// this software without specific prior written permission.<br>
+//<br>
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br>
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br>
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR<br>
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT<br>
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,<br>
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT<br>
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,<br>
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY<br>
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT<br>
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE<br>
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br>
+<br>
+// This file contains Chromium-specific EGL extensions declarations.<br>
+<br>
+#ifndef GPU_EGL_EGLEXTCHROMIUM_H_<br>
+#define GPU_EGL_EGLEXTCHROMIUM_H_<br>
+<br>
+#ifdef __cplusplus<br>
+extern "C" {<br>
+#endif<br>
+<br>
+#include <EGL/eglplatform.h><br>
+<br>
+/* EGLSyncControlCHROMIUM requires 64-bit uint support */<br>
+#if KHRONOS_SUPPORT_INT64<br>
+#ifndef EGL_CHROMIUM_sync_control<br>
+#define EGL_CHROMIUM_sync_control 1<br>
+typedef khronos_uint64_t EGLuint64CHROMIUM;<br>
+#ifdef EGL_EGLEXT_PROTOTYPES<br>
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(<br>
+ EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust,<br>
+ EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc);<br>
+#endif /* EGL_EGLEXT_PROTOTYPES */<br>
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPRO<u></u>C)<br>
+ (EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust,<br>
+ EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc);<br>
+#endif<br>
+#endif<br>
+<br>
+#ifdef __cplusplus<br>
+}<br>
+#endif<br>
+<br>
+#endif // GPU_EGL_EGLEXTCHROMIUM_H_<br>
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am<br>
index 2858913..23207db 100644<br>
--- a/src/egl/main/Makefile.am<br>
+++ b/src/egl/main/Makefile.am<br>
@@ -126,5 +126,6 @@ egldir = $(includedir)/EGL<br>
egl_HEADERS = \<br>
$(top_srcdir)/include/EGL/<u></u>eglext.h \<br>
$(top_srcdir)/include/EGL/egl.<u></u>h \<br>
+ $(top_srcdir)/include/EGL/<u></u>eglextchromium.h \<br>
$(top_srcdir)/include/EGL/<u></u>eglmesaext.h \<br>
$(top_srcdir)/include/EGL/<u></u>eglplatform.h<br>
--<br>
1.8.3.2<br>
<br>
</div></div></blockquote></blockquote>
<br>
</blockquote></div><br></div></div>