Re: [Piglit] [PATCH] egl-util: Define EGL_KHR_gl_colorspace symbols for older distros.

2015-07-10 Thread Dylan Baker
Maybe a better plan is to have the test detect that those aren't defined
and skip?
On Jul 9, 2015 22:52, Vinson Lee v...@freedesktop.org wrote:

 Signed-off-by: Vinson Lee v...@freedesktop.org
 ---
  tests/egl/egl-util.h |7 +++
  1 files changed, 7 insertions(+), 0 deletions(-)

 diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h
 index 249319d..614e586 100644
 --- a/tests/egl/egl-util.h
 +++ b/tests/egl/egl-util.h
 @@ -15,6 +15,13 @@
  #include EGL/egl.h
  #include EGL/eglext.h

 +#ifndef EGL_KHR_gl_colorspace
 +#define EGL_KHR_gl_colorspace 1
 +#define EGL_GL_COLORSPACE_KHR 0x309D
 +#define EGL_GL_COLORSPACE_SRGB_KHR0x3089
 +#define EGL_GL_COLORSPACE_LINEAR_KHR  0x308A
 +#endif /* EGL_KHR_gl_colorspace */
 +
  struct egl_state {
 Display *dpy;
 Window win;
 --
 1.7.1

 ___
 Piglit mailing list
 Piglit@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/piglit

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] egl-util: Define EGL_KHR_gl_colorspace symbols for older distros.

2015-07-10 Thread Emil Velikov
On 10 July 2015 at 09:22, Dylan Baker baker.dyla...@gmail.com wrote:
 Maybe a better plan is to have the test detect that those aren't defined and
 skip?

I fear the proposed fix is what piglit and many others tend to do.
Here are some of the files containing such workarounds:

tests/egl/egl-configless-context.c
tests/glx/glx-buffer-age.c
tests/glx/glx-context-flush-control.c
tests/spec/ext_image_dma_buf_import/image_common.h
tests/spec/gl-3.0/api/clearbuffer-invalid-buffer.c
tests/spec/glx_mesa_query_renderer/query-renderer-common.h
tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c
tests/util/glxew.h


A few other suggestions:
 - Check that the headers are new enough and bail out early in cmake.
Unfortunately distros may insist on keeping old headers, despite that
updating (and using) them won't cause ABI breakage.
 - Have a local copy of the headers in-tree.
Could get ugly, but many projects seems to be doing it.

I'm leaning towards the former, although feel free to use whichever you fancy.

-Emil
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] egl-util: Define EGL_KHR_gl_colorspace symbols for older distros.

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 1:22 AM, Dylan Baker baker.dyla...@gmail.com wrote:
 Maybe a better plan is to have the test detect that those aren't defined and
 skip?

This allows the compile to succeed. If the feature isn't supported at
runtime... that's when you skip.

We've added defines to let things compile with outdated headers
multiple times before: 76e74cb6, ffb56030.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] egl-util: Define EGL_KHR_gl_colorspace symbols for older distros.

2015-07-09 Thread Vinson Lee
Signed-off-by: Vinson Lee v...@freedesktop.org
---
 tests/egl/egl-util.h |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h
index 249319d..614e586 100644
--- a/tests/egl/egl-util.h
+++ b/tests/egl/egl-util.h
@@ -15,6 +15,13 @@
 #include EGL/egl.h
 #include EGL/eglext.h
 
+#ifndef EGL_KHR_gl_colorspace
+#define EGL_KHR_gl_colorspace 1
+#define EGL_GL_COLORSPACE_KHR 0x309D
+#define EGL_GL_COLORSPACE_SRGB_KHR0x3089
+#define EGL_GL_COLORSPACE_LINEAR_KHR  0x308A
+#endif /* EGL_KHR_gl_colorspace */
+
 struct egl_state {
Display *dpy;
Window win;
-- 
1.7.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit