[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa-demos: Changes to 'debian-unstable'



 debian/changelog                                                   |   15 
 debian/control                                                     |    9 
 debian/mesa-utils-extra.install                                    |    1 
 debian/mesa-utils-extra.links                                      |    1 
 debian/patches/egl-Remove-demos-using-EGL_MESA_screen_surface.diff | 1748 ++++++++++
 debian/patches/no_eglfbdev.diff                                    |    6 
 debian/patches/series                                              |    1 
 debian/rules                                                       |    2 
 debian/source/local-options                                        |    1 
 9 files changed, 1773 insertions(+), 11 deletions(-)

New commits:
commit 9f06cf5e620f208b39ca70d2e68d56a3870a9da7
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Thu Nov 5 18:06:02 2015 +0100

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index 6fea049..44b02bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
+mesa-demos (8.2.0-2) unstable; urgency=medium
 
   * Add egl-Remove-demos-using-EGL_MESA_screen_surface.diff, fixes FTBFS
     against mesa >= 10.6 (Closes: #796373).
@@ -11,7 +11,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Add debian/source/local-options with --extend-diff-ignore.
   * Add myself to Uploaders.
 
- -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Thu, 05 Nov 2015 18:05:47 +0100
 
 mesa-demos (8.2.0-1) unstable; urgency=high
 

commit 6289d86514afb478c65238ac791a3b33b398c8e1
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Thu Nov 5 18:03:59 2015 +0100

    Add myself to Uploaders.

diff --git a/debian/changelog b/debian/changelog
index ac70f39..6fea049 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Bump standards version to 3.9.6.
   * Enable parallel build.
   * Add debian/source/local-options with --extend-diff-ignore.
+  * Add myself to Uploaders.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/control b/debian/control
index 44cdfa2..9bb66f2 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: mesa-demos
 Section: utils
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
+Uploaders: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>, Andreas Boll <andreas.boll.dev@gmail.com>
 Standards-Version: 3.9.6
 Build-Depends: debhelper (>= 9),
  quilt,

commit 962afa1a7ec68438bd116df1b4224c5a2bb93562
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Thu Nov 5 18:03:30 2015 +0100

    Add debian/source/local-options with --extend-diff-ignore.
    
    Suppress dpkg-source errors from building against a source with copies
    instead of symlinks.

diff --git a/debian/changelog b/debian/changelog
index e9d8e5b..ac70f39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Update Vcs-* fields.
   * Bump standards version to 3.9.6.
   * Enable parallel build.
+  * Add debian/source/local-options with --extend-diff-ignore.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..06f336e
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+--extend-diff-ignore=src/egl/opengles2/es2_info.c

commit da9571bd3c8a99cc4c6f108018375b79e1b88bf8
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:36:26 2015 +0100

    Enable parallel build.

diff --git a/debian/changelog b/debian/changelog
index 45609f5..e9d8e5b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Remove obsolete Replaces from pre-squeeze.
   * Update Vcs-* fields.
   * Bump standards version to 3.9.6.
+  * Enable parallel build.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/rules b/debian/rules
index f49aedf..a94562d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 %:
-	dh $@ --with=autoreconf,quilt
+	dh $@ --with=autoreconf,quilt --parallel
 
 override_dh_auto_configure:
 	dh_auto_configure -- --disable-silent-rules

commit 119f02fd28fd9e67772e5677359b93a7486e7e94
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:31:29 2015 +0100

    Bump standards version to 3.9.6.

diff --git a/debian/changelog b/debian/changelog
index d9f6910..45609f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Remove obsolete es2gears_screen from installation.
   * Remove obsolete Replaces from pre-squeeze.
   * Update Vcs-* fields.
+  * Bump standards version to 3.9.6.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/control b/debian/control
index 377bd28..44cdfa2 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
-Standards-Version: 3.9.4
+Standards-Version: 3.9.6
 Build-Depends: debhelper (>= 9),
  quilt,
  pkg-config,

commit 856d61de1e2fc831b2117540521945f1ccd1d497
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:27:47 2015 +0100

    Update Vcs-* fields.

diff --git a/debian/changelog b/debian/changelog
index bcaa543..d9f6910 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Refresh no_eglfbdev.diff.
   * Remove obsolete es2gears_screen from installation.
   * Remove obsolete Replaces from pre-squeeze.
+  * Update Vcs-* fields.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/control b/debian/control
index ad32d23..377bd28 100644
--- a/debian/control
+++ b/debian/control
@@ -19,8 +19,8 @@ Build-Depends: debhelper (>= 9),
  libgles1-mesa-dev [linux-any kfreebsd-any],
  libgles2-mesa-dev [linux-any kfreebsd-any],
 Homepage: http://mesa3d.org/
-Vcs-Git: git://git.debian.org/git/pkg-xorg/app/mesa-demos.git
-Vcs-Browser: http://git.debian.org/?p=pkg-xorg/app/mesa-demos.git
+Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/app/mesa-demos.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-xorg/app/mesa-demos.git
 
 Package: mesa-utils
 Section: x11

commit b9446093cba54bcd46f0740430b9111d31ce7133
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:22:28 2015 +0100

    Remove obsolete Replaces from pre-squeeze.

diff --git a/debian/changelog b/debian/changelog
index 57592db..bcaa543 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
     against mesa >= 10.6 (Closes: #796373).
   * Refresh no_eglfbdev.diff.
   * Remove obsolete es2gears_screen from installation.
+  * Remove obsolete Replaces from pre-squeeze.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/control b/debian/control
index d6f3b40..ad32d23 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,6 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
-Replaces: xbase-clients (<< 6.8.2-38)
 Description: Miscellaneous Mesa GL utilities
  This package provides several basic GL utilities built by Mesa, including
  glxinfo and glxgears.

commit 29c1fe6a5283e4f4e0aa587978857119dfefe059
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:15:32 2015 +0100

    Remove obsolete es2gears_screen from installation.

diff --git a/debian/changelog b/debian/changelog
index 2be52b0..57592db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
   * Add egl-Remove-demos-using-EGL_MESA_screen_surface.diff, fixes FTBFS
     against mesa >= 10.6 (Closes: #796373).
   * Refresh no_eglfbdev.diff.
+  * Remove obsolete es2gears_screen from installation.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/mesa-utils-extra.install b/debian/mesa-utils-extra.install
index 491aba4..f98169f 100644
--- a/debian/mesa-utils-extra.install
+++ b/debian/mesa-utils-extra.install
@@ -1,4 +1,3 @@
 usr/bin/es2_info
 usr/bin/es2gears_x11
-usr/bin/es2gears_screen
 usr/bin/es2tri
diff --git a/debian/mesa-utils-extra.links b/debian/mesa-utils-extra.links
index d2e5366..f2e18c0 100644
--- a/debian/mesa-utils-extra.links
+++ b/debian/mesa-utils-extra.links
@@ -1,3 +1,2 @@
 /usr/bin/es2gears_x11 /usr/bin/es2gears
 /usr/share/man/man1/es2gears.1 /usr/share/man/man1/es2gears_x11.1
-/usr/share/man/man1/es2gears.1 /usr/share/man/man1/es2gears_screen.1

commit 3e7b08ee166fda2114070fdccbd63c7ad232cedf
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:06:43 2015 +0100

    Refresh no_eglfbdev.diff.

diff --git a/debian/changelog b/debian/changelog
index 868c5cf..2be52b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
 
   * Add egl-Remove-demos-using-EGL_MESA_screen_surface.diff, fixes FTBFS
     against mesa >= 10.6 (Closes: #796373).
+  * Refresh no_eglfbdev.diff.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
 
diff --git a/debian/patches/no_eglfbdev.diff b/debian/patches/no_eglfbdev.diff
index 8118994..a6c6c39 100644
--- a/debian/patches/no_eglfbdev.diff
+++ b/debian/patches/no_eglfbdev.diff
@@ -13,11 +13,11 @@ Date:   Sun Sep 1 19:38:48 2013 +0200
 
 --- a/src/egl/opengles1/Makefile.am
 +++ b/src/egl/opengles1/Makefile.am
-@@ -43,7 +43,6 @@ noinst_PROGRAMS = \
+@@ -42,7 +42,6 @@
+ 	bindtex \
  	clear \
- 	drawtex_screen \
  	drawtex_x11 \
 -	eglfbdev \
  	es1_info \
- 	gears_screen \
  	gears_x11 \
+ 	msaa \

commit 3213d6cbaa349e386f6931e82b05f6fbad27cd4e
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Nov 4 17:06:43 2015 +0100

    Add egl-Remove-demos-using-EGL_MESA_screen_surface.diff
    
    Fixes FTBFS against mesa >= 10.6 (Closes: #796373).

diff --git a/debian/changelog b/debian/changelog
index 97c9330..868c5cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mesa-demos (8.2.0-2) UNRELEASED; urgency=medium
+
+  * Add egl-Remove-demos-using-EGL_MESA_screen_surface.diff, fixes FTBFS
+    against mesa >= 10.6 (Closes: #796373).
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 04 Nov 2015 17:05:50 +0100
+
 mesa-demos (8.2.0-1) unstable; urgency=high
 
   [ Andreas Boll ]
diff --git a/debian/patches/egl-Remove-demos-using-EGL_MESA_screen_surface.diff b/debian/patches/egl-Remove-demos-using-EGL_MESA_screen_surface.diff
new file mode 100644
index 0000000..ee77ff6
--- /dev/null
+++ b/debian/patches/egl-Remove-demos-using-EGL_MESA_screen_surface.diff
@@ -0,0 +1,1748 @@
+From 082ae0e783cc8a4cf530fec6b6621858e8cd3f36 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Fri, 28 Aug 2015 15:57:38 -0700
+Subject: [PATCH] egl: Remove demos using EGL_MESA_screen_surface.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The remnants of the extension were removed from Mesa in commit 7a58262e.
+
+Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
+Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+(cherry picked from commit 74443c6ee79f3251f643ea05e94df58183e37d0d)
+
+Conflicts:
+	src/egl/opengles2/Makefile.am
+
+Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
+---
+ src/egl/eglut/CMakeLists.txt     |   6 -
+ src/egl/eglut/Makefile.am        |  10 +-
+ src/egl/eglut/eglut.c            |   8 +-
+ src/egl/eglut/eglut_screen.c     | 180 -----------
+ src/egl/opengl/CMakeLists.txt    |  17 -
+ src/egl/opengl/Makefile.am       |  11 -
+ src/egl/opengl/demo1.c           | 147 ---------
+ src/egl/opengl/demo2.c           | 216 -------------
+ src/egl/opengl/demo3.c           | 647 ---------------------------------------
+ src/egl/opengl/eglinfo.c         |  45 ---
+ src/egl/opengl/eglscreen.c       | 120 --------
+ src/egl/opengles1/CMakeLists.txt |   4 -
+ src/egl/opengles1/Makefile.am    |  14 -
+ src/egl/opengles2/CMakeLists.txt |   4 -
+ src/egl/opengles2/Makefile.am    |   5 -
+ src/egl/openvg/CMakeLists.txt    |   4 -
+ src/egl/openvg/Makefile.am       |   8 -
+ 17 files changed, 5 insertions(+), 1441 deletions(-)
+ delete mode 100644 src/egl/eglut/eglut_screen.c
+ delete mode 100644 src/egl/opengl/demo1.c
+ delete mode 100644 src/egl/opengl/demo2.c
+ delete mode 100644 src/egl/opengl/demo3.c
+ delete mode 100644 src/egl/opengl/eglscreen.c
+
+diff --git a/src/egl/eglut/CMakeLists.txt b/src/egl/eglut/CMakeLists.txt
+index a885977..0417b48 100644
+--- a/src/egl/eglut/CMakeLists.txt
++++ b/src/egl/eglut/CMakeLists.txt
+@@ -9,9 +9,3 @@ if (X11_FOUND)
+ 		install (TARGETS eglut_x11 DESTINATION ${LIBDIR})
+ 	endif (BUILD_SHARED_LIBS)
+ endif (X11_FOUND)
+-
+-add_library (eglut_screen eglut.h eglut.c eglutint.h eglut_screen.c)
+-target_link_libraries (eglut_screen ${EGL_LIBRARIES})
+-if (BUILD_SHARED_LIBS)
+-	install (TARGETS eglut_screen DESTINATION ${LIBDIR})
+-endif (BUILD_SHARED_LIBS)
+diff --git a/src/egl/eglut/Makefile.am b/src/egl/eglut/Makefile.am
+index 2d2f2af..b765069 100644
+--- a/src/egl/eglut/Makefile.am
++++ b/src/egl/eglut/Makefile.am
+@@ -33,17 +33,12 @@ if HAVE_WAYLAND
+ eglut_wayland = libeglut_wayland.la
+ endif
+ 
+-noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland)
++noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland)
+ endif
+ 
+-libeglut_screen_la_SOURCES = \
+-	eglut.c \
+-	eglut.h \
+-	eglutint.h \
+-	eglut_screen.c
+-
+ libeglut_x11_la_SOURCES = \
+ 	eglut.c \
++	eglut.h \
+ 	eglutint.h \
+ 	eglut_x11.c
+ libeglut_x11_la_CFLAGS = $(X11_CFLAGS) $(EGL_CFLAGS)
+@@ -52,6 +47,7 @@ libeglut_x11_la_LIBADD = $(X11_LIBS) $(EGL_LIBS)
+ 
+ libeglut_wayland_la_SOURCES = \
+ 	eglut.c \
++	eglut.h \
+ 	eglutint.h \
+ 	eglut_wayland.c
+ 
+diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
+index 2ee6f15..9921746 100644
+--- a/src/egl/eglut/eglut.c
++++ b/src/egl/eglut/eglut.c
+@@ -76,8 +76,7 @@ _eglutNow(void)
+ static void
+ _eglutDestroyWindow(struct eglut_window *win)
+ {
+-   if (_eglut->surface_type != EGL_PBUFFER_BIT &&
+-       _eglut->surface_type != EGL_SCREEN_BIT_MESA)
++   if (_eglut->surface_type != EGL_PBUFFER_BIT)
+       eglDestroySurface(_eglut->dpy, win->surface);
+ 
+    _eglutNativeFiniWindow(win);
+@@ -175,7 +174,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
+             win->config, win->native.u.pixmap, NULL);
+       break;
+    case EGL_PBUFFER_BIT:
+-   case EGL_SCREEN_BIT_MESA:
+       win->surface = win->native.u.surface;
+       break;
+    default:
+@@ -289,9 +287,7 @@ eglutDestroyWindow(int win)
+    if (window->index != win)
+       return;
+ 
+-   /* XXX it causes some bug in st/egl KMS backend */
+-   if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
+-      eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
++   eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ 
+    _eglutDestroyWindow(_eglut->current);
+ }
+diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
+deleted file mode 100644
+index 021a8f1..0000000
+--- a/src/egl/eglut/eglut_screen.c
++++ /dev/null
+@@ -1,180 +0,0 @@
+-/*
+- * Copyright (C) 2010 LunarG Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included
+- * in all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+- * DEALINGS IN THE SOFTWARE.
+- *
+- * Authors:
+- *    Chia-I Wu <olv@lunarg.com>
+- */
+-
+-#include <stdio.h>
+-#include <string.h>
+-#include <sys/time.h>
+-
+-#define EGL_EGLEXT_PROTOTYPES
+-#include "EGL/egl.h"
+-#include "EGL/eglext.h"
+-
+-#include "eglutint.h"
+-
+-#define MAX_MODES 100
+-
+-static EGLScreenMESA kms_screen;
+-static EGLModeMESA kms_mode;
+-static EGLint kms_width, kms_height;
+-
+-void
+-_eglutNativeInitDisplay(void)
+-{
+-   _eglut->native_dpy = EGL_DEFAULT_DISPLAY;
+-   _eglut->surface_type = EGL_SCREEN_BIT_MESA;
+-}
+-
+-void
+-_eglutNativeFiniDisplay(void)
+-{
+-   kms_screen = 0;
+-   kms_mode = 0;
+-   kms_width = 0;
+-   kms_height = 0;
+-}
+-
+-static void
+-init_kms(void)
+-{
+-   EGLModeMESA modes[MAX_MODES];
+-   EGLint num_screens, num_modes;
+-   EGLint width, height, best_mode;
+-   EGLint i;
+-
+-   if (!eglGetScreensMESA(_eglut->dpy, &kms_screen, 1, &num_screens) ||
+-         !num_screens)
+-      _eglutFatal("eglGetScreensMESA failed\n");
+-
+-   if (!eglGetModesMESA(_eglut->dpy, kms_screen,
+-            modes, MAX_MODES, &num_modes) || !num_modes)
+-      _eglutFatal("eglGetModesMESA failed!\n");
+-
+-   printf("Found %d modes:\n", num_modes);
+-
+-   best_mode = 0;
+-   width = 0;
+-   height = 0;
+-   for (i = 0; i < num_modes; i++) {
+-      EGLint w, h;
+-      eglGetModeAttribMESA(_eglut->dpy, modes[i], EGL_WIDTH, &w);
+-      eglGetModeAttribMESA(_eglut->dpy, modes[i], EGL_HEIGHT, &h);
+-      printf("%3d: %d x %d\n", i, w, h);
+-      if (w > width && h > height) {
+-         width = w;
+-         height = h;
+-         best_mode = i;
+-      }
+-   }
+-
+-   printf("Will use screen size: %d x %d\n", width, height);
+-
+-   kms_mode = modes[best_mode];
+-   kms_width = width;
+-   kms_height = height;
+-}
+-
+-void
+-_eglutNativeInitWindow(struct eglut_window *win, const char *title,
+-                       int x, int y, int w, int h)
+-{
+-   EGLint surf_attribs[16];
+-   EGLint i;
+-   const char *exts;
+-
+-   exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS);
+-   if (!exts || !strstr(exts, "EGL_MESA_screen_surface"))
+-      _eglutFatal("EGL_MESA_screen_surface is not supported\n");
+-
+-   init_kms();
+-
+-   i = 0;
+-   surf_attribs[i++] = EGL_WIDTH;
+-   surf_attribs[i++] = kms_width;
+-   surf_attribs[i++] = EGL_HEIGHT;
+-   surf_attribs[i++] = kms_height;
+-   surf_attribs[i++] = EGL_NONE;
+-
+-   /* create surface */
+-   win->native.u.surface = eglCreateScreenSurfaceMESA(_eglut->dpy,
+-         win->config, surf_attribs);
+-   if (win->native.u.surface == EGL_NO_SURFACE)
+-      _eglutFatal("eglCreateScreenSurfaceMESA failed\n");
+-
+-   if (!eglShowScreenSurfaceMESA(_eglut->dpy, kms_screen,
+-            win->native.u.surface, kms_mode))
+-      _eglutFatal("eglShowScreenSurfaceMESA failed\n");
+-
+-   win->native.width = kms_width;
+-   win->native.height = kms_height;
+-}
+-
+-void
+-_eglutNativeFiniWindow(struct eglut_window *win)
+-{
+-   eglShowScreenSurfaceMESA(_eglut->dpy,
+-         kms_screen, EGL_NO_SURFACE, 0);
+-   eglDestroySurface(_eglut->dpy, win->native.u.surface);
+-}
+-
+-void
+-_eglutNativeEventLoop(void)
+-{
+-   int start = _eglutNow();
+-   int frames = 0;
+-
+-   _eglut->redisplay = 1;
+-
+-   while (1) {
+-      struct eglut_window *win = _eglut->current;
+-      int now = _eglutNow();
+-
+-      if (now - start > 5000) {
+-         double elapsed = (double) (now - start) / 1000.0;
+-
+-         printf("%d frames in %3.1f seconds = %6.3f FPS\n",
+-               frames, elapsed, frames / elapsed);
+-         fflush(stdout);
+-
+-         start = now;
+-         frames = 0;
+-
+-         /* send escape */
+-         if (win->keyboard_cb)
+-            win->keyboard_cb(27);
+-      }
+-
+-      if (_eglut->idle_cb)
+-         _eglut->idle_cb();
+-
+-      if (_eglut->redisplay) {
+-         _eglut->redisplay = 0;
+-
+-         if (win->display_cb)
+-            win->display_cb();
+-         eglSwapBuffers(_eglut->dpy, win->surface);
+-         frames++;
+-      }
+-   }
+-}
+diff --git a/src/egl/opengl/CMakeLists.txt b/src/egl/opengl/CMakeLists.txt
+index 04fb6dd..dd726b7 100644
+--- a/src/egl/opengl/CMakeLists.txt
++++ b/src/egl/opengl/CMakeLists.txt
+@@ -12,19 +12,6 @@ link_libraries (
+ 
+ set (subdir egl)
+ 
+-set (targets
+-	demo1
+-	demo2
+-	demo3
+-)
+-
+-foreach (target ${targets})
+-	add_executable (${subdir}_${target} ${target}.c)
+-	set_target_properties (${subdir}_${target} PROPERTIES OUTPUT_NAME ${target})
+-	install (TARGETS ${subdir}_${target} DESTINATION ${subdir})
+-endforeach (target)
+-
+-
+ # Targets that can be built both for fullscreen EGL and X11
+ 
+ set (targets
+@@ -33,10 +20,6 @@ set (targets
+ )
+ 
+ foreach (target ${targets})
+-	add_executable (${target}_screen ${target}.c)
+-	target_link_libraries (${target}_screen eglut_screen)
+-	install (TARGETS ${target}_screen DESTINATION ${subdir})
+-
+ 	if (X11_FOUND)
+ 		add_executable (${target}_x11 ${target}.c)
+ 		target_link_libraries (${target}_x11 eglut_x11)
+diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
+index 0c7228f..fe7faa9 100644
+--- a/src/egl/opengl/Makefile.am
++++ b/src/egl/opengl/Makefile.am
+@@ -51,20 +51,12 @@ endif
+ 
+ if HAVE_EGL
+ noinst_PROGRAMS = \
+-	demo1 \
+-	demo2 \
+-	demo3 \
+ 	eglinfo \
+-	eglgears_screen \
+-	egltri_screen \
+ 	peglgears \
+ 	$(EGL_DRM_DEMOS) \
+ 	$(EGL_X11_DEMOS)
+ endif
+ 
+-egltri_screen_SOURCES = egltri.c
+-eglgears_screen_SOURCES = eglgears.c
+-
+ egltri_x11_SOURCES = egltri.c
+ eglgears_x11_SOURCES = eglgears.c
+ 
+@@ -73,9 +65,6 @@ egltri_x11_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS)
+ xeglgears_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS)
+ xeglthreads_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS) -pthread
+ 
+-eglgears_screen_LDADD = ../eglut/libeglut_screen.la
+-egltri_screen_LDADD = ../eglut/libeglut_screen.la
+-
+ eglgears_x11_LDADD = ../eglut/libeglut_x11.la
+ egltri_x11_LDADD = ../eglut/libeglut_x11.la
+ 
+diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
+deleted file mode 100644
+index d892734..0000000
+--- a/src/egl/opengl/demo1.c
++++ /dev/null
+@@ -1,147 +0,0 @@
+-/*
+- * Exercise EGL API functions
+- */
+-
+-#define EGL_EGLEXT_PROTOTYPES
+-
+-#include <EGL/egl.h>
+-#include <EGL/eglext.h>
+-#include <assert.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
+-
+-
+-/**
+- * Test EGL_MESA_screen_surface functions
+- */
+-static void
+-TestScreens(EGLDisplay dpy)
+-{
+-#define MAX 8
+-   EGLScreenMESA screens[MAX];
+-   EGLint numScreens;
+-   EGLint i;
+-
+-   eglGetScreensMESA(dpy, screens, MAX, &numScreens);
+-   printf("Found %d screens\n", numScreens);
+-   for (i = 0; i < numScreens; i++) {
+-      printf(" Screen %d handle: %d\n", i, (int) screens[i]);
+-   }
+-}
+-
+-/**
+- * Print table of all available configurations.
+- */
+-static void
+-PrintConfigs(EGLDisplay d, EGLConfig *configs, EGLint numConfigs)
+-{
+-   EGLint i;
+-
+-   printf("Configurations:\n");
+-   printf("     bf lv d st colorbuffer dp st   supported \n");
+-   printf("  id sz  l b ro  r  g  b  a th cl   surfaces  \n");
+-   printf("----------------------------------------------\n");
+-   for (i = 0; i < numConfigs; i++) {
+-      EGLint id, size, level;
+-      EGLint red, green, blue, alpha;
+-      EGLint depth, stencil;
+-      EGLint surfaces;
+-      EGLint doubleBuf = 1, stereo = 0;
+-      char surfString[100] = "";
+-
+-      eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
+-      eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size);
+-      eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level);
+-
+-      eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
+-      eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green);
+-      eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue);
+-      eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
+-      eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
+-      eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
+-      eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
+-
+-      if (surfaces & EGL_WINDOW_BIT)
+-         strcat(surfString, "win,");
+-      if (surfaces & EGL_PBUFFER_BIT)
+-         strcat(surfString, "pb,");
+-      if (surfaces & EGL_PIXMAP_BIT)
+-         strcat(surfString, "pix,");
+-      if (strlen(surfString) > 0)
+-         surfString[strlen(surfString) - 1] = 0;
+-
+-      printf("0x%02x %2d %2d %c  %c %2d %2d %2d %2d %2d %2d   %-12s\n",
+-             id, size, level,
+-             doubleBuf ? 'y' : '.',
+-             stereo ? 'y' : '.',
+-             red, green, blue, alpha,
+-             depth, stencil, surfString);
+-   }
+-}
+-
+-
+-
+-int
+-main(int argc, char *argv[])
+-{
+-   int maj, min;
+-   EGLContext ctx;
+-   EGLSurface pbuffer;
+-   EGLConfig *configs;
+-   EGLint numConfigs;
+-   EGLBoolean b;
+-   const EGLint pbufAttribs[] = {
+-      EGL_WIDTH, 500,
+-      EGL_HEIGHT, 500,
+-      EGL_NONE
+-   };
+-
+-   EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+-   assert(d);
+-
+-   if (!eglInitialize(d, &maj, &min)) {
+-      printf("demo: eglInitialize failed\n");
+-      exit(1);
+-   }
+-
+-   printf("EGL version = %d.%d\n", maj, min);
+-   printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
+-
+-   eglGetConfigs(d, NULL, 0, &numConfigs);
+-   configs = malloc(sizeof(*configs) *numConfigs);
+-   eglGetConfigs(d, configs, numConfigs, &numConfigs);
+-
+-   PrintConfigs(d, configs, numConfigs);
+-
+-   eglBindAPI(EGL_OPENGL_API);
+-   ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
+-   if (ctx == EGL_NO_CONTEXT) {
+-      printf("failed to create context\n");
+-      return 0;
+-   }
+-
+-   pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);
+-   if (pbuffer == EGL_NO_SURFACE) {
+-      printf("failed to create pbuffer\n");
+-      return 0;
+-   }
+-
+-   free(configs);
+-
+-   b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);
+-   if (!b) {
+-      printf("make current failed\n");
+-      return 0;
+-   }
+-
+-   b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+-
+-   TestScreens(d);
+-
+-   eglDestroySurface(d, pbuffer);
+-   eglDestroyContext(d, ctx);
+-   eglTerminate(d);
+-
+-   return 0;
+-}
+diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
+deleted file mode 100644
+index 505b474..0000000
+--- a/src/egl/opengl/demo2.c
++++ /dev/null
+@@ -1,216 +0,0 @@
+-/*
+- * Exercise EGL API functions
+- */
+-
+-#define EGL_EGLEXT_PROTOTYPES
+-
+-#include <assert.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <unistd.h>
+-
+-#include <EGL/egl.h>
+-#include <EGL/eglext.h>
+-#include "gl_wrap.h"
+-
+-/*#define FRONTBUFFER*/
+-
+-static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
+-                          GLfloat r, GLfloat g, GLfloat b)
+-{
+-   GLfloat v[4][2], c[4][4];
+-   int i;
+-
+-   v[0][0] = x1;   v[0][1] = y1;
+-   v[1][0] = x2;   v[1][1] = y1;
+-   v[2][0] = x2;   v[2][1] = y2;
+-   v[3][0] = x1;   v[3][1] = y2;
+-
+-   for (i = 0; i < 4; i++) {
+-      c[i][0] = r;
+-      c[i][1] = g;
+-      c[i][2] = b;
+-      c[i][3] = 1.0;
+-   }
+-
+-   glVertexPointer(2, GL_FLOAT, 0, v);
+-   glColorPointer(4, GL_FLOAT, 0, c);
+-   glEnableClientState(GL_VERTEX_ARRAY);
+-   glEnableClientState(GL_COLOR_ARRAY);
+-
+-   glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+-
+-   glDisableClientState(GL_VERTEX_ARRAY);
+-   glDisableClientState(GL_COLOR_ARRAY);
+-}
+-
+-
+-static void redraw(EGLDisplay dpy, EGLSurface surf, int rot)
+-{
+-   GLfloat r, g, b;
+-
+-   printf("Redraw event\n");
+-
+-   glClearColor( rand()/(float)RAND_MAX, 
+-		 rand()/(float)RAND_MAX, 
+-		 rand()/(float)RAND_MAX,
+-		 1);
+-
+-   glClear( GL_COLOR_BUFFER_BIT ); 
+-
+-   r = rand()/(float)RAND_MAX;
+-   g = rand()/(float)RAND_MAX;
+-   b = rand()/(float)RAND_MAX;
+-
+-   glPushMatrix();
+-   glRotatef(rot, 0, 0, 1);
+-   glScalef(.5, .5, .5);
+-   _subset_Rectf( -1, -1, 1, 1, r, g, b );
+-   glPopMatrix();
+-
+-#ifdef FRONTBUFFER
+-   glFlush();
+-#else
+-   eglSwapBuffers( dpy, surf ); 
+-#endif
+-   glFinish();
+-}
+-
+-
+-/**
+- * Test EGL_MESA_screen_surface functions
+- */
+-static void
+-TestScreens(EGLDisplay dpy)
+-{
+-#define MAX 8
+-   EGLScreenMESA screens[MAX];
+-   EGLint numScreens;
+-   EGLint i;
+-
+-   eglGetScreensMESA(dpy, screens, MAX, &numScreens);
+-   printf("Found %d screens\n", numScreens);
+-   for (i = 0; i < numScreens; i++) {
+-      printf(" Screen %d handle: %d\n", i, (int) screens[i]);
+-   }
+-}
+-
+-
+-int
+-main(int argc, char *argv[])
+-{
+-   int maj, min;
+-   EGLContext ctx;
+-   EGLSurface pbuffer, screen_surf;
+-   EGLConfig configs[10];
+-   EGLint numConfigs, i;
+-   EGLBoolean b;
+-   const EGLint pbufAttribs[] = {
+-      EGL_WIDTH, 500,
+-      EGL_HEIGHT, 500,
+-      EGL_NONE
+-   };
+-   EGLint screenAttribs[32];
+-   EGLModeMESA mode;
+-   EGLScreenMESA screen;
+-   EGLint count;
+-
+-   EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+-   assert(d);
+-
+-   if (!eglInitialize(d, &maj, &min)) {
+-      printf("demo: eglInitialize failed\n");
+-      exit(1);
+-   }
+-
+-   printf("EGL version = %d.%d\n", maj, min);
+-   printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
+-   if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
+-               "EGL_MESA_screen_surface")) {
+-      printf("EGL_MESA_screen_surface is not supported\n");
+-      exit(1);


Reply to: