Mesa (master): automake: properly handle non-default expat installation

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: aec20d66d9d13e0acd6a7199b63e1383e1e9900a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=aec20d66d9d13e0acd6a7199b63e1383e1e9900a

Author: Emil Velikov 
Date:   Tue Oct 29 21:14:41 2013 +

automake: properly handle non-default expat installation

Use PKG_CHECK_MODULE over requesting the user to setup the
option at configure time. Drop unused EXPAT_INCLUDE and
update all targets.

NOTE: The this commit removes the --with-expat configure
option. One should ensure that the expat they wish to use
has expat.pc file accessible by pkg-config.

v2:
* Add note about the removal of --with-expat
(per Tom Stellard)
* Drop EXPAT_CFLAGS for targets that do not build DRI_COMMON
(spotted by Matt Turner)
v3:
* Rebase on top of megadrivers (drop EXPAT_CFLAGS from swrast)

Acked-by: Matt Turner  (v2)
Reviewed-by: Tom Stellard  (v2)
Signed-off-by: Emil Velikov 

Conflicts:
configure.ac
src/mesa/drivers/dri/common/Makefile.am

---

 configure.ac   |   23 +--
 src/gallium/targets/dri-swrast/Makefile.am |1 +
 src/mesa/drivers/dri/common/Makefile.am|1 +
 3 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/configure.ac b/configure.ac
index 54ace41..8ba4fee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1005,21 +1005,9 @@ if test "x$enable_dri" = xyes; then
 DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/  */ /g'`
 
 # Check for expat
-EXPAT_INCLUDES=""
-EXPAT_LIB=-lexpat
-AC_ARG_WITH([expat],
-[AS_HELP_STRING([--with-expat=DIR],
-[expat install directory])],[
-EXPAT_INCLUDES="-I$withval/include"
-CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
-LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
-EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
-])
-AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])])
-save_LIBS="$LIBS"
-AC_CHECK_LIB([expat],[XML_ParserCreate],[],
-[AC_MSG_ERROR([Expat required for DRI.])])
-LIBS="$save_LIBS"
+PKG_CHECK_MODULES([EXPAT], [expat], [],
+  AC_MSG_ERROR([Expat required for DRI.]))
+
 
 # If we are building any DRI driver other than swrast.
 if test -n "$DRI_DIRS"; then
@@ -1035,8 +1023,8 @@ if test "x$enable_dri" = xyes; then
 fi
 
 # put all the necessary libs together
-DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm 
$PTHREAD_LIBS $DLOPEN_LIBS"
-GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS 
$EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
+DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm 
$PTHREAD_LIBS $DLOPEN_LIBS"
+GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS 
$EXPAT_LIBS -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
 
 DRI_DRIVER_LDFLAGS="-module -avoid-version -shared -Wl,-Bsymbolic"
 fi
@@ -1045,7 +1033,6 @@ AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
 AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
   "x$enable_osmesa" = xyes -o \
   -n "$DRI_DIRS")
-AC_SUBST([EXPAT_INCLUDES])
 AC_SUBST([DRI_LIB_DEPS])
 AC_SUBST([DRI_DRIVER_LDFLAGS])
 AC_SUBST([GALLIUM_DRI_LIB_DEPS])
diff --git a/src/gallium/targets/dri-swrast/Makefile.am 
b/src/gallium/targets/dri-swrast/Makefile.am
index 6b629df..cddbbe3 100644
--- a/src/gallium/targets/dri-swrast/Makefile.am
+++ b/src/gallium/targets/dri-swrast/Makefile.am
@@ -25,6 +25,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
$(PTHREAD_CFLAGS) \
+   $(EXPAT_CFLAGS) \
$(LIBDRM_CFLAGS) \
$(VISIBILITY_CFLAGS)
 AM_CPPFLAGS = \
diff --git a/src/mesa/drivers/dri/common/Makefile.am 
b/src/mesa/drivers/dri/common/Makefile.am
index 9f49ff3..7f87ed6 100644
--- a/src/mesa/drivers/dri/common/Makefile.am
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -27,6 +27,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa/ \
$(DEFINES) \
+   $(EXPAT_CFLAGS) \
$(VISIBILITY_CFLAGS)
 
 noinst_LTLIBRARIES = \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: add sanity checks after malloc

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 2b7ffde8bd0d11258d0e71e01ec226022d51059a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b7ffde8bd0d11258d0e71e01ec226022d51059a

Author: Emil Velikov 
Date:   Sat Sep 21 17:53:43 2013 +0100

st/xorg: add sanity checks after malloc

Signed-off-by: Emil Velikov 
Reviewed-by: Brian Paul 

---

 src/gallium/state_trackers/xorg/xorg_driver.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c 
b/src/gallium/state_trackers/xorg/xorg_driver.c
index dd243bc..097c354 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -124,6 +124,9 @@ Bool
 xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
 {
 char *BusID = malloc(64);
+
+if (!BusID)
+   return FALSE;
 sprintf(BusID, "pci:%04x:%02x:%02x.%d",
device->domain, device->bus,
device->dev, device->func);
@@ -276,6 +279,9 @@ drv_init_drm(ScrnInfoPtr pScrn)
char *BusID;
 
BusID = malloc(64);
+   if (!BusID)
+   return FALSE;
+
sprintf(BusID, "PCI:%d:%d:%d",
((ms->PciInfo->domain << 8) | ms->PciInfo->bus),
ms->PciInfo->dev, ms->PciInfo->func

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/xorg-nouveau: drop usage of dri1 function DRICreatePCIBusID

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 2a87647c6adca73400e3f9f9e9ef7624c7837082
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a87647c6adca73400e3f9f9e9ef7624c7837082

Author: Emil Velikov 
Date:   Sat Sep 21 17:41:57 2013 +0100

targets/xorg-nouveau: drop usage of dri1 function DRICreatePCIBusID

The function should have never used it in the first place as it was
a left over from the DRI1 days of the nouveau ddx. While we're around
check if KMS is supported before opening the nouveau device, and
add support for Fermi & Kepler cards.

Compile tested only due to the lack of a Fermi/Kepler card.

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/xorg-nouveau/nouveau_xorg.c |   27 ---
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c 
b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
index 454aea6..2e44ddb 100644
--- a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
+++ b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
@@ -30,7 +30,6 @@
 
 #include "../../state_trackers/xorg/xorg_winsys.h"
 #include 
-#include 
 #include 
 
 static void nouveau_xorg_identify(int flags);
@@ -129,32 +128,31 @@ nouveau_xorg_pci_probe(DriverPtr driver,
 char *busid;
 int chipset, ret;
 
-if (device->vendor_id != 0x10DE)
+busid = malloc(64);
+if (!busid)
return FALSE;
 
-if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
-   xf86DrvMsg(-1, X_ERROR, "[drm] No DRICreatePCIBusID symbol\n");
+sprintf(busid, "pci:%04x:%02x:%02x.%d",
+   device->domain, device->bus,
+   device->dev, device->func);
+
+ret = drmCheckModesettingSupported(busid);
+if (ret) {
+   xf86DrvMsg(-1, X_ERROR, "[drm] KMS not enabled\n");
+   free(busid);
return FALSE;
 }
-busid = DRICreatePCIBusID(device);
 
 ret = nouveau_device_open(busid, &dev);
+free(busid);
 if (ret) {
xf86DrvMsg(-1, X_ERROR, "[drm] failed to open device\n");
-   free(busid);
return FALSE;
 }
 
 chipset = dev->chipset;
 nouveau_device_del(&dev);
 
-ret = drmCheckModesettingSupported(busid);
-free(busid);
-if (ret) {
-   xf86DrvMsg(-1, X_ERROR, "[drm] KMS not enabled\n");
-   return FALSE;
-}
-
 switch (chipset & 0xf0) {
 case 0x00:
 case 0x10:
@@ -169,6 +167,9 @@ nouveau_xorg_pci_probe(DriverPtr driver,
 case 0x90:
 case 0xa0:
 case 0xc0:
+case 0xd0:
+case 0xe0:
+case 0xf0:
xf86DrvMsg(-1, X_INFO, "Detected chipset: NV%02x\n", chipset);
break;
 default:

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: drop set but unsused variables dxo, dyo

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: ba3efd6b42e1b875fd029c6dd8ec93512a3fff2e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba3efd6b42e1b875fd029c6dd8ec93512a3fff2e

Author: Emil Velikov 
Date:   Sat Sep 28 15:17:29 2013 +0100

st/xorg: drop set but unsused variables dxo, dyo

Commit a9f8baf00b264 removed the first and only use of the variables
but forgot to remove them.

Signed-off-by: Emil Velikov 
Reviewed-by: Brian Paul 

---

 src/gallium/state_trackers/xorg/xorg_xv.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c 
b/src/gallium/state_trackers/xorg/xorg_xv.c
index 3097d00..f0de3d2 100644
--- a/src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/src/gallium/state_trackers/xorg/xorg_xv.c
@@ -490,7 +490,6 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv 
*pPriv, int id,
modesettingPtr ms = modesettingPTR(pScrn);
BoxPtr pbox;
int nbox;
-   int dxo, dyo;
Bool hdtv;
int x, y, w, h;
struct exa_pixmap_priv *dst;
@@ -518,9 +517,6 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv 
*pPriv, int id,
 -pPixmap->screen_y);
 #endif
 
-   dxo = dstRegion->extents.x1;
-   dyo = dstRegion->extents.y1;
-
pbox = REGION_RECTS(dstRegion);
nbox = REGION_NUM_RECTS(dstRegion);
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure: use PKG_CONFIG variable over hardcoded pkg-config

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 0828ad4e63df512c9d21e6e75b32f03401c3e95a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0828ad4e63df512c9d21e6e75b32f03401c3e95a

Author: Emil Velikov 
Date:   Sat Sep 28 03:20:14 2013 +0100

configure: use PKG_CONFIG variable over hardcoded pkg-config

Already available and used in other places of configure.ac.

Signed-off-by: Emil Velikov 
Reviewed-by: Brian Paul 

---

 configure.ac |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 91b9871..54ace41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1358,8 +1358,8 @@ if test "x$enable_opencl" = xyes; then
 PKG_CONFIG_PATH environment variable.
 By default libclc.pc is installed to 
/usr/local/share/pkgconfig/])
 else
-LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
-LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
+LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc`
+LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc`
 AC_SUBST([LIBCLC_INCLUDEDIR])
 AC_SUBST([LIBCLC_LIBEXECDIR])
 fi

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/targets/xorg: drop set but unused variable entity

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: c9e6e6382f8c38b47691495e5a710935115b6702
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9e6e6382f8c38b47691495e5a710935115b6702

Author: Emil Velikov 
Date:   Sat Sep 28 15:08:24 2013 +0100

gallium/targets/xorg: drop set but unused variable entity

The function xf86GetEntityInfo() retrieves the entity rather than
doing any changes. Remove this no-op code.

Signed-off-by: Emil Velikov 
Reviewed-by: Tom Stellard 

---

 src/gallium/targets/r600/xorg/xorg.c|3 ---
 src/gallium/targets/radeonsi/xorg/xorg.c|3 ---
 src/gallium/targets/xorg-i915/intel_xorg.c  |3 ---
 src/gallium/targets/xorg-nouveau/nouveau_xorg.c |3 ---
 4 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/gallium/targets/r600/xorg/xorg.c 
b/src/gallium/targets/r600/xorg/xorg.c
index 83610fd..b0b0ef0 100644
--- a/src/gallium/targets/r600/xorg/xorg.c
+++ b/src/gallium/targets/r600/xorg/xorg.c
@@ -129,7 +129,6 @@ r600_xorg_pci_probe(DriverPtr driver,
  int entity_num, struct pci_device *device, intptr_t match_data)
 {
 ScrnInfoPtr scrn = NULL;
-EntityInfoPtr entity;
 
 scrn = xf86ConfigPciEntity(scrn, 0, entity_num, r600_xorg_pci_devices,
   NULL, NULL, NULL, NULL, NULL);
@@ -139,8 +138,6 @@ r600_xorg_pci_probe(DriverPtr driver,
scrn->name = "R600G";
scrn->Probe = NULL;
 
-   entity = xf86GetEntityInfo(entity_num);
-
/* Use all the functions from the xorg tracker */
xorg_tracker_set_functions(scrn);
 }
diff --git a/src/gallium/targets/radeonsi/xorg/xorg.c 
b/src/gallium/targets/radeonsi/xorg/xorg.c
index cce7926..7858f03 100644
--- a/src/gallium/targets/radeonsi/xorg/xorg.c
+++ b/src/gallium/targets/radeonsi/xorg/xorg.c
@@ -129,7 +129,6 @@ radeonsi_xorg_pci_probe(DriverPtr driver,
  int entity_num, struct pci_device *device, intptr_t match_data)
 {
 ScrnInfoPtr scrn = NULL;
-EntityInfoPtr entity;
 
 scrn = xf86ConfigPciEntity(scrn, 0, entity_num, radeonsi_xorg_pci_devices,
   NULL, NULL, NULL, NULL, NULL);
@@ -139,8 +138,6 @@ radeonsi_xorg_pci_probe(DriverPtr driver,
scrn->name = "RADEONSI";
scrn->Probe = NULL;
 
-   entity = xf86GetEntityInfo(entity_num);
-
/* Use all the functions from the xorg tracker */
xorg_tracker_set_functions(scrn);
 }
diff --git a/src/gallium/targets/xorg-i915/intel_xorg.c 
b/src/gallium/targets/xorg-i915/intel_xorg.c
index 32d4a54..d8eb258 100644
--- a/src/gallium/targets/xorg-i915/intel_xorg.c
+++ b/src/gallium/targets/xorg-i915/intel_xorg.c
@@ -128,7 +128,6 @@ intel_xorg_pci_probe(DriverPtr driver,
  int entity_num, struct pci_device *device, intptr_t match_data)
 {
 ScrnInfoPtr scrn = NULL;
-EntityInfoPtr entity;
 
 scrn = xf86ConfigPciEntity(scrn, 0, entity_num, intel_xorg_pci_devices,
   NULL, NULL, NULL, NULL, NULL);
@@ -138,8 +137,6 @@ intel_xorg_pci_probe(DriverPtr driver,
scrn->name = "modesetting";
scrn->Probe = NULL;
 
-   entity = xf86GetEntityInfo(entity_num);
-
/* Use all the functions from the xorg tracker */
xorg_tracker_set_functions(scrn);
 }
diff --git a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c 
b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
index 2324d24..454aea6 100644
--- a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
+++ b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
@@ -125,7 +125,6 @@ nouveau_xorg_pci_probe(DriverPtr driver,
  int entity_num, struct pci_device *device, intptr_t match_data)
 {
 ScrnInfoPtr scrn = NULL;
-EntityInfoPtr entity;
 struct nouveau_device *dev = NULL;
 char *busid;
 int chipset, ret;
@@ -185,8 +184,6 @@ nouveau_xorg_pci_probe(DriverPtr driver,
scrn->name = "nouveau2";
scrn->Probe = NULL;
 
-   entity = xf86GetEntityInfo(entity_num);
-
/* Use all the functions from the xorg tracker */
xorg_tracker_set_functions(scrn);
 }

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: remove unnecessary headers

2013-10-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5c398e243c9b9f187bbfeb7933b673b034517dc0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c398e243c9b9f187bbfeb7933b673b034517dc0

Author: Emil Velikov 
Date:   Sat Sep 28 03:03:39 2013 +0100

st/xorg: remove unnecessary headers

v2: Remove xf86PciInfo.h, all drivers provide their own PCI ID list

Signed-off-by: Emil Velikov 
Reviewed-by: Brian Paul 

---

 src/gallium/state_trackers/xorg/xorg_driver.c |1 -
 src/gallium/state_trackers/xorg/xorg_output.c |7 ---
 2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c 
b/src/gallium/state_trackers/xorg/xorg_driver.c
index 9d7713c..dd243bc 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -33,7 +33,6 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "compiler.h"
-#include "xf86PciInfo.h"
 #include "xf86Pci.h"
 #include "mipointer.h"
 #include "micmap.h"
diff --git a/src/gallium/state_trackers/xorg/xorg_output.c 
b/src/gallium/state_trackers/xorg/xorg_output.c
index b183cdf..dffc28e 100644
--- a/src/gallium/state_trackers/xorg/xorg_output.c
+++ b/src/gallium/state_trackers/xorg/xorg_output.c
@@ -43,13 +43,6 @@
 #include 
 #include 
 
-#ifdef HAVE_XEXTPROTO_71
-#include 
-#else
-#define DPMS_SERVER
-#include 
-#endif
-
 #include "xorg_tracker.h"
 
 struct output_private

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: handle expat version pre 2.1

2013-10-30 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 9eb3de1ce7acb59a8b38ddcef20366620ff02b60
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9eb3de1ce7acb59a8b38ddcef20366620ff02b60

Author: Emil Velikov 
Date:   Wed Oct 30 00:03:43 2013 +

automake: handle expat version pre 2.1

Commit aec20d66d9d13e0acd6a7199b63e1383e1e9900a
(automake: properly handle non-default expat installation),
assumed that up-to date distributions use a recent version
of expat that handles security vunerabilities CVE-2012-1147
and CVE-2012-1148. Seems like this is not always the case
and they prefer to backport only the fix, rather than use
the updated library.

This commit adds a default case -lexpat whenever expat is
not found, while properly handling expat.pc if present.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71022
Reported-By: Bryce Harrington 
Reported-By: Vinson Lee 
Tested-by: Bryce Harrington 
Signed-off-by: Emil Velikov 

---

 configure.ac |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8ba4fee..f94c9b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1005,9 +1005,14 @@ if test "x$enable_dri" = xyes; then
 DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/  */ /g'`
 
 # Check for expat
-PKG_CHECK_MODULES([EXPAT], [expat], [],
-  AC_MSG_ERROR([Expat required for DRI.]))
-
+PKG_CHECK_EXISTS([EXPAT], [have_expat=yes], [have_expat=no])
+if test "x$have_expat" = "xyes"; then
+   PKG_CHECK_MODULES([EXPAT], [expat], [],
+ AC_MSG_ERROR([Expat required for DRI.]))
+else
+   # expat version 2.0 and earlier do not provide expat.pc
+   EXPAT_LIBS=-lexpat
+fi
 
 # If we are building any DRI driver other than swrast.
 if test -n "$DRI_DIRS"; then

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: handle updates to DamageUnregister API

2013-11-04 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 0a2bdbb76f9fecf34c6b5fb39b60fda745440e4f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a2bdbb76f9fecf34c6b5fb39b60fda745440e4f

Author: Emil Velikov 
Date:   Fri Nov  1 16:44:10 2013 +

st/xorg: handle updates to DamageUnregister API

xserver 1.14.99.2 simplified the DamageUnregister API, by
dropping the drawable argument.
Follow xf86-video-intel and xf86-video-vmware approach and
handle the new API by checking XORG_VERSION_CURRENT.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71110
Reported-by: Michał Górny 
Reported-by: Vinson Lee 
Tested-by: Vinson Lee 
Reviewed-by: Brian Paul 
Signed-off-by: Emil Velikov 

---

 src/gallium/state_trackers/xorg/xorg_driver.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c 
b/src/gallium/state_trackers/xorg/xorg_driver.c
index 097c354..d252545 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -1027,7 +1027,11 @@ drv_close_screen(CLOSE_SCREEN_ARGS_DECL)
 
 #ifdef DRM_MODE_FEATURE_DIRTYFB
 if (ms->damage) {
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
+   DamageUnregister(ms->damage);
+#else
DamageUnregister(&pScreen->GetScreenPixmap(pScreen)->drawable, 
ms->damage);
+#endif
DamageDestroy(ms->damage);
ms->damage = NULL;
 }

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): 27 new commits

2013-11-16 Thread Emil Velikov
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=02fdb5cb51fdbe63261ffeb7d5ca0fa10838899b
Author: Emil Velikov 
Date:   Sat Nov 9 23:00:14 2013 +

targets/dri: move linker flags out of configure into Automake.inc

Previous assumption was that the same set of flags can be reused
for both classic and gallium drivers. With megadriver work done
the classic drivers ended up using their own (single) instance of
the flags.

Move these into Automake.inc and rename to indicate that those
are gallium specific. Additionally silence an automake/autoconf
warning "XXX is not a standard libtool library name", due to
the parsing issues of the module tag.

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b8c2c8f00a145d0e62edac9c92c1ef14d02651d
Author: Emil Velikov 
Date:   Sat Nov 2 15:33:07 2013 +

targets/dri: compact compiler flags into Automake.inc

Greatly reduce duplication and provide a sane minimum of
CFLAGS for all DRI targets.

Note: This commit adds VISIBILITY_CFLAGS to the following:
* freedreno
* i915
* ilo
* nouveau
* vmwgfx

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=38e0b7eeaa7f29b39bb08dbfbe55ae6b64236954
Author: Emil Velikov 
Date:   Sat Nov 9 22:56:33 2013 +

targets/xvmc: do not link against libtrace.la

In order to use the trace driver, one needs to define
GALLIUM_TRACE. Neither one of the two targets was
defining it, thus we're safe to remove libtrace.la.

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dfcdece7c55edcdff1e2eece94e4be0ececcea79
Author: Emil Velikov 
Date:   Sat Nov 9 22:55:59 2013 +

targets/xvmc: consolidate lib deps into Automake.inc

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfda1460b136511fa3363802377b9f34aa4f3d15
Author: Emil Velikov 
Date:   Sat Nov 9 22:54:58 2013 +

targets/xvmc: move linker flags to Automake.inc

Minimise duplication and sources of error
(eg nouveau was missing shared and no-undefined)

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d7d120af176acb2a02b25868bb65f7e462084e5
Author: Emil Velikov 
Date:   Sat Nov 9 22:53:15 2013 +

targets/xvmc: use drop duplicated compiler flags

Automake.inc already has GALLIUM_VIDEO_CFLAGS, which
provide the essential compiler flags needed.

Note: this commit adds VISIBILITY_CFLAGS to nouveau.

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7ac1d5989699d31f02b120d3f8cb51b7159dbb5
Author: Emil Velikov 
Date:   Sat Nov 2 02:02:47 2013 +

gallium/winsys: compact compiler flags into Automake.inc

Cleanup the duplicating flags and consolidate into a sigle variable.

Note: this patch adds VISIBILITY_CFLAGS to the following targets
* freedreno/drm
* i915/{drm,sw}
* nouveau/drm
* sw/fbdev
* sw/null
* sw/wayland
* sw/wrapper
* sw/xlib

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=096b988360158d4cf3c92d52d26f9f098774ba1d
Author: Emil Velikov 
Date:   Sat Nov 9 22:51:56 2013 +

targets/vdpau: drop unused libraries from linker

In order for one to use trace, noop, rbug and/or galahad, they must
set the corresponding GALLIUM_* CFLAG.

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f920a91f35f21a372e211fe961a163990af677c
Author: Emil Velikov 
Date:   Sat Nov 9 22:51:19 2013 +

targets/vdpau: consolidate lib deps into Automake.inc

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f0df8ab22e23956e05451c7191b155e69e5c8d1
Author: Emil Velikov 
Date:   Sat Nov 9 22:50:47 2013 +

targets/vdpau: move linker flags to Automake.inc

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=23588a9c04ca267799e8c85079cf5667a435790e
Author: Emil Velikov 
Date:   Sat Nov 9 22:48:44 2013 +

targets/vdpau: compact compiler flags into Automake.inc

Store the compiler flags into a variable, in order to minimise
flags duplication (amongst vdpau and xvmc).

Note: this commit add VISIBILITY_CFLAGS to the nouveau target

Signed-off-by: Emil Velikov 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7dac1b470a9c1c977f79ecc301407681e200bd1a
Author: Emil Velikov 
Date:   Fri Nov 1 18:58:27 2013 +

gallium/drivers: compact compiler flags into Automake.inc

* minimise flags duplication
* distingush between VISIBILITY C and CXX flags
* set only required flags - C and/or CXX

v2: add LLVM_CFLAGS back to AM_CFLAGS (add mi

Mesa (master): docs: update nv50, nvc0 current status

2013-11-18 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: b8a11151323b65b13fa9854a7d73a9e60d3a65a2
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8a11151323b65b13fa9854a7d73a9e60d3a65a2

Author: Emil Velikov 
Date:   Sat Nov 16 22:26:09 2013 +

docs: update nv50, nvc0 current status

Acked-by: Chris Forbes 
Reviewed-by: Marek Olšák 
Signed-off-by: Emil Velikov 

---

 docs/GL3.txt |   36 ++--
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index 9b9d38b..5f6fa7e 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -18,7 +18,7 @@ are exposed in the 3.0 context as extensions.
 Feature   Status
 - 
 
-GL 3.0 --- all DONE: i965, r600, radeonsi
+GL 3.0 --- all DONE: i965, nv50, nvc0, r600, radeonsi
 
   GLSL 1.30 DONE ()
   glBindFragDataLocation, glGetFragDataLocation DONE
@@ -47,7 +47,7 @@ GL 3.0 --- all DONE: i965, r600, radeonsi
   GLX_ARB_create_context (GLX 1.4 is required)  DONE
 
 
-GL 3.1 --- all DONE: i965, r600, radeonsi
+GL 3.1 --- all DONE: i965, nv50, nvc0, r600, radeonsi
 
   GLSL 1.40 DONE ()
   Forward compatible context support/deprecations   DONE ()
@@ -66,29 +66,29 @@ GL 3.2 --- all DONE: i965
   Core/compatibility profiles   DONE
   GLSL 1.50 DONE ()
   Geometry shaders  DONE ()
-  BGRA vertex order (GL_ARB_vertex_array_bgra)  DONE (r300, r600, 
radeonsi, swrast)
-  Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (r300, r600, 
radeonsi, swrast)
-  Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (r300, r600, 
radeonsi, swrast)
-  Provoking vertex (GL_ARB_provoking_vertex)DONE (r300, r600, 
radeonsi, swrast)
-  Seamless cubemaps (GL_ARB_seamless_cube_map)  DONE (r600, radeonsi)
-  Multisample textures (GL_ARB_texture_multisample) DONE (r600, radeonsi)
-  Frag depth clamp (GL_ARB_depth_clamp) DONE (r600, swrast, 
radeonsi)
-  Fence objects (GL_ARB_sync)   DONE (r300, r600, 
radeonsi, swrast)
+  BGRA vertex order (GL_ARB_vertex_array_bgra)  DONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
+  Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
+  Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
+  Provoking vertex (GL_ARB_provoking_vertex)DONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
+  Seamless cubemaps (GL_ARB_seamless_cube_map)  DONE (nvc0, r600, 
radeonsi)
+  Multisample textures (GL_ARB_texture_multisample) DONE (nvc0, r600, 
radeonsi)
+  Frag depth clamp (GL_ARB_depth_clamp) DONE (nv50, nvc0, 
r600, swrast, radeonsi)
+  Fence objects (GL_ARB_sync)   DONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
   GLX_ARB_create_context_profileDONE
 
 
 GL 3.3 --- all DONE: i965
 
   GLSL 3.30 DONE ()
-  GL_ARB_blend_func_extendedDONE (r600, radeonsi, 
softpipe)
-  GL_ARB_explicit_attrib_location   DONE (i915, r300, 
r600, radeonsi, swrast)
-  GL_ARB_occlusion_query2   DONE (r300, r600, 
radeonsi, swrast)
-  GL_ARB_sampler_objectsDONE (r300, r600, 
radeonsi)
-  GL_ARB_shader_bit_encodingDONE (r600, radeonsi)
+  GL_ARB_blend_func_extendedDONE (nv50, nvc0, 
r600, radeonsi, softpipe)
+  GL_ARB_explicit_attrib_location   DONE (i915, nv50, 
nvc0, r300, r600, radeonsi, swrast)
+  GL_ARB_occlusion_query2   DONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
+  GL_ARB_sampler_objectsDONE (nv50, nvc0, 
r300, r600, radeonsi)
+  GL_ARB_shader_bit_encodingDONE (nv50, nvc0, 
r600, radeonsi)
   GL_ARB_texture_rgb10_a2ui DONE (r600, radeonsi)
-  GL_ARB_texture_swizzleDONE (r300, r600, 
radeonsi, swrast)
-  GL_ARB_timer_queryDONE (r600, radeonsi)
-  GL_ARB_instanced_arrays   DONE (r300, r600, 
radeonsi)
+  GL_ARB_texture_swizzleDONE (nv50, nvc0, 
r300, r600, radeonsi, swrast)
+  GL_ARB_timer_queryDONE (nv50, nvc0, 
r600, radeonsi)
+  GL_ARB_instanced_arrays   DONE (nv50, nvc0, 
r300, r600, radeonsi)
   GL_ARB_vertex_type_2_10_10_10_rev DONE (r600, radeonsi

Mesa (master): docs: add a note about removed state tracker/targets

2013-11-18 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: ca9794658ed6df30a12e48854aecee7bd628b70f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca9794658ed6df30a12e48854aecee7bd628b70f

Author: Emil Velikov 
Date:   Sat Nov 16 21:53:04 2013 +

docs: add a note about removed state tracker/targets

The X.Org state tracker is gone, as well as the xvmc/vdpau
r300 and softpipe targets.

Cc: "10.0" 
Acked-by: Chris Forbes 
Reviewed-by: Marek Olšák 
Signed-off-by: Emil Velikov 

---

 docs/relnotes/10.0.html |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/docs/relnotes/10.0.html b/docs/relnotes/10.0.html
index eabe77f..f06d068 100644
--- a/docs/relnotes/10.0.html
+++ b/docs/relnotes/10.0.html
@@ -64,7 +64,11 @@ TBD.
 
 Changes
 
-TBD.
+
+Removed X.Org state tracker (unmaintained and broken)
+Removed the video-accel r300 targets
+Removed the video-accel softpipe targets
+
 
 
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: restructure GL3.txt

2013-11-18 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: f9868926ee2a6914edb65e64eb9aeb445bc32e4c
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9868926ee2a6914edb65e64eb9aeb445bc32e4c

Author: Joerg Mayer 
Date:   Sat Nov 16 22:13:03 2013 +

docs: restructure GL3.txt

- Indent items under a GL version to allow context diffs to do their work.
- Move complete drivers into the GL version line - this should make the
  stuff a little bit easier to read.

v2: keep the fd.o link (Emil Velikov)

Acked-by: Chris Forbes 
Reviewed-by: Marek Olšák 
Signed-off-by: Joerg Mayer 
Signed-off-by: Emil Velikov 

---

 docs/GL3.txt |  276 +-
 1 files changed, 138 insertions(+), 138 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index a8cffab..9b9d38b 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -18,164 +18,164 @@ are exposed in the 3.0 context as extensions.
 Feature   Status
 - 
 
-GL 3.0:
-
-GLSL 1.30 DONE (i965, r600, 
radeonsi)
-glBindFragDataLocation, glGetFragDataLocation DONE
-Conditional rendering (GL_NV_conditional_render)  DONE (i965, r300, r600, 
radeonsi, swrast)
-Map buffer subranges (GL_ARB_map_buffer_range)DONE (i965, r300, r600, 
radeonsi, swrast)
-Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r300, r600, 
radeonsi)
-Float textures, renderbuffers (GL_ARB_texture_float)  DONE (i965, r300, r600, 
radeonsi)
-GL_EXT_packed_float   DONE (i965, r600, 
radeonsi)
-GL_EXT_texture_shared_exponentDONE (i965, r600, 
radeonsi, swrast)
-Float depth buffers (GL_ARB_depth_buffer_float)   DONE (i965, r600, 
radeonsi)
-Framebuffer objects (GL_ARB_framebuffer_object)   DONE (i965, r300, r600, 
radeonsi, swrast)
-Half-floatDONE (i965, r300, r600, 
radeonsi, swrast)
-Non-normalized Integer texture/framebuffer formatsDONE (i965, r600, 
radeonsi)
-1D/2D Texture arrays  DONE (i965, r600, 
radeonsi)
-Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, 
radeonsi, swrast)
-GL_EXT_texture_compression_rgtc   DONE (i965, r300, r600, 
radeonsi, swrast)
-Red and red/green texture formats DONE (i965, r300, r600, 
radeonsi, swrast)
-Transform feedback (GL_EXT_transform_feedback)DONE (i965, r600, 
radeonsi)
-Vertex array objects (GL_APPLE_vertex_array_object)   DONE (all drivers)
-sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600, 
radeonsi)
-glClearBuffer commandsDONE
-glGetStringi command  DONE
-glTexParameterI, glGetTexParameterI commands  DONE
-glVertexAttribI commands  DONE
-Depth format cube texturesDONE (i965, r600, 
radeonsi)
-GLX_ARB_create_context (GLX 1.4 is required)  DONE
-
-
-GL 3.1:
-
-GLSL 1.40 DONE (i965, r600, 
radeonsi)
-Forward compatible context support/deprecations   DONE (i965, r600, 
radeonsi)
-Instanced drawing (GL_ARB_draw_instanced) DONE (i965, r600, 
radeonsi, swrast)
-Buffer copying (GL_ARB_copy_buffer)   DONE (i965, r300, r600, 
radeonsi, swrast)
-Primitive restart (GL_NV_primitive_restart)   DONE (i965, r300, r600, 
radeonsi)
-16 vertex texture image units DONE (i965, r600, 
radeonsi)
-Texture buffer objs (GL_ARB_texture_buffer_object)DONE for OpenGL 3.1 
contexts (i965, r600, radeonsi)
-Rectangular textures (GL_ARB_texture_rectangle)   DONE (i965, r300, r600, 
radeonsi, swrast)
-Uniform buffer objs (GL_ARB_uniform_buffer_object)DONE (i965, r600, 
radeonsi, swrast)
-Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600, 
radeonsi)
-
-
-GL 3.2:
-
-Core/compatibility profiles   DONE
-GLSL 1.50 DONE (i965)
-Geometry shaders  DONE (i965)
-BGRA vertex order (GL_ARB_vertex_array_bgra)  DONE (i965, r300, r600, 
radeonsi, swrast)
-Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (i965, r300, r600, 
radeonsi, swrast)
-Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, 
radeonsi, swrast)
-Provoking vertex (GL_ARB_provoking_vertex)DONE (i965, r300, r600, 
radeonsi, swrast)
-Seamless cubemaps (GL_ARB_seamless_cube_map)  DONE (i965, r600, 
radeonsi)
-Multisample textures (GL_ARB_texture_multisample) DONE (i965, r600, 
radeonsi)
-Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, 
swrast, radeonsi)
-Fence objects (GL_ARB_sync)   DONE (i965, r300

Mesa (master): drivers/radeon: remove unused CXXFLAGS, LLVM_CPP_FILES

2013-11-18 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5896100a38fae2ebf9ad081c2bf4eeaab2cd704f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5896100a38fae2ebf9ad081c2bf4eeaab2cd704f

Author: Emil Velikov 
Date:   Sat Nov 16 18:37:52 2013 +

drivers/radeon: remove unused CXXFLAGS, LLVM_CPP_FILES

The above two variables are unused as of commit

  commit 024fe6852a76f33d7e2afc5621340e387c381bb0
  Author: Tom Stellard 
  Date:   Tue Apr 2 10:42:50 2013 -0700

  radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA v2

which removed the only cpp file from drivers/radeon, but missed to
remove the CXXFLAGS. The sequential commit reintroduced and empty
LLVM_CPP_FILES.

Lets cleanup and remove both.

Signed-off-by: Emil Velikov 

---

 src/gallium/drivers/radeon/Makefile.am |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index 457fee9..7971191 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -15,15 +15,11 @@ if NEED_RADEON_LLVM
 
 noinst_LTLIBRARIES += libllvmradeon.la
 
-libllvmradeon_la_CXXFLAGS = \
-   $(GALLIUM_DRIVER_CXXFLAGS)
-
 libllvmradeon_la_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(LLVM_CFLAGS)
 
 libllvmradeon_la_SOURCES = \
-   $(LLVM_CPP_FILES) \
$(LLVM_C_FILES)
 
 libllvmradeon_la_LIBADD = \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: indicate GLX_MESA_query_renderer's completion

2013-11-18 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: d33d260b905401b8279c111b1350781bc08673f0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d33d260b905401b8279c111b1350781bc08673f0

Author: Emil Velikov 
Date:   Sat Nov 16 22:59:29 2013 +

docs: indicate GLX_MESA_query_renderer's completion

Cc: "10.0" 
Acked-by: Chris Forbes 
Reviewed-by: Marek Olšák 
Signed-off-by: Emil Velikov 

---

 docs/relnotes/10.0.html |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/docs/relnotes/10.0.html b/docs/relnotes/10.0.html
index f06d068..1e4f771 100644
--- a/docs/relnotes/10.0.html
+++ b/docs/relnotes/10.0.html
@@ -55,6 +55,7 @@ Note: some of the new features are only available with 
certain drivers.
 GL_ARB_vertex_attrib_binding
 GL_ARB_vertex_type_10f_11f_11f_rev on i965 and r600g
 GL_KHR_debug
+GLX_MESA_query_renderer
 
 
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/xvmc: export only necessary symbols

2013-11-18 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 0faaed21122b95e29992e4f7abe85b4af3d058bf
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0faaed21122b95e29992e4f7abe85b4af3d058bf

Author: Emil Velikov 
Date:   Sat Nov 16 21:29:07 2013 +

targets/xvmc: export only necessary symbols

Export only XvMC* symbols for the xvmc targets.

Tested-by: Ilia Mirkin 
Reviewed-by: Christian König 
Signed-off-by: Emil Velikov 

---

 src/gallium/Automake.inc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index b6b9b36..1e4a34f 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -65,11 +65,11 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
-shared \
-no-undefined
 
-# TODO: add -export-symbols-regex
 GALLIUM_XVMC_LINKER_FLAGS = \
-module \
-version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
-shared \
+   -export-symbols-regex '^XvMC' \
-no-undefined
 
 GALLIUM_VDPAU_LIB_DEPS = \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov 
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke 
Signed-off-by: Emil Velikov 

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format && format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov 
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer 
Signed-off-by: Emil Velikov 

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include "r600_cs.h"
 #include "tgsi/tgsi_parse.h"
 #include "util/u_format_s3tc.h"
+#include 
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(&res->valid_buffer_range);
 
if (rscreen->debug_flags & DBG_VM && res->b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, "VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n",
+   fprintf(stderr, "VM start=0x%"PRIu64"  end=0x%"PRIu64" | Buffer 
%u bytes\n",
r600_resource_va(&rscreen->b, &res->b.b),
r600_resource_va(&rscreen->b, &res->b.b) + 
res->buf->size,
res->buf->size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include "util/u_format.h"
 #include "util/u_memory.h"
 #include 
+#include 
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen->debug_flags & DBG_VM) {
-   fprintf(stderr, "VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n",
+   fprintf(stderr, "VM start=0x%"PRIu64"  end=0x%"PRIu64" | 
Texture %ix%ix%i, %i levels, %i samples, %s\n",
r600_resource_va(screen, &rtex->resource.b.b),
r600_resource_va(screen, &rtex->resource.b.b) + 
rtex->resource.buf->size,
base->width0, base->height0, util_max_layer(base, 0)+1, 
base->last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex->surface.bpe, rtex->surface.nsamples,
   rtex->surface.flags, 
util_format_short_name(base->format));
for (int i = 0; i <= rtex->surface.last_level; i++) {
-   printf("  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, "
+   printf("  L %i: offset=%"PRIu64", slice_size=%"PRIu64", 
npix_x=%u, "
   "npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, "
   "nblk_z=%u, pitch_bytes=%u, mode=%u\n",
   i, rtex->surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex->surface.flags & RADEON_SURF_SBUFFER) {
for (int i = 0; i <= rtex->surface.last_level; i++) {
-   printf("  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, "
+   printf("  S %i: offset=%"PRIu64", 
slice_size=%"PRIu64", npix_x=%u, "
   "npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, "
   "nblk_z=%u, pitch_bytes=%u, mode=%u\n",
   i, rtex->surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov 
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov 
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: "10.0" 
Reported-by: Patrick Steinhardt 
Tested-by: Patrick Steinhardt 
Reviewed-by: Matt Turner 
Signed-off-by: Emil Velikov 

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: cleanup pipe-loader handling when using sw/ xlib winsys

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6c44d43baed93058f3a778f485f7833e9c6f5307
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c44d43baed93058f3a778f485f7833e9c6f5307

Author: Emil Velikov 
Date:   Tue Apr  1 17:42:41 2014 +0100

automake: cleanup pipe-loader handling when using sw/xlib winsys

Rather than defining our own set of variables, use NEED_WINSYS_XLIB
and based on it include the sw/xlib winsys.

Signed-off-by: Emil Velikov 

---

 configure.ac   |5 +
 src/gallium/targets/gbm/Makefile.am|2 +-
 src/gallium/targets/opencl/Makefile.am |2 +-
 src/gallium/targets/xa/Makefile.am |2 +-
 src/gallium/tests/trivial/Makefile.am  |2 +-
 5 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index b18f8cc..0950ed6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1935,9 +1935,7 @@ AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test 
"x$HAVE_GALLIUM_I915" = xyes -
 if test "x$enable_gallium_loader" = xyes; then
 GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
 
-if test "x$enable_gallium_xlib_loader" = xyes; then
-GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
-NEED_WINSYS_XLIB="yes"
+if test "x$NEED_WINSYS_XLIB" = xyes; then
 GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES 
-DHAVE_PIPE_LOADER_XLIB"
 fi
 
@@ -1963,7 +1961,6 @@ if test "x$enable_gallium_loader" = xyes; then
 AC_SUBST([GALLIUM_PIPE_LOADER_CLIENT_DEFINES])
 AC_SUBST([GALLIUM_PIPE_LOADER_CLIENT_LIBS])
 fi
-AM_CONDITIONAL(NEED_PIPE_LOADER_XLIB, test "x$enable_gallium_xlib_loader" = 
xyes)
 
 AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes)
 AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes)
diff --git a/src/gallium/targets/gbm/Makefile.am 
b/src/gallium/targets/gbm/Makefile.am
index 3b79290..0bd1d68 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -56,7 +56,7 @@ gbm_gallium_drm_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
 endif
 
-if NEED_PIPE_LOADER_XLIB
+if NEED_WINSYS_XLIB
 gbm_gallium_drm_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
-lX11 -lXext -lXfixes \
diff --git a/src/gallium/targets/opencl/Makefile.am 
b/src/gallium/targets/opencl/Makefile.am
index f23c26b..29909da 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -37,7 +37,7 @@ lib@OPENCL_LIBNAME@_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
 endif
 
-if NEED_PIPE_LOADER_XLIB
+if NEED_WINSYS_XLIB
 lib@OPENCL_LIBNAME@_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
-lX11 -lXext -lXfixes \
diff --git a/src/gallium/targets/xa/Makefile.am 
b/src/gallium/targets/xa/Makefile.am
index 4b351d9..2619e57 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -53,7 +53,7 @@ libxatracker_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
 endif
 
-if NEED_PIPE_LOADER_XLIB
+if NEED_WINSYS_XLIB
 libxatracker_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
-lX11 -lXext -lXfixes \
diff --git a/src/gallium/tests/trivial/Makefile.am 
b/src/gallium/tests/trivial/Makefile.am
index 9381429..3c26cd3 100644
--- a/src/gallium/tests/trivial/Makefile.am
+++ b/src/gallium/tests/trivial/Makefile.am
@@ -18,7 +18,7 @@ LDADD = $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(GALLIUM_COMMON_LIB_DEPS)
 
-if NEED_PIPE_LOADER_XLIB
+if NEED_WINSYS_XLIB
 LDADD += \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
-lX11 -lXext -lXfixes \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: conditionally build and use pipe_loader_sw_probe_dri

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5c6a1445d530d5c070d1c5288dddf59884c7fca8
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c6a1445d530d5c070d1c5288dddf59884c7fca8

Author: Emil Velikov 
Date:   Tue Apr  1 17:42:40 2014 +0100

pipe-loader: conditionally build and use pipe_loader_sw_probe_dri

The function relies on the sw/dri winsys which is build only when --enable-dri
is set. Fixes build issues with the following config

 ./configure --disable-dri --with-gallium-drivers=svga --enable-xa

Issue can be reproduced with any hw gallium driver + st that uses the 
pipe-loader.

Cc: Brian Paul 
Reported-by: Brian Paul 
Signed-off-by: Emil Velikov 

---

 configure.ac   |4 
 src/gallium/auxiliary/pipe-loader/pipe_loader.h|4 
 src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c |2 ++
 3 files changed, 10 insertions(+)

diff --git a/configure.ac b/configure.ac
index c71fa26..b18f8cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1941,6 +1941,10 @@ if test "x$enable_gallium_loader" = xyes; then
 GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES 
-DHAVE_PIPE_LOADER_XLIB"
 fi
 
+if test "x$enable_dri" = xyes; then
+GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES 
-DHAVE_PIPE_LOADER_DRI"
+fi
+
 if test "x$enable_gallium_drm_loader" = xyes; then
 GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES 
-DHAVE_PIPE_LOADER_DRM"
 PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2],
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h 
b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index a5e49fc..caef6c1 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -119,6 +119,9 @@ pipe_loader_sw_probe_xlib(struct pipe_loader_device **devs, 
Display *display);
 
 #endif
 
+
+#ifdef HAVE_PIPE_LOADER_DRI
+
 /**
  * Initialize sw dri device give the drisw_loader_funcs.
  *
@@ -130,6 +133,7 @@ bool
 pipe_loader_sw_probe_dri(struct pipe_loader_device **devs,
  struct drisw_loader_funcs *drisw_lf);
 
+#endif
 
 /**
  * Initialize a null sw device.
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c 
b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index 35ec37f..08d4353 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -75,6 +75,7 @@ pipe_loader_sw_probe_xlib(struct pipe_loader_device **devs, 
Display *display)
 }
 #endif
 
+#ifdef HAVE_PIPE_LOADER_DRI
 bool
 pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, struct 
drisw_loader_funcs *drisw_lf)
 {
@@ -95,6 +96,7 @@ pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, 
struct drisw_loader_f
 
return true;
 }
+#endif
 
 bool
 pipe_loader_sw_probe_null(struct pipe_loader_device **devs)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/tests: conditionally include sw/dri winsys

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: c0953cf06e28da10f2e2481fb8ad90dc7c36f3d7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0953cf06e28da10f2e2481fb8ad90dc7c36f3d7

Author: Emil Velikov 
Date:   Tue Apr  1 17:42:42 2014 +0100

gallium/tests: conditionally include sw/dri winsys

In all fairness we allow the gallium tests to be build with --disable-dri
which will result in the approapriate winsys to not be build, thus the
build will fail.

  ./configure --disable-dri --with-gallium-drivers=svga --enable-gallium-tests

Cc: Brian Paul 
Signed-off-by: Emil Velikov 

---

 src/gallium/tests/trivial/Makefile.am |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/tests/trivial/Makefile.am 
b/src/gallium/tests/trivial/Makefile.am
index 3c26cd3..d795ab1 100644
--- a/src/gallium/tests/trivial/Makefile.am
+++ b/src/gallium/tests/trivial/Makefile.am
@@ -13,11 +13,15 @@ AM_CPPFLAGS = \
 
 LDADD = $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \

$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \
-   $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(GALLIUM_COMMON_LIB_DEPS)
 
+if HAVE_DRI
+LDADD += \
+   $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
+endif
+
 if NEED_WINSYS_XLIB
 LDADD += \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gbm: Set errno on errors

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 49964fa28b611103bed46d0f9dcd942391c4dea8
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=49964fa28b611103bed46d0f9dcd942391c4dea8

Author: Ander Conselvan de Oliveira 
Date:   Tue Apr  8 23:28:39 2014 +0300

gbm: Set errno on errors

This should give the caller some information of what called the error.
For the gbm_bo_import() case, for instance, it is possible to know if
the import is not supported or the error was caused by an invalid
parameter.

Reviewed-by: Emil Velikov 

---

 src/gbm/backends/dri/gbm_dri.c |   36 
 src/gbm/main/gbm.c |   20 +---
 2 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index f681836..9d08a97 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -353,8 +354,10 @@ gbm_dri_bo_write(struct gbm_bo *_bo, const void *buf, 
size_t count)
 {
struct gbm_dri_bo *bo = gbm_dri_bo(_bo);
 
-   if (bo->image != NULL)
+   if (bo->image != NULL) {
+  errno = EINVAL;
   return -1;
+   }
 
memcpy(bo->map, buf, count);
 
@@ -432,8 +435,10 @@ gbm_dri_bo_import(struct gbm_device *gbm,
int gbm_format;
 
/* Required for query image WIDTH & HEIGHT */
-   if (dri->image->base.version < 4)
+   if (dri->image->base.version < 4) {
+  errno = ENOSYS;
   return NULL;
+   }
 
switch (type) {
 #if HAVE_WAYLAND_PLATFORM
@@ -441,12 +446,16 @@ gbm_dri_bo_import(struct gbm_device *gbm,
{
   struct wl_drm_buffer *wb;
 
-  if (!dri->wl_drm)
+  if (!dri->wl_drm) {
+ errno = EINVAL;
  return NULL;
+  }
 
   wb = wayland_drm_buffer_get(dri->wl_drm, (struct wl_resource *) buffer);
-  if (!wb)
+  if (!wb) {
+ errno = EINVAL;
  return NULL;
+  }
 
   image = dri->image->dupImage(wb->driver_buffer, NULL);
 
@@ -473,15 +482,19 @@ gbm_dri_bo_import(struct gbm_device *gbm,
case GBM_BO_IMPORT_EGL_IMAGE:
{
   int dri_format;
-  if (dri->lookup_image == NULL)
+  if (dri->lookup_image == NULL) {
+ errno = EINVAL;
  return NULL;
+  }
 
   image = dri->lookup_image(dri->screen, buffer, dri->lookup_user_data);
   image = dri->image->dupImage(image, NULL);
   dri->image->queryImage(image, __DRI_IMAGE_ATTRIB_FORMAT, &dri_format);
   gbm_format = gbm_dri_to_gbm_format(dri_format);
-  if (gbm_format == 0)
+  if (gbm_format == 0) {
+ errno = EINVAL;
  return NULL;
+  }
   break;
}
 
@@ -502,6 +515,7 @@ gbm_dri_bo_import(struct gbm_device *gbm,
}
 
default:
+  errno = ENOSYS;
   return NULL;
}
 
@@ -518,6 +532,7 @@ gbm_dri_bo_import(struct gbm_device *gbm,
   dri_use |= __DRI_IMAGE_USE_CURSOR;
if (dri->image->base.version >= 2 &&
!dri->image->validateUsage(bo->image, dri_use)) {
+  errno = EINVAL;
   free(bo);
   return NULL;
}
@@ -549,10 +564,14 @@ create_dumb(struct gbm_device *gbm,
struct drm_mode_destroy_dumb destroy_arg;
int ret;
 
-   if (!(usage & GBM_BO_USE_CURSOR_64X64))
+   if (!(usage & GBM_BO_USE_CURSOR_64X64)) {
+  errno = EINVAL;
   return NULL;
-   if (format != GBM_FORMAT_ARGB)
+   }
+   if (format != GBM_FORMAT_ARGB) {
+  errno = EINVAL;
   return NULL;
+   }
 
bo = calloc(1, sizeof *bo);
if (bo == NULL)
@@ -643,6 +662,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
   dri_format = __DRI_IMAGE_FORMAT_XRGB2101010;
   break;
default:
+  errno = EINVAL;
   goto failed;
}
 
diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index 6179e5b..907ca3c 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "gbm.h"
 #include "gbmint.h"
@@ -109,7 +110,7 @@ _gbm_mesa_get_device(int fd)
int i;
 
if (fd < 0 || fstat(fd, &buf) < 0 || !S_ISCHR(buf.st_mode)) {
-  fprintf(stderr, "_gbm_mesa_get_device: invalid fd: %d\n", fd);
+  errno = EINVAL;
   return NULL;
}
 
@@ -145,7 +146,7 @@ gbm_create_device(int fd)
struct stat buf;
 
if (fd < 0 || fstat(fd, &buf) < 0 || !S_ISCHR(buf.st_mode)) {
-  fprintf(stderr, "gbm_create_device: invalid fd: %d\n", fd);
+  errno = EINVAL;
   return NULL;
}
 
@@ -258,7 +259,7 @@ gbm_bo_get_fd(struct gbm_bo *bo)
  * \param bo The buffer object
  * \param buf The data to write
  * \param count The number of bytes to write
- * \return Returns -1 on error, 0 otherwise
+ * \return Returns 0 on success, otherwise -1 is returned an errno set
  */
 GBM_EXPORT int
 gbm_bo_write(struct gbm_bo *bo, const void *b

Mesa (master): wayland: Fix the logic in disabling the prime capability

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 63d4661ab28c036ab000f94812a91d93d538a72a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=63d4661ab28c036ab000f94812a91d93d538a72a

Author: Neil Roberts 
Date:   Tue Apr  8 23:28:40 2014 +0300

wayland: Fix the logic in disabling the prime capability

It looks like this bit of code is trying to disable the prime capability if
the driver doesn't support createImageFromFds. However the logic looks a bit
broken and what it would actually do is disable all other capabilities apart
from prime. This patch fixes it to actually disable prime.

Cc: "10.0" "10.1" 
Reviewed-by: Emil Velikov 

---

 src/egl/drivers/dri2/platform_wayland.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/platform_wayland.c 
b/src/egl/drivers/dri2/platform_wayland.c
index 691f3e1..37dcf19 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1049,7 +1049,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay 
*disp)
 
if (dri2_dpy->image->base.version < 7 ||
dri2_dpy->image->createImageFromFds == NULL)
-  dri2_dpy->capabilities &= WL_DRM_CAPABILITY_PRIME;
+  dri2_dpy->capabilities &= ~WL_DRM_CAPABILITY_PRIME;
 
types = EGL_WINDOW_BIT;
for (i = 0; dri2_dpy->driver_configs[i]; i++) {

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 17860309f17de78e729f77e86101004f61f6bcf3
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=17860309f17de78e729f77e86101004f61f6bcf3

Author: Ander Conselvan de Oliveira 
Date:   Tue Apr  8 23:28:42 2014 +0300

egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM

Otherwise it fails to compile if the drm egl platform is disabled.

Cc: "10.0" "10.1" 
Reviewed-by: Emil Velikov 

---

 src/egl/drivers/dri2/egl_dri2.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index dc541ad..a132964 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2013,10 +2013,12 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, 
_EGLDisplay *disp,
if (!dri2_dpy->wl_server_drm)
   return EGL_FALSE;
 
+#ifdef HAVE_DRM_PLATFORM
/* We have to share the wl_drm instance with gbm, so gbm can convert
 * wl_buffers to gbm bos. */
if (dri2_dpy->gbm_dri)
   dri2_dpy->gbm_dri->wl_drm = dri2_dpy->wl_server_drm;
+#endif
 
return EGL_TRUE;
 }

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gbm/dri: Fix out-of-memory error path in dri_device_create( )

2014-04-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: aa91fe1c09e066751c5419adb7810745336bd051
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa91fe1c09e066751c5419adb7810745336bd051

Author: Ander Conselvan de Oliveira 
Date:   Tue Apr  8 23:28:38 2014 +0300

gbm/dri: Fix out-of-memory error path in dri_device_create()

Cc: "10.0" "10.1" 
Reviewed-by: Emil Velikov 

---

 src/gbm/backends/dri/gbm_dri.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 50fa588..f681836 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -722,6 +722,8 @@ dri_device_create(int fd)
int ret;
 
dri = calloc(1, sizeof *dri);
+   if (!dri)
+  return NULL;
 
dri->base.base.fd = fd;
dri->base.base.bo_create = gbm_dri_bo_create;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/indirect: explicitly assign struct components for glx_*_vtable

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 2f519e463512ee6cad92a7c6bc0ae26077c4cdc9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f519e463512ee6cad92a7c6bc0ae26077c4cdc9

Author: Emil Velikov 
Date:   Tue Feb 18 15:51:14 2014 +

glx/indirect: explicitly assign struct components for glx_*_vtable

... to improve readability of code. Set indirect_screen_vtable as a static 
const.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/glx/indirect_glx.c |   26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index 28b8cd0..1bcecda 100644
--- a/src/glx/indirect_glx.c
+++ b/src/glx/indirect_glx.c
@@ -323,15 +323,15 @@ indirect_release_tex_image(Display * dpy, GLXDrawable 
drawable, int buffer)
 }
 
 static const struct glx_context_vtable indirect_context_vtable = {
-   indirect_destroy_context,
-   indirect_bind_context,
-   indirect_unbind_context,
-   indirect_wait_gl,
-   indirect_wait_x,
-   indirect_use_x_font,
-   indirect_bind_tex_image,
-   indirect_release_tex_image,
-   NULL, /* get_proc_address */
+   .destroy = indirect_destroy_context,
+   .bind= indirect_bind_context,
+   .unbind  = indirect_unbind_context,
+   .wait_gl = indirect_wait_gl,
+   .wait_x  = indirect_wait_x,
+   .use_x_font  = indirect_use_x_font,
+   .bind_tex_image  = indirect_bind_tex_image,
+   .release_tex_image   = indirect_release_tex_image,
+   .get_proc_address= NULL,
 };
 
 /**
@@ -467,9 +467,11 @@ indirect_create_context_attribs(struct glx_screen *base,
return indirect_create_context(base, config_base, shareList, renderType);
 }
 
-struct glx_screen_vtable indirect_screen_vtable = {
-   indirect_create_context,
-   indirect_create_context_attribs
+static const struct glx_screen_vtable indirect_screen_vtable = {
+   .create_context = indirect_create_context,
+   .create_context_attribs = indirect_create_context_attribs,
+   .query_renderer_integer = NULL,
+   .query_renderer_string  = NULL,
 };
 
 _X_HIDDEN struct glx_screen *

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): dri/radeon: use a const __DRIextension array

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 748b35a69f4b4653ebe1e685ec4fae123d78c68a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=748b35a69f4b4653ebe1e685ec4fae123d78c68a

Author: Emil Velikov 
Date:   Tue Feb 18 03:43:14 2014 +

dri/radeon: use a const __DRIextension array

Rather than keeping a separate and unused copy of the screen extensions
within the radeon screen, use a constant array that can be used directly
with __DRIscreen.

[Kristian Høgsberg]
The copy in the radeon screen isn't unused, that's where the array is
built and stored, the dri screen just points to that.  The pattern
here was used for cases where the extensions exported by a dri driver
could vary at runtime, for example depending on chipset.  In this
case, it's known at compile time, so it makes sense to use a static
const array instead.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/mesa/drivers/dri/radeon/radeon_screen.c |   29 +--
 src/mesa/drivers/dri/radeon/radeon_screen.h |2 --
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c 
b/src/mesa/drivers/dri/radeon/radeon_screen.c
index dd94038..fe72b77 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -481,11 +481,23 @@ static int radeon_set_screen_flags(radeonScreenPtr 
screen, int device_id)
return 0;
 }
 
+
+static const __DRIextension *radeon_screen_extensions[] = {
+&dri2ConfigQueryExtension.base,
+#if defined(RADEON_R100)
+&radeonTexBufferExtension.base,
+#elif defined(RADEON_R200)
+&r200TexBufferExtension.base,
+#endif
+&radeonFlushExtension.base,
+&radeonImageExtension.base,
+NULL
+};
+
 static radeonScreenPtr
 radeonCreateScreen2(__DRIscreen *sPriv)
 {
radeonScreenPtr screen;
-   int i;
int ret;
uint32_t device_id = 0;
 
@@ -522,20 +534,7 @@ radeonCreateScreen2(__DRIscreen *sPriv)
if (getenv("RADEON_NO_TCL"))
   screen->chip_flags &= ~RADEON_CHIPSET_TCL;
 
-   i = 0;
-   screen->extensions[i++] = &dri2ConfigQueryExtension.base;
-
-#if defined(RADEON_R100)
-   screen->extensions[i++] = &radeonTexBufferExtension.base;
-#elif defined(RADEON_R200)
-   screen->extensions[i++] = &r200TexBufferExtension.base;
-#endif
-
-   screen->extensions[i++] = &radeonFlushExtension.base;
-   screen->extensions[i++] = &radeonImageExtension.base;
-
-   screen->extensions[i++] = NULL;
-   sPriv->extensions = screen->extensions;
+   sPriv->extensions = radeon_screen_extensions;
 
screen->driScreen = sPriv;
screen->bom = radeon_bo_manager_gem_ctor(sPriv->fd);
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h 
b/src/mesa/drivers/dri/radeon/radeon_screen.h
index 03abb2a..76fa1ec 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h
@@ -97,8 +97,6 @@ typedef struct radeon_screen {
/* Configuration cache with default values for all contexts */
driOptionCache optionCache;
 
-   const __DRIextension *extensions[17];
-
int num_gb_pipes;
int num_z_pipes;
drm_radeon_sarea_t *sarea;  /* Private SAREA data */

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): Check for dladdr(), rather than assuming we have it if we have RTLD_DEFAULT

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: ec8ebff342839138bc8141b8a739d9bce6d7ac39
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec8ebff342839138bc8141b8a739d9bce6d7ac39

Author: Jon TURNEY 
Date:   Sat Apr  5 17:11:45 2014 +0100

Check for dladdr(), rather than assuming we have it if we have RTLD_DEFAULT

Unfortunately, Cygwin defines RTLD_DEFAULT (for glibc compatibility), but can't
provide dladdr(), so add a check for dladdr()

Since I don't think scons is ever used to build for Cygwin, just set HAVE_DLADDR
in SConscript, assuming that if we have RTLD_DEFAULT, we have dladdr().

Cc: Jonathan Gray 
Signed-off-by: Jon TURNEY 
Reviewed-by: Eric Anholt 

---

 configure.ac  |6 ++
 src/mesa/drivers/dri/common/SConscript|1 +
 src/mesa/drivers/dri/common/megadriver_stub.c |7 +++
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0950ed6..bf543c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -480,6 +480,12 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
[DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
 AC_SUBST([DLOPEN_LIBS])
 
+dnl Check if that library also has dladdr
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $DLOPEN_LIBS"
+AC_CHECK_FUNCS([dladdr])
+LDFLAGS="$save_LDFLAGS"
+
 case "$host_os" in
 darwin*|mingw*)
 ;;
diff --git a/src/mesa/drivers/dri/common/SConscript 
b/src/mesa/drivers/dri/common/SConscript
index 8b15532..41f6356 100644
--- a/src/mesa/drivers/dri/common/SConscript
+++ b/src/mesa/drivers/dri/common/SConscript
@@ -30,6 +30,7 @@ drienv.Replace(CPPPATH = [
 driswenv = drienv.Clone()
 driswenv.Append(CPPDEFINES = [
 '__NOT_HAVE_DRM_H',
+'HAVE_DLADDR',
 ])
 
 drienv.PkgUseModules('DRM')
diff --git a/src/mesa/drivers/dri/common/megadriver_stub.c 
b/src/mesa/drivers/dri/common/megadriver_stub.c
index 7b6d134..d085080 100644
--- a/src/mesa/drivers/dri/common/megadriver_stub.c
+++ b/src/mesa/drivers/dri/common/megadriver_stub.c
@@ -28,10 +28,9 @@
 
 /* We need GNU extensions to dlfcn.h in order to provide backward
  * compatibility for the older DRI driver loader mechanism. (dladdr,
- * Dl_info, and RTLD_DEFAULT are only defined when _GNU_SOURCE is
- * defined.)
+ * Dl_info, and RTLD_DEFAULT)
  */
-#ifdef RTLD_DEFAULT
+#if defined(RTLD_DEFAULT) && defined(HAVE_DLADDR)
 
 #define MEGADRIVER_STUB_MAX_EXTENSIONS 10
 #define LIB_PATH_SUFFIX "_dri.so"
@@ -148,7 +147,7 @@ megadriver_stub_init(void)
}
 }
 
-#endif /* RTLD_DEFAULT */
+#endif /* RTLD_DEFAULT && HAVE_DLADDR */
 
 static const
 __DRIconfig **stub_error_init_screen(__DRIscreen *psp)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): dri_util: cleanup dri extension handling

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: c812557a0e1d6242362460ba6a3aa2012ea9f4b1
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c812557a0e1d6242362460ba6a3aa2012ea9f4b1

Author: Emil Velikov 
Date:   Wed Feb 12 20:47:21 2014 +

dri_util: cleanup dri extension handling

Explicitly set the version that is implemented, as that may differ from
the one defined in dri_interface.h. The remaining __DRI*Extensions are
treated as constants, so got ahead and declare them as such.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 

---

 src/mesa/drivers/dri/common/dri_util.c |2 +-
 src/mesa/drivers/dri/common/dri_util.h |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index c410474..248c361 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -775,7 +775,7 @@ const __DRIswrastExtension driSWRastExtension = {
 };
 
 const __DRI2configQueryExtension dri2ConfigQueryExtension = {
-   .base = { __DRI2_CONFIG_QUERY, __DRI2_CONFIG_QUERY_VERSION },
+   .base = { __DRI2_CONFIG_QUERY, 1 },
 
.configQueryb= dri2ConfigQueryb,
.configQueryi= dri2ConfigQueryi,
diff --git a/src/mesa/drivers/dri/common/dri_util.h 
b/src/mesa/drivers/dri/common/dri_util.h
index a37a0bb..1138bf1 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -174,13 +174,13 @@ struct __DRIscreenRec {
 struct {
/* Flag to indicate that this is a DRI2 screen.  Many of the above
 * fields will not be valid or initializaed in that case. */
-   __DRIdri2LoaderExtension *loader;
-   __DRIimageLookupExtension *image;
-   __DRIuseInvalidateExtension *useInvalidate;
+   const __DRIdri2LoaderExtension *loader;
+   const __DRIimageLookupExtension *image;
+   const __DRIuseInvalidateExtension *useInvalidate;
 } dri2;
 
 struct {
-__DRIimageLoaderExtension *loader;
+const __DRIimageLoaderExtension *loader;
 } image;
 
 driOptionCache optionInfo;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl_dri: rework dri extension handling

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5f280d0c4416627810de73a6c68c422453d2b7d9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f280d0c4416627810de73a6c68c422453d2b7d9

Author: Emil Velikov 
Date:   Wed Feb 12 20:13:15 2014 +

egl_dri: rework dri extension handling

Use designated initialisers, and store the extensions pointers as const.

The loader extensions __DRIdri2LoaderExtension and __DRIswrastLoaderExtension
are setup by the platform backends so they should not be constified.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/egl/drivers/dri2/egl_dri2.c |7 ---
 src/egl/drivers/dri2/egl_dri2.h |   16 
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 81a3542..380bd7b 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -52,7 +52,7 @@
 #include "egl_dri2.h"
 
 const __DRIuseInvalidateExtension use_invalidate = {
-   { __DRI_USE_INVALIDATE, 1 }
+   .base = { __DRI_USE_INVALIDATE, 1 }
 };
 
 EGLint dri2_to_egl_attribute_map[] = {
@@ -299,8 +299,9 @@ dri2_lookup_egl_image(__DRIscreen *screen, void *image, 
void *data)
 }
 
 const __DRIimageLookupExtension image_lookup_extension = {
-   { __DRI_IMAGE_LOOKUP, 1 },
-   dri2_lookup_egl_image
+   .base = { __DRI_IMAGE_LOOKUP, 1 },
+
+   .lookupEGLImage   = dri2_lookup_egl_image
 };
 
 static const char dri_driver_path[] = DEFAULT_DRIVER_DIR;
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index e62e265..44d6d74 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -150,14 +150,14 @@ struct dri2_egl_display
int   own_dri_screen;
const __DRIconfig   **driver_configs;
void *driver;
-   __DRIcoreExtension   *core;
-   __DRIdri2Extension   *dri2;
-   __DRIswrastExtension *swrast;
-   __DRI2flushExtension *flush;
-   __DRItexBufferExtension  *tex_buffer;
-   __DRIimageExtension  *image;
-   __DRIrobustnessExtension *robustness;
-   __DRI2configQueryExtension *config;
+   const __DRIcoreExtension   *core;
+   const __DRIdri2Extension   *dri2;
+   const __DRIswrastExtension *swrast;
+   const __DRI2flushExtension *flush;
+   const __DRItexBufferExtension  *tex_buffer;
+   const __DRIimageExtension  *image;
+   const __DRIrobustnessExtension *robustness;
+   const __DRI2configQueryExtension *config;
int   fd;
 
int   own_device;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/dri2: rework __DRIextension handling

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 4be3874c97379b72f1129e7866ec6868610778a5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4be3874c97379b72f1129e7866ec6868610778a5

Author: Emil Velikov 
Date:   Wed Feb 12 20:14:15 2014 +

glx/dri2: rework __DRIextension handling

Make sure that the DRI*Extensions report the version of the interface
implemented over the listed in the headers. While both are currently
the same, this may change in the future.

v2: Keep loader extensions handling as is.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick  (v1)
Reviewed-by: Kristian Høgsberg 

---

 src/glx/dri2_glx.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 4965908..b6acfbc 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -969,7 +969,7 @@ static const __DRIdri2LoaderExtension 
dri2LoaderExtension_old = {
 };
 
 static const __DRIuseInvalidateExtension dri2UseInvalidate = {
-   { __DRI_USE_INVALIDATE, __DRI_USE_INVALIDATE_VERSION }
+   .base = { __DRI_USE_INVALIDATE, 1 }
 };
 
 _X_HIDDEN void

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/drisw: explicitly assign struct components for glx_*_vtable

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: b125c92aa9837c80d1b7e26554d0b66b4db3f2e1
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b125c92aa9837c80d1b7e26554d0b66b4db3f2e1

Author: Emil Velikov 
Date:   Tue Feb 18 19:52:26 2014 +

glx/drisw: explicitly assign struct components for glx_*_vtable

... to improve readability of code.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/glx/drisw_glx.c |   24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index a77be4e..751626b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -365,15 +365,15 @@ drisw_release_tex_image(Display * dpy, GLXDrawable 
drawable, int buffer)
 }
 
 static const struct glx_context_vtable drisw_context_vtable = {
-   drisw_destroy_context,
-   drisw_bind_context,
-   drisw_unbind_context,
-   NULL,
-   NULL,
-   DRI_glXUseXFont,
-   drisw_bind_tex_image,
-   drisw_release_tex_image,
-   NULL, /* get_proc_address */
+   .destroy = drisw_destroy_context,
+   .bind= drisw_bind_context,
+   .unbind  = drisw_unbind_context,
+   .wait_gl = NULL,
+   .wait_x  = NULL,
+   .use_x_font  = DRI_glXUseXFont,
+   .bind_tex_image  = drisw_bind_tex_image,
+   .release_tex_image   = drisw_release_tex_image,
+   .get_proc_address= NULL,
 };
 
 static struct glx_context *
@@ -635,8 +635,10 @@ driOpenSwrast(void)
 }
 
 static const struct glx_screen_vtable drisw_screen_vtable = {
-   drisw_create_context,
-   drisw_create_context_attribs
+   .create_context = drisw_create_context,
+   .create_context_attribs = drisw_create_context_attribs,
+   .query_renderer_integer = NULL,
+   .query_renderer_string  = NULL,
 };
 
 static void

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gbm: cleanup __DRI*extension handling

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5457caa58c048e2df71c7ebc036d5ca010d576b6
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5457caa58c048e2df71c7ebc036d5ca010d576b6

Author: Emil Velikov 
Date:   Sun Mar 16 00:26:53 2014 +

gbm: cleanup __DRI*extension handling

Use designated initialisers, store all extension pointers as const and use
a const __DRIextensions array over assigning each element individually.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 

---

 src/gbm/backends/dri/gbm_dri.c|   20 
 src/gbm/backends/dri/gbm_driint.h |   12 ++--
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 9d08a97..cec12d1 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -125,12 +125,13 @@ image_get_buffers(__DRIdrawable *driDrawable,
 }
 
 static const __DRIuseInvalidateExtension use_invalidate = {
-   { __DRI_USE_INVALIDATE, 1 }
+   .base = { __DRI_USE_INVALIDATE, 1 }
 };
 
 static const __DRIimageLookupExtension image_lookup_extension = {
-   { __DRI_IMAGE_LOOKUP, 1 },
-   dri_lookup_egl_image
+   .base = { __DRI_IMAGE_LOOKUP, 1 },
+
+   .lookupEGLImage  = dri_lookup_egl_image
 };
 
 static const __DRIdri2LoaderExtension dri2_loader_extension = {
@@ -148,6 +149,13 @@ static const __DRIimageLoaderExtension 
image_loader_extension = {
.flushFrontBuffer= dri_flush_front_buffer,
 };
 
+static const __DRIextension *gbm_dri_screen_extensions[] = {
+   &image_lookup_extension.base,
+   &use_invalidate.base,
+   &dri2_loader_extension.base,
+   &image_loader_extension.base,
+   NULL,
+};
 
 struct dri_extension_match {
const char *name;
@@ -285,11 +293,7 @@ dri_screen_create(struct gbm_dri_device *dri)
   return ret;
};
 
-   dri->extensions[0] = &image_lookup_extension.base;
-   dri->extensions[1] = &use_invalidate.base;
-   dri->extensions[2] = &dri2_loader_extension.base;
-   dri->extensions[3] = &image_loader_extension.base;
-   dri->extensions[4] = NULL;
+   dri->extensions = gbm_dri_screen_extensions;
 
if (dri->dri2 == NULL)
   return -1;
diff --git a/src/gbm/backends/dri/gbm_driint.h 
b/src/gbm/backends/dri/gbm_driint.h
index fdf694d..9c4392d 100644
--- a/src/gbm/backends/dri/gbm_driint.h
+++ b/src/gbm/backends/dri/gbm_driint.h
@@ -44,14 +44,14 @@ struct gbm_dri_device {
 
__DRIscreen *screen;
 
-   __DRIcoreExtension   *core;
-   __DRIdri2Extension   *dri2;
-   __DRIimageExtension  *image;
-   __DRI2flushExtension *flush;
-   __DRIdri2LoaderExtension *loader;
+   const __DRIcoreExtension   *core;
+   const __DRIdri2Extension   *dri2;
+   const __DRIimageExtension  *image;
+   const __DRI2flushExtension *flush;
+   const __DRIdri2LoaderExtension *loader;
 
const __DRIconfig   **driver_configs;
-   const __DRIextension *extensions[5];
+   const __DRIextension **extensions;
const __DRIextension **driver_extensions;
 
__DRIimage *(*lookup_image)(__DRIscreen *screen, void *image, void *data);

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/tests: explicitly set __DRI2rendererQueryExtension members

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 51e3569573a7b3f8da0df093836761003fcdc414
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=51e3569573a7b3f8da0df093836761003fcdc414

Author: Emil Velikov 
Date:   Wed Feb 12 21:00:02 2014 +

glx/tests: explicitly set __DRI2rendererQueryExtension members

While we're here use the typcast'ed name and constify.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 

---

 src/glx/tests/query_renderer_implementation_unittest.cpp |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/glx/tests/query_renderer_implementation_unittest.cpp 
b/src/glx/tests/query_renderer_implementation_unittest.cpp
index 35b3972..6ec4c4f 100644
--- a/src/glx/tests/query_renderer_implementation_unittest.cpp
+++ b/src/glx/tests/query_renderer_implementation_unittest.cpp
@@ -140,11 +140,11 @@ fake_queryString(__DRIscreen *screen, int attribute, 
const char **val)
return -1;
 }
 
-struct __DRI2rendererQueryExtensionRec rendererQueryExt = {
-   { __DRI2_RENDERER_QUERY, 1 },
+static const __DRI2rendererQueryExtension rendererQueryExt = {
+   .base = { __DRI2_RENDERER_QUERY, 1 },
 
-   fake_queryInteger,
-   fake_queryString
+   .queryInteger = fake_queryInteger,
+   .queryString = fake_queryString
 };
 
 void dri2_query_renderer_string_test::SetUp()

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): drivers/dri: cleanup dri extension instantiation

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 38f20f79da4212c86d0869951f533d66a5ef907e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=38f20f79da4212c86d0869951f533d66a5ef907e

Author: Emil Velikov 
Date:   Wed Feb 12 17:47:53 2014 +

drivers/dri: cleanup dri extension instantiation

Uniformly use the typecasted extension name, constify extension instances
and use designated initialisers. Set the implemented version of the
extension, over the one defined in dri_infertace.h. Patch covers the
following extensions:

__DRItexBufferExtension
__DRIimageExtension
__DRIrobustnessExtension
__DRI2rendererQueryExtension
__DRIdri2LoaderExtension

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/mesa/drivers/dri/i915/intel_screen.c  |6 ++---
 src/mesa/drivers/dri/i965/intel_screen.c  |   10 
 src/mesa/drivers/dri/nouveau/nouveau_driver.c |2 +-
 src/mesa/drivers/dri/nouveau/nouveau_screen.c |8 ---
 src/mesa/drivers/dri/radeon/radeon_screen.c   |   31 ++---
 src/mesa/drivers/dri/swrast/swrast.c  |8 ---
 6 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_screen.c 
b/src/mesa/drivers/dri/i915/intel_screen.c
index 384cb46..9b4e490 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -142,7 +142,7 @@ aub_dump_bmp(struct gl_context *ctx)
 }
 
 static const __DRItexBufferExtension intelTexBufferExtension = {
-   .base = { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
+   .base = { __DRI_TEX_BUFFER, 3 },
 
.setTexBuffer= intelSetTexBuffer,
.setTexBuffer2   = intelSetTexBuffer2,
@@ -685,7 +685,7 @@ intel_from_planar(__DRIimage *parent, int plane, void 
*loaderPrivate)
 return image;
 }
 
-static struct __DRIimageExtensionRec intelImageExtension = {
+static const __DRIimageExtension intelImageExtension = {
 .base = { __DRI_IMAGE, 7 },
 
 .createImageFromName= intel_create_image_from_name,
@@ -778,7 +778,7 @@ i915_query_renderer_string(__DRIscreen *psp, int param, 
const char **value)
return -1;
 }
 
-static struct __DRI2rendererQueryExtensionRec intelRendererQueryExtension = {
+static const __DRI2rendererQueryExtension intelRendererQueryExtension = {
.base = { __DRI2_RENDERER_QUERY, 1 },
 
.queryInteger = i915_query_renderer_integer,
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 8cb1260..3b2e4e9 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -154,7 +154,7 @@ aub_dump_bmp(struct gl_context *ctx)
 }
 
 static const __DRItexBufferExtension intelTexBufferExtension = {
-   .base = { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
+   .base = { __DRI_TEX_BUFFER, 3 },
 
.setTexBuffer= intelSetTexBuffer,
.setTexBuffer2   = intelSetTexBuffer2,
@@ -796,7 +796,7 @@ intel_from_planar(__DRIimage *parent, int plane, void 
*loaderPrivate)
 return image;
 }
 
-static struct __DRIimageExtensionRec intelImageExtension = {
+static const __DRIimageExtension intelImageExtension = {
 .base = { __DRI_IMAGE, 8 },
 
 .createImageFromName= intel_create_image_from_name,
@@ -891,15 +891,15 @@ brw_query_renderer_string(__DRIscreen *psp, int param, 
const char **value)
return -1;
 }
 
-static struct __DRI2rendererQueryExtensionRec intelRendererQueryExtension = {
+static const __DRI2rendererQueryExtension intelRendererQueryExtension = {
.base = { __DRI2_RENDERER_QUERY, 1 },
 
.queryInteger = brw_query_renderer_integer,
.queryString = brw_query_renderer_string
 };
 
-static const struct __DRIrobustnessExtensionRec dri2Robustness = {
-   { __DRI2_ROBUSTNESS, 1 }
+static const __DRIrobustnessExtension dri2Robustness = {
+   .base = { __DRI2_ROBUSTNESS, 1 }
 };
 
 static const __DRIextension *intelScreenExtensions[] = {
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c 
b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index 809b5ff..1a8afa2 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -65,7 +65,7 @@ nouveau_flush(struct gl_context *ctx)
if (_mesa_is_winsys_fbo(ctx->DrawBuffer) &&
ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
__DRIscreen *screen = nctx->screen->dri_screen;
-   __DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
+   const __DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
__DRIdrawable *drawable = nctx->dri_context->driDrawablePriv;
 
if (drawable && drawable->loaderPrivate)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c 
b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 9929056..aec2f72 100644
--- a/src/mesa/drivers/dri/nouveau/nouve

Mesa (master): dri_interface: Update __DRItexBufferExtensionRec to version 3

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 9b42fd1772b13b10f397d80d11aa8351e6313085
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b42fd1772b13b10f397d80d11aa8351e6313085

Author: Emil Velikov 
Date:   Tue Feb 18 03:04:03 2014 +

dri_interface: Update __DRItexBufferExtensionRec to version 3

With commit e59fa4c46c8("dri2: release texture image.") we updated the
extension without bumping the version number. The patch itself added an
interface required to enable texture_from_pixmap on certain platforms.

The new code was effectively never build, as it depended on
__DRI_TEX_BUFFER_VERSION >= 3, which never came to be in upstream mesa.

This commit bumps the version number, drops the __DRI_TEX_BUFFER_VERSION
checks and resolves all the build conflicts. Additionally it add a version
check as egl and dri3, as require version 2 of the extension which does
not have the releaseTexBuffer hook.

Cc: Juan Zhao 
Cc: Kristian Høgsberg 
Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 include/GL/internal/dri_interface.h |2 +-
 src/egl/drivers/dri2/egl_dri2.c |   13 +++--
 src/egl/main/eglsurface.c   |   11 +++
 src/egl/main/eglsurface.h   |3 +++
 src/glx/dri2_glx.c  |6 +-
 src/glx/dri3_glx.c  |3 ++-
 src/glx/drisw_glx.c |   12 +---
 7 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/include/GL/internal/dri_interface.h 
b/include/GL/internal/dri_interface.h
index d028d05..4d57d0b 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -231,7 +231,7 @@ struct __DRItexOffsetExtensionRec {
 #define __DRI_TEXTURE_FORMAT_RGBA0x20DA
 
 #define __DRI_TEX_BUFFER "DRI_TexBuffer"
-#define __DRI_TEX_BUFFER_VERSION 2
+#define __DRI_TEX_BUFFER_VERSION 3
 struct __DRItexBufferExtensionRec {
 __DRIextension base;
 
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index a132964..81a3542 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1189,7 +1189,6 @@ static EGLBoolean
 dri2_release_tex_image(_EGLDriver *drv,
   _EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
 {
-#if __DRI_TEX_BUFFER_VERSION >= 3
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
struct dri2_egl_context *dri2_ctx;
@@ -1209,11 +1208,13 @@ dri2_release_tex_image(_EGLDriver *drv,
default:
   assert(0);
}
-   if (dri2_dpy->tex_buffer->releaseTexBuffer!=NULL)
-(*dri2_dpy->tex_buffer->releaseTexBuffer)(dri2_ctx->dri_context,
- target,
- dri2_surf->dri_drawable);
-#endif
+
+   if (dri2_dpy->tex_buffer->base.version >= 3 &&
+   dri2_dpy->tex_buffer->releaseTexBuffer != NULL) {
+  (*dri2_dpy->tex_buffer->releaseTexBuffer)(dri2_ctx->dri_context,
+target,
+dri2_surf->dri_drawable);
+   }
 
return EGL_TRUE;
 }
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
index c5ea224..e2cb73b 100644
--- a/src/egl/main/eglsurface.c
+++ b/src/egl/main/eglsurface.c
@@ -531,6 +531,17 @@ _eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, 
_EGLSurface *surface,
return EGL_TRUE;
 }
 
+EGLBoolean
+_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+EGLint buffer)
+{
+   /* TODO: do basic error checking and return success/fail.
+* Drivers must implement the real stuff.
+*/
+
+  return EGL_TRUE;
+}
+
 
 EGLBoolean
 _eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h
index a954123..d13d301 100644
--- a/src/egl/main/eglsurface.h
+++ b/src/egl/main/eglsurface.h
@@ -94,6 +94,9 @@ _eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, 
_EGLSurface *surf, EGLint a
 PUBLIC extern EGLBoolean
 _eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint 
buffer);
 
+PUBLIC extern EGLBoolean
+_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, 
EGLint buffer);
+
 
 extern EGLBoolean
 _eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint 
interval);
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 79f6ecc..4965908 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1032,17 +1032,14 @@ dri2_bind_tex_image(Display * dpy,
 static void
 dri2_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer)
 {
-#if __DRI_TEX_BUFFER_VERSION >= 3
struct glx_context *gc = __glXGetCurrentContext();
struct dri2_context *pcp = (struct dri2_context *) gc;
__GLXDRIdrawable *base = GetGL

Mesa (master): glx/apple: explicitly assign struct components for glx_*_vtable

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 31a3b58cb7302ae1cc473626da4fba727da37d33
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=31a3b58cb7302ae1cc473626da4fba727da37d33

Author: Emil Velikov 
Date:   Tue Feb 18 15:46:10 2014 +

glx/apple: explicitly assign struct components for glx_*_vtable

... to improve readability of code. Set applegl_screen_vtable as a static const.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/glx/applegl_glx.c |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index a67416e..4e2d5d0 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -109,15 +109,15 @@ applegl_get_proc_address(const char *symbol)
 }
 
 static const struct glx_context_vtable applegl_context_vtable = {
-   applegl_destroy_context,
-   applegl_bind_context,
-   applegl_unbind_context,
-   applegl_wait_gl,
-   applegl_wait_x,
-   DRI_glXUseXFont,
-   NULL, /* bind_tex_image, */
-   NULL, /* release_tex_image, */
-   applegl_get_proc_address,
+   .destroy = applegl_destroy_context,
+   .bind= applegl_bind_context,
+   .unbind  = applegl_unbind_context,
+   .wait_gl = applegl_wait_gl,
+   .wait_x  = applegl_wait_x,
+   .use_x_font  = DRI_glXUseXFont,
+   .bind_tex_image  = NULL,
+   .release_tex_image   = NULL,
+   .get_proc_address= applegl_get_proc_address,
 };
 
 struct glx_context *
@@ -164,8 +164,11 @@ applegl_create_context(struct glx_screen *psc,
return gc;
 }
 
-struct glx_screen_vtable applegl_screen_vtable = {
-   applegl_create_context
+static const struct glx_screen_vtable applegl_screen_vtable = {
+   .create_context = applegl_create_context,
+   .create_context_attribs = NULL,
+   .query_renderer_integer = NULL,
+   .query_renderer_string  = NULL,
 };
 
 _X_HIDDEN struct glx_screen *

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/dri3: explicitly assign struct components for glx_*_vtable

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: a2454bdfbd8f20b13e7f821d88e8e5da24e3e2a7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2454bdfbd8f20b13e7f821d88e8e5da24e3e2a7

Author: Emil Velikov 
Date:   Tue Feb 18 19:26:27 2014 +

glx/dri3: explicitly assign struct components for glx_*_vtable

... to improve readability of code.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/glx/dri3_glx.c |   24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 2a178d5..4cde9ef 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -1542,15 +1542,15 @@ dri3_release_tex_image(Display * dpy, GLXDrawable 
drawable, int buffer)
 }
 
 static const struct glx_context_vtable dri3_context_vtable = {
-   dri3_destroy_context,
-   dri3_bind_context,
-   dri3_unbind_context,
-   dri3_wait_gl,
-   dri3_wait_x,
-   DRI_glXUseXFont,
-   dri3_bind_tex_image,
-   dri3_release_tex_image,
-   NULL, /* get_proc_address */
+   .destroy = dri3_destroy_context,
+   .bind= dri3_bind_context,
+   .unbind  = dri3_unbind_context,
+   .wait_gl = dri3_wait_gl,
+   .wait_x  = dri3_wait_x,
+   .use_x_font  = DRI_glXUseXFont,
+   .bind_tex_image  = dri3_bind_tex_image,
+   .release_tex_image   = dri3_release_tex_image,
+   .get_proc_address= NULL,
 };
 
 /** dri3_bind_extensions
@@ -1603,8 +1603,10 @@ dri3_bind_extensions(struct dri3_screen *psc, struct 
glx_display * priv,
 }
 
 static const struct glx_screen_vtable dri3_screen_vtable = {
-   dri3_create_context,
-   dri3_create_context_attribs
+   .create_context = dri3_create_context,
+   .create_context_attribs = dri3_create_context_attribs,
+   .query_renderer_integer = NULL,
+   .query_renderer_string  = NULL,
 };
 
 /** dri3_create_screen

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/dri3: rework __DRIextension handling

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: ecfe986120adb2c574cb03bea318eae96e564924
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ecfe986120adb2c574cb03bea318eae96e564924

Author: Emil Velikov 
Date:   Sun Mar 16 01:17:46 2014 +

glx/dri3: rework __DRIextension handling

Use a const array with the extensions, rather than assigning each
one to a fixed size array at runtime.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 

---

 src/glx/dri3_glx.c  |   17 -
 src/glx/dri3_priv.h |2 +-
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 653b1e5..2a178d5 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -1307,6 +1307,12 @@ static const __DRIimageLoaderExtension 
imageLoaderExtension = {
.flushFrontBuffer= dri3_flush_front_buffer,
 };
 
+static const __DRIextension *loader_extensions[] = {
+   &imageLoaderExtension.base,
+   &systemTimeExtension.base,
+   NULL
+};
+
 /** dri3_swap_buffers
  *
  * Make the current back buffer visible using the present extension
@@ -1689,8 +1695,7 @@ dri3_create_screen(int screen, struct glx_display * priv)
 
psc->driScreen =
   psc->image_driver->createNewScreen2(screen, psc->fd,
-  (const __DRIextension **)
-  &pdp->loader_extensions[0],
+  pdp->loader_extensions,
   extensions,
   &driver_configs, psc);
 
@@ -1807,7 +1812,6 @@ _X_HIDDEN __GLXDRIdisplay *
 dri3_create_display(Display * dpy)
 {
struct dri3_display  *pdp;
-   int  i;
xcb_connection_t *c = XGetXCBConnection(dpy);
xcb_dri3_query_version_cookie_t  dri3_cookie;
xcb_dri3_query_version_reply_t   *dri3_reply;
@@ -1863,13 +1867,8 @@ dri3_create_display(Display * dpy)
pdp->base.createScreen = dri3_create_screen;
 
loader_set_logger(dri_message);
-   i = 0;
-
-   pdp->loader_extensions[i++] = &imageLoaderExtension.base;
-
-   pdp->loader_extensions[i++] = &systemTimeExtension.base;
 
-   pdp->loader_extensions[i++] = NULL;
+   pdp->loader_extensions = loader_extensions;
 
return &pdp->base;
 no_extension:
diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h
index 316e313..3846331 100644
--- a/src/glx/dri3_priv.h
+++ b/src/glx/dri3_priv.h
@@ -106,7 +106,7 @@ struct dri3_display
 {
__GLXDRIdisplay base;
 
-   const __DRIextension *loader_extensions[8];
+   const __DRIextension **loader_extensions;
 
/* DRI3 bits */
int dri3Major;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/dri: cleanup dri extension handling

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 98e2a8e2f98dd78de682d92f100598191617ac89
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=98e2a8e2f98dd78de682d92f100598191617ac89

Author: Emil Velikov 
Date:   Wed Feb 12 19:19:17 2014 +

st/dri: cleanup dri extension handling

Explicitly set the version that is implemented, as that may differ
from the one defined in dri_interface.h. Use designated initialisers
and constify whereever possible.

Note: __DRIimageExtension should not be made const as it's modified
at runtime. This patch should have no side effects on compilers that
do not support designated initialisers, as the existing code in
dri/common already uses them.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 .../state_trackers/dri/common/dri_drawable.c   |   14 ---
 src/gallium/state_trackers/dri/drm/dri2.c  |   41 +++-
 2 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c 
b/src/gallium/state_trackers/dri/common/dri_drawable.c
index a399938..b7df053 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.c
@@ -258,10 +258,11 @@ dri_set_tex_buffer(__DRIcontext *pDRICtx, GLint target,
 }
 
 const __DRItexBufferExtension driTexBufferExtension = {
-{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
-   dri_set_tex_buffer,
-   dri_set_tex_buffer2,
-   NULL,
+   .base = { __DRI_TEX_BUFFER, 2 },
+
+   .setTexBuffer   = dri_set_tex_buffer,
+   .setTexBuffer2  = dri_set_tex_buffer2,
+   .releaseTexBuffer   = NULL,
 };
 
 /**
@@ -561,8 +562,9 @@ dri_throttle(__DRIcontext *cPriv, __DRIdrawable *dPriv,
 
 
 const __DRI2throttleExtension dri2ThrottleExtension = {
-.base = { __DRI2_THROTTLE, __DRI2_THROTTLE_VERSION },
-.throttle = dri_throttle,
+.base = { __DRI2_THROTTLE, 1 },
+
+.throttle  = dri_throttle,
 };
 
 
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c 
b/src/gallium/state_trackers/dri/drm/dri2.c
index 4f2a87e..7dccc5e 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -95,10 +95,11 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv)
 }
 
 static const __DRI2flushExtension dri2FlushExtension = {
-{ __DRI2_FLUSH, __DRI2_FLUSH_VERSION },
-dri2_flush_drawable,
-dri2_invalidate_drawable,
-dri_flush,
+.base = { __DRI2_FLUSH, 4 },
+
+.flush= dri2_flush_drawable,
+.invalidate   = dri2_invalidate_drawable,
+.flush_with_flags = dri_flush,
 };
 
 /**
@@ -110,7 +111,7 @@ dri2_drawable_get_buffers(struct dri_drawable *drawable,
   unsigned *count)
 {
__DRIdrawable *dri_drawable = drawable->dPriv;
-   struct __DRIdri2LoaderExtensionRec *loader = drawable->sPriv->dri2.loader;
+   const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader;
boolean with_format;
__DRIbuffer *buffers;
int num_buffers;
@@ -522,7 +523,7 @@ dri2_flush_frontbuffer(struct dri_context *ctx,
enum st_attachment_type statt)
 {
__DRIdrawable *dri_drawable = drawable->dPriv;
-   struct __DRIdri2LoaderExtensionRec *loader = drawable->sPriv->dri2.loader;
+   const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader;
struct pipe_context *pipe = ctx->st->pipe;
 
if (statt != ST_ATTACHMENT_FRONT_LEFT)
@@ -557,7 +558,7 @@ dri2_update_tex_buffer(struct dri_drawable *drawable,
 static __DRIimage *
 dri2_lookup_egl_image(struct dri_screen *screen, void *handle)
 {
-   __DRIimageLookupExtension *loader = screen->sPriv->dri2.image;
+   const __DRIimageLookupExtension *loader = screen->sPriv->dri2.image;
__DRIimage *img;
 
if (!loader->lookupEGLImage)
@@ -1035,18 +1036,20 @@ dri2_destroy_image(__DRIimage *img)
FREE(img);
 }
 
-static struct __DRIimageExtensionRec dri2ImageExtension = {
-{ __DRI_IMAGE, 6 },
-dri2_create_image_from_name,
-dri2_create_image_from_renderbuffer,
-dri2_destroy_image,
-dri2_create_image,
-dri2_query_image,
-dri2_dup_image,
-dri2_validate_usage,
-dri2_from_names,
-dri2_from_planar,
-dri2_create_from_texture,
+/* The extension is modified during runtime if DRI_PRIME is detected */
+static __DRIimageExtension dri2ImageExtension = {
+.base = { __DRI_IMAGE, 6 },
+
+.createImageFromName  = dri2_create_image_from_name,
+.createImageFromRenderbuffer  = dri2_create_image_from_renderbuffer,
+.destroyImage = dri2_destroy_image,
+.createImage  = dri2_create_image,
+.queryImage   = dri2_query_image,
+.dupImage = dri2_dup_image,
+.validateUsage= dri2_validate_usage,
+.createImageFromNames = dri2_from_names,
+.fromPlanar   

Mesa (master): glx/dri: explicitly assign struct components for glx_*_vtable

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 76ae25d7e8de02cf05d2aa848028864fd2737058
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=76ae25d7e8de02cf05d2aa848028864fd2737058

Author: Emil Velikov 
Date:   Tue Feb 18 19:05:57 2014 +

glx/dri: explicitly assign struct components for glx_*_vtable

... to improve readability of code.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/glx/dri_glx.c |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 3b7502d..04a0847 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -90,8 +90,6 @@ struct dri_drawable
__DRIdrawable *driDrawable;
 };
 
-static const struct glx_context_vtable dri_context_vtable;
-
 /*
  * Given a display pointer and screen number, determine the name of
  * the DRI driver for the screen (i.e., "i965", "radeon", "nouveau", etc).
@@ -569,15 +567,15 @@ dri_unbind_context(struct glx_context *context, struct 
glx_context *new)
 }
 
 static const struct glx_context_vtable dri_context_vtable = {
-   dri_destroy_context,
-   dri_bind_context,
-   dri_unbind_context,
-   NULL,
-   NULL,
-   DRI_glXUseXFont,
-   NULL,
-   NULL,
-   NULL, /* get_proc_address */
+   .destroy = dri_destroy_context,
+   .bind= dri_bind_context,
+   .unbind  = dri_unbind_context,
+   .wait_gl = NULL,
+   .wait_x  = NULL,
+   .use_x_font  = DRI_glXUseXFont,
+   .bind_tex_image  = NULL,
+   .release_tex_image   = NULL,
+   .get_proc_address= NULL,
 };
 
 static struct glx_context *
@@ -808,8 +806,10 @@ driBindExtensions(struct dri_screen *psc, const 
__DRIextension **extensions)
 }
 
 static const struct glx_screen_vtable dri_screen_vtable = {
-   dri_create_context,
-   NULL
+   .create_context = dri_create_context,
+   .create_context_attribs = NULL,
+   .query_renderer_integer = NULL,
+   .query_renderer_string  = NULL,
 };
 
 static struct glx_screen *

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/dri2: explicitly assign struct components for glx_*_vtable

2014-04-28 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 55d82adec677a163b3d091621d365e6490247110
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=55d82adec677a163b3d091621d365e6490247110

Author: Emil Velikov 
Date:   Tue Feb 18 19:22:29 2014 +

glx/dri2: explicitly assign struct components for glx_*_vtable

... to improve readability of code.

Signed-off-by: Emil Velikov 
Reviewed-by: Ian Romanick 
Reviewed-by: Kristian Høgsberg 

---

 src/glx/dri2_glx.c |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index b6acfbc..bd7ed8b 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1052,15 +1052,15 @@ dri2_release_tex_image(Display * dpy, GLXDrawable 
drawable, int buffer)
 }
 
 static const struct glx_context_vtable dri2_context_vtable = {
-   dri2_destroy_context,
-   dri2_bind_context,
-   dri2_unbind_context,
-   dri2_wait_gl,
-   dri2_wait_x,
-   DRI_glXUseXFont,
-   dri2_bind_tex_image,
-   dri2_release_tex_image,
-   NULL, /* get_proc_address */
+   .destroy = dri2_destroy_context,
+   .bind= dri2_bind_context,
+   .unbind  = dri2_unbind_context,
+   .wait_gl = dri2_wait_gl,
+   .wait_x  = dri2_wait_x,
+   .use_x_font  = DRI_glXUseXFont,
+   .bind_tex_image  = dri2_bind_tex_image,
+   .release_tex_image   = dri2_release_tex_image,
+   .get_proc_address= NULL,
 };
 
 static void
@@ -1144,10 +1144,10 @@ dri2BindExtensions(struct dri2_screen *psc, struct 
glx_display * priv,
 }
 
 static const struct glx_screen_vtable dri2_screen_vtable = {
-   dri2_create_context,
-   dri2_create_context_attribs,
-   dri2_query_renderer_integer,
-   dri2_query_renderer_string,
+   .create_context = dri2_create_context,
+   .create_context_attribs = dri2_create_context_attribs,
+   .query_renderer_integer = dri2_query_renderer_integer,
+   .query_renderer_string  = dri2_query_renderer_string,
 };
 
 static struct glx_screen *

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/omx: use GALLIUM_VIDEO_CFLAGS

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: be1b5feaa04dfb57ce543d380b84822dffb6db7d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=be1b5feaa04dfb57ce543d380b84822dffb6db7d

Author: Emil Velikov 
Date:   Sat Apr  5 02:42:30 2014 +0100

targets/omx: use GALLIUM_VIDEO_CFLAGS

Signed-off-by: Emil Velikov 
Reviewed-by: Christian König 

---

 src/gallium/targets/r600/omx/Makefile.am |8 +---
 src/gallium/targets/radeonsi/omx/Makefile.am |8 +---
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/gallium/targets/r600/omx/Makefile.am 
b/src/gallium/targets/r600/omx/Makefile.am
index 62e3970..e96027e 100644
--- a/src/gallium/targets/r600/omx/Makefile.am
+++ b/src/gallium/targets/r600/omx/Makefile.am
@@ -23,13 +23,7 @@
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-   $(GALLIUM_CFLAGS) \
-   $(VISIBILITY_CFLAGS) \
-   $(PTHREAD_CFLAGS) \
-   $(LIBDRM_CFLAGS)
-AM_CPPFLAGS = \
-   -I$(top_srcdir)/src/gallium/drivers \
-   -I$(top_srcdir)/src/gallium/winsys
+   $(GALLIUM_VIDEO_CFLAGS)
 
 omxdir = $(OMX_LIB_INSTALL_DIR)
 omx_LTLIBRARIES = libomx_r600.la
diff --git a/src/gallium/targets/radeonsi/omx/Makefile.am 
b/src/gallium/targets/radeonsi/omx/Makefile.am
index 859659e..2cfc270 100644
--- a/src/gallium/targets/radeonsi/omx/Makefile.am
+++ b/src/gallium/targets/radeonsi/omx/Makefile.am
@@ -23,13 +23,7 @@
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-   $(GALLIUM_CFLAGS) \
-   $(VISIBILITY_CFLAGS) \
-   $(PTHREAD_CFLAGS) \
-   $(LIBDRM_CFLAGS)
-AM_CPPFLAGS = \
-   -I$(top_srcdir)/src/gallium/drivers \
-   -I$(top_srcdir)/src/gallium/winsys
+   $(GALLIUM_VIDEO_CFLAGS)
 
 omxdir = $(OMX_LIB_INSTALL_DIR)
 omx_LTLIBRARIES = libomx_radeonsi.la

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/dri: use a single version script to restict exported symbols

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6239d42fdbd15f68442a71563902ac7d51a92fcf
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6239d42fdbd15f68442a71563902ac7d51a92fcf

Author: Emil Velikov 
Date:   Fri Apr  4 23:52:21 2014 +0100

targets/dri: use a single version script to restict exported symbols

Rather than having multiple (almost) identical version scripts use
a single one.

Cc: Christian König 
Acked-by: Maarten Lankhorst 
Signed-off-by: Emil Velikov 

---

 src/gallium/Automake.inc  |6 ++
 src/gallium/state_trackers/dri/dri.link   |5 -
 src/gallium/targets/dri-nouveau/Makefile.am   |1 -
 src/gallium/targets/{dri-nouveau/nouveau_dri.link => dri.sym} |6 --
 src/gallium/targets/r300/dri/Makefile.am  |1 -
 src/gallium/targets/r300/dri/radeon.link  |6 --
 src/gallium/targets/r600/dri/Makefile.am  |1 -
 src/gallium/targets/radeonsi/dri/Makefile.am  |1 -
 8 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index f857c1a..feed5c3 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -51,15 +51,13 @@ GALLIUM_VIDEO_CFLAGS = \
$(VISIBILITY_CFLAGS)
 
 
-DRI_VERSION_SCRIPT ?= $(top_srcdir)/src/gallium/state_trackers/dri/dri.link
-
 GALLIUM_DRI_LINKER_FLAGS = \
-shared \
-shrext .so \
-module \
-avoid-version \
-   $(GC_SECTIONS) \
-   -Wl,--version-script=$(DRI_VERSION_SCRIPT)
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym \
+   $(GC_SECTIONS)
 
 GALLIUM_VDPAU_LINKER_FLAGS = \
-shared \
diff --git a/src/gallium/state_trackers/dri/dri.link 
b/src/gallium/state_trackers/dri/dri.link
deleted file mode 100644
index 163902e..000
--- a/src/gallium/state_trackers/dri/dri.link
+++ /dev/null
@@ -1,5 +0,0 @@
-VERSION {
-   global:
-   __driDriverExtensions;
-   local: *;
-};
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am 
b/src/gallium/targets/dri-nouveau/Makefile.am
index 6c749bc..a479040 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -20,7 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-DRI_VERSION_SCRIPT = $(srcdir)/nouveau_dri.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/dri-nouveau/nouveau_dri.link 
b/src/gallium/targets/dri.sym
similarity index 60%
rename from src/gallium/targets/dri-nouveau/nouveau_dri.link
rename to src/gallium/targets/dri.sym
index 16015aa..c99aa09 100644
--- a/src/gallium/targets/dri-nouveau/nouveau_dri.link
+++ b/src/gallium/targets/dri.sym
@@ -1,6 +1,8 @@
-VERSION {
+{
global:
__driDriverExtensions;
nouveau_drm_screen_create;
-   local: *;
+   radeon_drm_winsys_create;
+   local:
+   *;
 };
diff --git a/src/gallium/targets/r300/dri/Makefile.am 
b/src/gallium/targets/r300/dri/Makefile.am
index 2650544..c780fd9 100644
--- a/src/gallium/targets/r300/dri/Makefile.am
+++ b/src/gallium/targets/r300/dri/Makefile.am
@@ -20,7 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-DRI_VERSION_SCRIPT = $(srcdir)/radeon.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/r300/dri/radeon.link 
b/src/gallium/targets/r300/dri/radeon.link
deleted file mode 100644
index 618058b..000
--- a/src/gallium/targets/r300/dri/radeon.link
+++ /dev/null
@@ -1,6 +0,0 @@
-VERSION {
-   global:
-   __driDriverExtensions;
-   radeon_drm_winsys_create;
-   local: *;
-};
diff --git a/src/gallium/targets/r600/dri/Makefile.am 
b/src/gallium/targets/r600/dri/Makefile.am
index 697abac..e13275e 100644
--- a/src/gallium/targets/r600/dri/Makefile.am
+++ b/src/gallium/targets/r600/dri/Makefile.am
@@ -20,7 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-DRI_VERSION_SCRIPT = $(srcdir)/../../r300/dri/radeon.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/radeonsi/dri/Makefile.am 
b/src/gallium/targets/radeonsi/dri/Makefile.am
index 4f36297..c9910dd 100644
--- a/src/gallium/targets/radeonsi/dri/Makefile.am
+++ b/src/gallium/targets/radeonsi/dri/Makefile.am
@@ -20,7 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-DRI_VERSION_SCRIPT = $(srcdir)/../../r300/dri/radeon.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/m

Mesa (master): targets/vdpau: use version script to limit the exported symbols

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 69d790da9f5307c54c7a7c280e158c412f91dc84
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69d790da9f5307c54c7a7c280e158c412f91dc84

Author: Emil Velikov 
Date:   Fri Apr  4 23:59:30 2014 +0100

targets/vdpau: use version script to limit the exported symbols

Using export-symbols-regex is the least desirable method of restricting
the exported symbols, as is completely messes up with the symbol table.

Signed-off-by: Emil Velikov 
Reviewed-by: Christian König 

---

 src/gallium/Automake.inc   |2 +-
 src/gallium/targets/r600/vdpau/Makefile.am |2 --
 src/gallium/targets/radeonsi/vdpau/Makefile.am |2 --
 src/gallium/targets/vdpau-nouveau/Makefile.am  |2 --
 src/gallium/targets/vdpau.sym  |8 
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 5a4f4e8..4519c16 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -64,7 +64,7 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
-   -export-symbols-regex $(VDPAU_EXPORTS) \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/r600/vdpau/Makefile.am 
b/src/gallium/targets/r600/vdpau/Makefile.am
index 455d90f..b212024 100644
--- a/src/gallium/targets/r600/vdpau/Makefile.am
+++ b/src/gallium/targets/r600/vdpau/Makefile.am
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/radeonsi/vdpau/Makefile.am 
b/src/gallium/targets/radeonsi/vdpau/Makefile.am
index b8dcf88..975ae78 100644
--- a/src/gallium/targets/radeonsi/vdpau/Makefile.am
+++ b/src/gallium/targets/radeonsi/vdpau/Makefile.am
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/vdpau-nouveau/Makefile.am 
b/src/gallium/targets/vdpau-nouveau/Makefile.am
index de1adf8..36d2f47 100644
--- a/src/gallium/targets/vdpau-nouveau/Makefile.am
+++ b/src/gallium/targets/vdpau-nouveau/Makefile.am
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|nouveau_drm_screen_create)$$'
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/vdpau.sym b/src/gallium/targets/vdpau.sym
new file mode 100644
index 000..f184193
--- /dev/null
+++ b/src/gallium/targets/vdpau.sym
@@ -0,0 +1,8 @@
+{
+   global:
+   vdp_imp_device_create_x11;
+   nouveau_drm_screen_create;
+   radeon_drm_winsys_create;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/xvmc: limit the amount of exported symbols

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: b8f31dfc22eb90c1703c8d414eedb841c9025f52
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8f31dfc22eb90c1703c8d414eedb841c9025f52

Author: Emil Velikov 
Date:   Fri Apr  4 23:46:13 2014 +0100

targets/xvmc: limit the amount of exported symbols

In the presence of LLVM the final library exports every symbol from
the llvm namespace. Resolve this by using a version script (w/o the
version/name tag).

Considering that there are only ~25 symbols, explicitly list them
to minimize the chances of rogue symbols sneaking in.

Drop the *winsys_create functions as they were only meant for
gl-vdpau interop.

Signed-off-by: Emil Velikov 
Reviewed-by: Christian König 

---

 src/gallium/Automake.inc |2 +-
 src/gallium/targets/xvmc.sym |   32 
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 1f5d532..f857c1a 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -75,7 +75,7 @@ GALLIUM_XVMC_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
-   -export-symbols-regex '^XvMC' \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/xvmc.sym b/src/gallium/targets/xvmc.sym
new file mode 100644
index 000..f51378e
--- /dev/null
+++ b/src/gallium/targets/xvmc.sym
@@ -0,0 +1,32 @@
+{
+   global:
+   XvMCBlendSubpicture;
+   XvMCBlendSubpicture2;
+   XvMCClearSubpicture;
+   XvMCCompositeSubpicture;
+   XvMCCreateBlocks;
+   XvMCCreateContext;
+   XvMCCreateMacroBlocks;
+   XvMCCreateSubpicture;
+   XvMCCreateSurface;
+   XvMCDestroyBlocks;
+   XvMCDestroyContext;
+   XvMCDestroyMacroBlocks;
+   XvMCDestroySubpicture;
+   XvMCDestroySurface;
+   XvMCFlushSubpicture;
+   XvMCFlushSurface;
+   XvMCGetAttribute;
+   XvMCGetSubpictureStatus;
+   XvMCGetSurfaceStatus;
+   XvMCHideSurface;
+   XvMCPutSurface;
+   XvMCQueryAttributes;
+   XvMCRenderSurface;
+   XvMCSetAttribute;
+   XvMCSetSubpicturePalette;
+   XvMCSyncSubpicture;
+   XvMCSyncSurface;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/omx: add nouveau target

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 1c6154c9b457acca6ccd51ab56b2ad589e7f622a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c6154c9b457acca6ccd51ab56b2ad589e7f622a

Author: Emil Velikov 
Date:   Sat Apr  5 02:15:33 2014 +0100

targets/omx: add nouveau target

Signed-off-by: Emil Velikov 

---

 configure.ac|3 +-
 src/gallium/targets/Makefile.am |4 +++
 src/gallium/targets/omx-nouveau/Makefile.am |   43 +++
 src/gallium/targets/omx-nouveau/target.c|   18 +++
 4 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index bf543c2..7251a5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1843,7 +1843,7 @@ if test -n "$with_gallium_drivers"; then
 PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= 
$LIBDRM_NOUVEAU_REQUIRED])
 gallium_require_drm_loader
 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau"
-gallium_check_st "nouveau/drm" "dri-nouveau" "" "xvmc-nouveau" 
"vdpau-nouveau"
+gallium_check_st "nouveau/drm" "dri-nouveau" "" "xvmc-nouveau" 
"vdpau-nouveau" "omx-nouveau"
 DRICOMMON_NEED_LIBDRM=yes
 ;;
 xfreedreno)
@@ -2086,6 +2086,7 @@ AC_CONFIG_FILES([Makefile
src/gallium/targets/opencl/Makefile
src/gallium/targets/xa/Makefile
src/gallium/targets/xa/xatracker.pc
+   src/gallium/targets/omx-nouveau/Makefile
src/gallium/targets/osmesa/Makefile
src/gallium/targets/osmesa/osmesa.pc
src/gallium/targets/pipe-loader/Makefile
diff --git a/src/gallium/targets/Makefile.am b/src/gallium/targets/Makefile.am
index 871b31d..5023dbc 100644
--- a/src/gallium/targets/Makefile.am
+++ b/src/gallium/targets/Makefile.am
@@ -116,6 +116,10 @@ endif
 if HAVE_ST_VDPAU
 SUBDIRS += vdpau-nouveau
 endif
+
+if HAVE_ST_OMX
+SUBDIRS += omx-nouveau
+endif
 endif
 
 if HAVE_GALLIUM_SOFTPIPE
diff --git a/src/gallium/targets/omx-nouveau/Makefile.am 
b/src/gallium/targets/omx-nouveau/Makefile.am
new file mode 100644
index 000..40ae06c
--- /dev/null
+++ b/src/gallium/targets/omx-nouveau/Makefile.am
@@ -0,0 +1,43 @@
+# Copyright © 2012 Intel Corporation
+#
+# 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 (including the next
+# paragraph) 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.
+
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CFLAGS = \
+   $(GALLIUM_VIDEO_CFLAGS)
+
+omxdir = $(OMX_LIB_INSTALL_DIR)
+omx_LTLIBRARIES = libomx_nouveau.la
+
+nodist_EXTRA_libomx_nouveau_la_SOURCES = dummy.cpp
+libomx_nouveau_la_SOURCES = \
+   target.c \
+   $(top_srcdir)/src/gallium/auxiliary/vl/vl_winsys_dri.c
+
+libomx_nouveau_la_LDFLAGS = $(GALLIUM_OMX_LINKER_FLAGS)
+
+libomx_nouveau_la_LIBADD = \
+   $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
+   $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
+   $(GALLIUM_OMX_LIB_DEPS) \
+   $(LIBDRM_LIBS) \
+   $(NOUVEAU_LIBS)
diff --git a/src/gallium/targets/omx-nouveau/target.c 
b/src/gallium/targets/omx-nouveau/target.c
new file mode 100644
index 000..d580b10
--- /dev/null
+++ b/src/gallium/targets/omx-nouveau/target.c
@@ -0,0 +1,18 @@
+#include "state_tracker/drm_driver.h"
+#include "target-helpers/inline_debug_helper.h"
+#include "nouveau/drm/nouveau_drm_public.h"
+
+static struct pipe_screen *create_screen(int fd)
+{
+   struct pipe_screen *screen;
+
+   screen = nouveau_drm_screen_create(fd);
+   if (!screen)
+  return NULL;
+
+   screen = debug_screen_wrap(screen);
+
+   return screen;
+}
+
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, NULL)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/omx: drop the version from the omx targets

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 53dd2e45f4625cc82f96e628a0e20512557113b8
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=53dd2e45f4625cc82f96e628a0e20512557113b8

Author: Emil Velikov 
Date:   Sat Apr  5 18:09:59 2014 +0100

targets/omx: drop the version from the omx targets

Suggested-by: Christian König 
Signed-off-by: Emil Velikov 

---

 src/gallium/Automake.inc |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 5263b7a..5a4f4e8 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -81,6 +81,7 @@ GALLIUM_OMX_LINKER_FLAGS = \
-shared \
-module \
-no-undefined \
+   -avoid-version \
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/pipe-loader: drop driver_descriptor symbol from swrast

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 658b36ff78a00dbbc1b9c9cb9adf4b984a89c45b
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=658b36ff78a00dbbc1b9c9cb9adf4b984a89c45b

Author: Emil Velikov 
Date:   Fri Apr  4 15:45:08 2014 +0100

targets/pipe-loader: drop driver_descriptor symbol from swrast

The symbol is used for hardware only drivers. For swrast the
loader uses swrast_create_screen. Add VISIBILITY_CFLAGS while
we're here.

Signed-off-by: Emil Velikov 
Reviewed-by: Francisco Jerez 

---

 src/gallium/targets/pipe-loader/Makefile.am   |3 ++-
 src/gallium/targets/pipe-loader/pipe_swrast.c |3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 76271a1..6a5b380 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -27,7 +27,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/drivers \
-I$(top_srcdir)/src/gallium/winsys \
-$(LIBDRM_CFLAGS) \
+   $(LIBDRM_CFLAGS) \
+   $(VISIBILITY_CFLAGS) \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE \
-DGALLIUM_GALAHAD
diff --git a/src/gallium/targets/pipe-loader/pipe_swrast.c 
b/src/gallium/targets/pipe-loader/pipe_swrast.c
index 092abf0..f7f354a 100644
--- a/src/gallium/targets/pipe-loader/pipe_swrast.c
+++ b/src/gallium/targets/pipe-loader/pipe_swrast.c
@@ -6,9 +6,6 @@
 PUBLIC struct pipe_screen *
 swrast_create_screen(struct sw_winsys *ws);
 
-PUBLIC
-DRM_DRIVER_DESCRIPTOR("swrast", NULL, NULL, NULL)
-
 struct pipe_screen *
 swrast_create_screen(struct sw_winsys *ws)
 {

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/gbm: add version-script to limit exported symbols

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 4eaa3c9b60e363fbbba1508b78f52d26e8c186bf
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4eaa3c9b60e363fbbba1508b78f52d26e8c186bf

Author: Emil Velikov 
Date:   Fri Apr  4 21:44:36 2014 +0100

targets/gbm: add version-script to limit exported symbols

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/gbm/Makefile.am |1 +
 src/gallium/targets/gbm/gbm.sym |6 ++
 2 files changed, 7 insertions(+)

diff --git a/src/gallium/targets/gbm/Makefile.am 
b/src/gallium/targets/gbm/Makefile.am
index 0bd1d68..a8945a9 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -67,6 +67,7 @@ gbm_gallium_drm_la_LDFLAGS = \
-module \
-no-undefined \
-avoid-version \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/gbm/gbm.sym b/src/gallium/targets/gbm/gbm.sym
new file mode 100644
index 000..d5fa0b9
--- /dev/null
+++ b/src/gallium/targets/gbm/gbm.sym
@@ -0,0 +1,6 @@
+{
+   global:
+   gbm_backend;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/osmesa: hide osmesa_create_screen

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 9bcb3698db98fe0ffc7bd6619b8324f13b3b67d2
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bcb3698db98fe0ffc7bd6619b8324f13b3b67d2

Author: Emil Velikov 
Date:   Fri Apr  4 18:32:38 2014 +0100

targets/osmesa: hide osmesa_create_screen

The symbol is not meant to be exported, and its presence was
only a side effect due to the missing visibility flags.

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/osmesa/Makefile.am |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/targets/osmesa/Makefile.am 
b/src/gallium/targets/osmesa/Makefile.am
index 8b7eb00..067f980 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -21,7 +21,9 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CFLAGS = $(GALLIUM_CFLAGS)
+AM_CFLAGS = \
+   $(GALLIUM_CFLAGS) \
+   $(VISIBILITY_CFLAGS)
 
 AM_CPPFLAGS = \
-I$(top_srcdir)/include \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/opencl: hide all the exported llvm/ clang mayhem... hopefully

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: f743670b9a10ab296a5e90b866d1c766d44cf98d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f743670b9a10ab296a5e90b866d1c766d44cf98d

Author: Emil Velikov 
Date:   Fri Apr  4 23:37:15 2014 +0100

targets/opencl: hide all the exported llvm/clang mayhem... hopefully

Both llvm and clang polute the exported symbol table, as soon
as we try to link with either one. Other than those two
everything else looks good (clean).

Cc: Tom Stellard 
Signed-off-by: Emil Velikov 
Reviewed-by: Francisco Jerez 

---

 src/gallium/targets/opencl/Makefile.am |1 +
 src/gallium/targets/opencl/opencl.sym  |6 ++
 2 files changed, 7 insertions(+)

diff --git a/src/gallium/targets/opencl/Makefile.am 
b/src/gallium/targets/opencl/Makefile.am
index 29909da..ba45aee 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -6,6 +6,7 @@ lib@OPENCL_LIBNAME@_la_LDFLAGS = \
$(LLVM_LDFLAGS) \
-no-undefined \
-version-number 1:0 \
+   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/opencl/opencl.sym \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/opencl/opencl.sym 
b/src/gallium/targets/opencl/opencl.sym
new file mode 100644
index 000..ee8aacf
--- /dev/null
+++ b/src/gallium/targets/opencl/opencl.sym
@@ -0,0 +1,6 @@
+{
+   global:
+   cl*;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/omx: use version script to limit amount of exported symbols

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: bea9e8dca010c84b8281000d69b62dcdc0341bf3
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bea9e8dca010c84b8281000d69b62dcdc0341bf3

Author: Emil Velikov 
Date:   Fri Apr  4 23:53:13 2014 +0100

targets/omx: use version script to limit amount of exported symbols

Using export-symbols-regex is the least desirable method of restricting
the exported symbols, as is completely messes up with the symbol table.

radeon_drm_winsys_create is not needed, avoid exporting it.

Signed-off-by: Emil Velikov 
Reviewed-by: Christian König 

---

 src/gallium/Automake.inc |2 +-
 src/gallium/targets/omx.sym  |6 ++
 src/gallium/targets/r600/omx/Makefile.am |2 --
 src/gallium/targets/radeonsi/omx/Makefile.am |2 --
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index feed5c3..5263b7a 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -81,7 +81,7 @@ GALLIUM_OMX_LINKER_FLAGS = \
-shared \
-module \
-no-undefined \
-   -export-symbols-regex $(EXPORTS) \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/omx.sym b/src/gallium/targets/omx.sym
new file mode 100644
index 000..af22aed
--- /dev/null
+++ b/src/gallium/targets/omx.sym
@@ -0,0 +1,6 @@
+{
+   global:
+   omx_component_library_Setup;
+   local:
+   *;
+};
diff --git a/src/gallium/targets/r600/omx/Makefile.am 
b/src/gallium/targets/r600/omx/Makefile.am
index 2168db8..62e3970 100644
--- a/src/gallium/targets/r600/omx/Makefile.am
+++ b/src/gallium/targets/r600/omx/Makefile.am
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-EXPORTS = '^(omx_component_library_Setup|radeon_drm_winsys_create)$$'
-
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/radeonsi/omx/Makefile.am 
b/src/gallium/targets/radeonsi/omx/Makefile.am
index 3c37909..859659e 100644
--- a/src/gallium/targets/radeonsi/omx/Makefile.am
+++ b/src/gallium/targets/radeonsi/omx/Makefile.am
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-EXPORTS = '^(omx_component_library_Setup|radeon_drm_winsys_create)$$'
-
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/pipe-loader: cleanup version-script

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: ce6c17c0833032e91a2d1b34f9eb80c738a854a2
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce6c17c0833032e91a2d1b34f9eb80c738a854a2

Author: Emil Velikov 
Date:   Sat Apr  5 18:04:18 2014 +0100

targets/pipe-loader: cleanup version-script

Drop the version/name tag from the script as it was never
meant to be there. Add swrast_create_screen as it is used
when loading swrast. Rename the file to pipe.sym.

v2: Rebase on top of the LD_NO_UNDEFINED changes.

Signed-off-by: Emil Velikov 
Reviewed-by: Francisco Jerez 

---

 src/gallium/targets/pipe-loader/Makefile.am |4 ++--
 src/gallium/targets/pipe-loader/pipe.link   |3 ---
 src/gallium/targets/pipe-loader/pipe.sym|7 +++
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 6a5b380..a1c7d25 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -47,9 +47,9 @@ AM_LDFLAGS = \
-module \
-no-undefined \
-avoid-version \
+   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.sym \
$(GC_SECTIONS) \
-   $(LD_NO_UNDEFINED) \
-   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.link
+   $(LD_NO_UNDEFINED)
 
 if HAVE_MESA_LLVM
 PIPE_LIBS += $(LLVM_LIBS)
diff --git a/src/gallium/targets/pipe-loader/pipe.link 
b/src/gallium/targets/pipe-loader/pipe.link
deleted file mode 100644
index d6dd2af..000
--- a/src/gallium/targets/pipe-loader/pipe.link
+++ /dev/null
@@ -1,3 +0,0 @@
-VERSION {
-   global: driver_descriptor; local: *;
-};
diff --git a/src/gallium/targets/pipe-loader/pipe.sym 
b/src/gallium/targets/pipe-loader/pipe.sym
new file mode 100644
index 000..19b1d77
--- /dev/null
+++ b/src/gallium/targets/pipe-loader/pipe.sym
@@ -0,0 +1,7 @@
+{
+   global:
+   driver_descriptor;
+   swrast_create_screen;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/egl-static: freshen up the version script

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 7b7944ee1cedeaf13867974eb8f217690726c245
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b7944ee1cedeaf13867974eb8f217690726c245

Author: Emil Velikov 
Date:   Sat Apr  5 18:03:05 2014 +0100

targets/egl-static: freshen up the version script

Namely drop the version/name tag of the exported symbol, and
rename the filename to egl.sym.

v2: Rebase on top of the LD_NO_UNDEFINED changes.

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/egl-static/Makefile.am |4 ++--
 src/gallium/targets/egl-static/egl.link|3 ---
 src/gallium/targets/egl-static/egl.sym |6 ++
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index 221cb71..1aa5d37 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -48,9 +48,9 @@ AM_LDFLAGS = \
-module \
-no-undefined \
-avoid-version \
+   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym
$(GC_SECTIONS) \
-   $(LD_NO_UNDEFINED) \
-   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.link
+   $(LD_NO_UNDEFINED)
 
 egldir = $(EGL_DRIVER_INSTALL_DIR)
 egl_LTLIBRARIES = egl_gallium.la
diff --git a/src/gallium/targets/egl-static/egl.link 
b/src/gallium/targets/egl-static/egl.link
deleted file mode 100644
index 5be917f..000
--- a/src/gallium/targets/egl-static/egl.link
+++ /dev/null
@@ -1,3 +0,0 @@
-VERSION {
-   global: _eglMain; local: *;
-};
diff --git a/src/gallium/targets/egl-static/egl.sym 
b/src/gallium/targets/egl-static/egl.sym
new file mode 100644
index 000..3fe7d67
--- /dev/null
+++ b/src/gallium/targets/egl-static/egl.sym
@@ -0,0 +1,6 @@
+{
+   global:
+   _eglMain;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): dri3: Enable GLX_MESA_query_renderer on DRI3 too

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 625bdd64e5ea3327d4459b1ff8dab89129d0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=625bdd64e5ea3327d4459b1ff8dab89129d0

Author: Ian Romanick 
Date:   Thu Feb 20 11:47:14 2014 -0800

dri3: Enable GLX_MESA_query_renderer on DRI3 too

This should have happend around the time of commit 4680d23, but Keith's
DRI3 patches and my GLX_MESA_query_renderer patches crossed in the mail.

I don't have a working DRI3 setup, so I haven't been able to actually
verify this.  I'm hoping that someone can piglit this for me on DRI3...
It's also unfortunate the DRI2 and DRI3 can't share more code.

Signed-off-by: Ian Romanick 
Cc: Keith Packard 
Cc: "10.1" 
Reviewed-by: Emil Velikov 

---

 src/glx/dri2.h|8 
 src/glx/dri2_query_renderer.c |   39 +++
 src/glx/dri3_glx.c|   10 --
 src/glx/dri3_priv.h   |1 +
 4 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/src/glx/dri2.h b/src/glx/dri2.h
index 72a608c..d07b296 100644
--- a/src/glx/dri2.h
+++ b/src/glx/dri2.h
@@ -96,4 +96,12 @@ _X_HIDDEN int
 dri2_query_renderer_string(struct glx_screen *base, int attribute,
const char **value);
 
+_X_HIDDEN int
+dri3_query_renderer_integer(struct glx_screen *base, int attribute,
+unsigned int *value);
+
+_X_HIDDEN int
+dri3_query_renderer_string(struct glx_screen *base, int attribute,
+   const char **value);
+
 #endif
diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c
index a28ced6..c96e1f9 100644
--- a/src/glx/dri2_query_renderer.c
+++ b/src/glx/dri2_query_renderer.c
@@ -28,6 +28,7 @@
 #include "dri2.h"
 #include "dri_interface.h"
 #include "dri2_priv.h"
+#include "dri3_priv.h"
 
 static int
 dri2_convert_glx_query_renderer_attribs(int attribute)
@@ -98,4 +99,42 @@ dri2_query_renderer_string(struct glx_screen *base, int 
attribute,
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, 
value);
 }
 
+_X_HIDDEN int
+dri3_query_renderer_integer(struct glx_screen *base, int attribute,
+unsigned int *value)
+{
+   struct dri3_screen *const psc = (struct dri3_screen *) base;
+
+   /* Even though there are invalid values (and
+* dri2_convert_glx_query_renderer_attribs may return -1), the higher level
+* GLX code is required to perform the filtering.  Assume that we got a
+* good value.
+*/
+   const int dri_attribute = 
dri2_convert_glx_query_renderer_attribs(attribute);
+
+   if (psc->rendererQuery == NULL)
+  return -1;
+
+   return psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
+   value);
+}
+
+_X_HIDDEN int
+dri3_query_renderer_string(struct glx_screen *base, int attribute,
+   const char **value)
+{
+   struct dri3_screen *const psc = (struct dri3_screen *) base;
+
+   /* Even though queryString only accepts a subset of the possible GLX
+* queries, the higher level GLX code is required to perform the filtering.
+* Assume that we got a good value.
+*/
+   const int dri_attribute = 
dri2_convert_glx_query_renderer_attribs(attribute);
+
+   if (psc->rendererQuery == NULL)
+  return -1;
+
+   return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, 
value);
+}
+
 #endif /* GLX_DIRECT_RENDERING */
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 4cde9ef..3d8a662 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -76,6 +76,7 @@
 #include "dri_common.h"
 #include "dri3_priv.h"
 #include "loader.h"
+#include "dri2.h"
 
 static const struct glx_context_vtable dri3_context_vtable;
 
@@ -1599,14 +1600,19 @@ dri3_bind_extensions(struct dri3_screen *psc, struct 
glx_display * priv,
   if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0)
  __glXEnableDirectExtension(&psc->base,
 "GLX_ARB_create_context_robustness");
+
+  if (strcmp(extensions[i]->name, __DRI2_RENDERER_QUERY) == 0) {
+ psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i];
+ __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
+  }
}
 }
 
 static const struct glx_screen_vtable dri3_screen_vtable = {
.create_context = dri3_create_context,
.create_context_attribs = dri3_create_context_attribs,
-   .query_renderer_integer = NULL,
-   .query_renderer_string  = NULL,
+   .query_renderer_integer = dri3_query_renderer_integer,
+   .query_renderer_string  = dri3_query_renderer_string,
 };
 
 /** dri3_create_screen
diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h
index 3846331..6894886 100644
--- a/src/glx/dri3_pri

Mesa (master): glx: Conditionally compile GLX_MESA_query_renderer DRI3 support

2014-05-02 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 0b307afd57082f0d4a0e8ba19093d313c9fb46ad
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b307afd57082f0d4a0e8ba19093d313c9fb46ad

Author: Armin K 
Date:   Fri May  2 23:59:22 2014 +0200

glx: Conditionally compile GLX_MESA_query_renderer DRI3 support

Missed out with commit 625bdd64e5ea3327d4459b1ff8dab89129d0.

Cc: "10.1" 
Reviewed-by: Emil Velikov 

---

 src/glx/dri2_query_renderer.c |4 
 1 file changed, 4 insertions(+)

diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c
index c96e1f9..c1e8772 100644
--- a/src/glx/dri2_query_renderer.c
+++ b/src/glx/dri2_query_renderer.c
@@ -28,7 +28,9 @@
 #include "dri2.h"
 #include "dri_interface.h"
 #include "dri2_priv.h"
+#if defined(HAVE_DRI3)
 #include "dri3_priv.h"
+#endif
 
 static int
 dri2_convert_glx_query_renderer_attribs(int attribute)
@@ -99,6 +101,7 @@ dri2_query_renderer_string(struct glx_screen *base, int 
attribute,
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, 
value);
 }
 
+#if defined(HAVE_DRI3)
 _X_HIDDEN int
 dri3_query_renderer_integer(struct glx_screen *base, int attribute,
 unsigned int *value)
@@ -136,5 +139,6 @@ dri3_query_renderer_string(struct glx_screen *base, int 
attribute,
 
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, 
value);
 }
+#endif /* HAVE_DRI3 */
 
 #endif /* GLX_DIRECT_RENDERING */

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): ilo: destroy the mutex, if winsys creation fails

2014-05-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 42770ff94ea8a30de51d4887611fc94bf271cde4
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42770ff94ea8a30de51d4887611fc94bf271cde4

Author: Emil Velikov 
Date:   Thu May  8 19:09:39 2014 +0100

ilo: destroy the mutex, if winsys creation fails

Signed-off-by: Emil Velikov 
Reviewed-by: Chia-I Wu 

---

 src/gallium/winsys/intel/drm/intel_drm_winsys.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c 
b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index d34246a..00c4a46 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -181,6 +181,7 @@ intel_winsys_create_for_fd(int fd)
pipe_mutex_init(winsys->mutex);
 
if (!probe_winsys(winsys)) {
+  pipe_mutex_destroy(winsys->mutex);
   drm_intel_bufmgr_destroy(winsys->bufmgr);
   FREE(winsys);
   return NULL;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl_dri2: cleanup memory leak in dri2_create_context()

2014-05-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: a3e78bab7fdc906bf2f4850094885b59ca3c6d08
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a3e78bab7fdc906bf2f4850094885b59ca3c6d08

Author: Emil Velikov 
Date:   Thu May  8 16:49:45 2014 +0100

egl_dri2: cleanup memory leak in dri2_create_context()

Signed-off-by: Emil Velikov 
Reviewed-by: Kristian Høgsberg 
Reviewed-by: Chad Versace 

---

 src/egl/drivers/dri2/egl_dri2.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 380bd7b..a5f71ed 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -811,8 +811,9 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, 
_EGLConfig *conf,
  api = __DRI_API_GLES3;
  break;
   default:
-_eglError(EGL_BAD_PARAMETER, "eglCreateContext");
-return NULL;
+ _eglError(EGL_BAD_PARAMETER, "eglCreateContext");
+ free(dri2_ctx);
+ return NULL;
   }
   break;
case EGL_OPENGL_API:

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414

2014-05-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 326b8e253e5ee2e09e54ad46d8370a6e8c8d46da
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=326b8e253e5ee2e09e54ad46d8370a6e8c8d46da

Author: Emil Velikov 
Date:   Wed May  7 22:30:43 2014 +0100

glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414

C++ does not support designated initializers, thus compilation
is not guaranteed to succeed. Surprisingly gcc 4.6.3 fails to
build the code, while version 4.9.0 compiles it without a hitch.

Cc: "10.2" 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78403
Signed-off-by: Emil Velikov 
Tested-by: Vinson Lee 

---

 src/glx/tests/query_renderer_implementation_unittest.cpp |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/glx/tests/query_renderer_implementation_unittest.cpp 
b/src/glx/tests/query_renderer_implementation_unittest.cpp
index 6ec4c4f..7f8f301 100644
--- a/src/glx/tests/query_renderer_implementation_unittest.cpp
+++ b/src/glx/tests/query_renderer_implementation_unittest.cpp
@@ -141,10 +141,10 @@ fake_queryString(__DRIscreen *screen, int attribute, 
const char **val)
 }
 
 static const __DRI2rendererQueryExtension rendererQueryExt = {
-   .base = { __DRI2_RENDERER_QUERY, 1 },
+   { __DRI2_RENDERER_QUERY, 1 },
 
-   .queryInteger = fake_queryInteger,
-   .queryString = fake_queryString
+   fake_queryInteger,
+   fake_queryString
 };
 
 void dri2_query_renderer_string_test::SetUp()

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure: error out if building GBM without dri

2014-05-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: e477d12c3396ded1607b6f57c15e100ca08f44f5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e477d12c3396ded1607b6f57c15e100ca08f44f5

Author: Emil Velikov 
Date:   Mon May  5 22:09:22 2014 +0100

configure: error out if building GBM without dri

Both backends require --enable-dri, and building an empty libgbm
makes little to no sense. Error out at configure to prevent the
user from shooting themselves in the foot.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78225
Cc: "10.1 10.2" 
Signed-off-by: Emil Velikov 
Reviewed-by: Kenneth Graunke 

---

 configure.ac |7 +++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index c68db00..99a761a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1179,6 +1179,13 @@ if test "x$enable_gbm" = xyes; then
 if test "x$enable_shared_glapi" = xno; then
 AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
 fi
+else
+# Strictly speaking libgbm does not require --enable-dri, although
+# both of its backends do. Thus one can build libgbm without any
+# backends if --disable-dri is set.
+# To avoid unnecessary complexity of checking if at least one backend
+# is available when building, just mandate --enable-dri.
+AC_MSG_ERROR([gbm requires --enable-dri])
 fi
 fi
 AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure: correctly set LD_NO_UNDEFINED

2014-05-14 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: f57d092199318f03f6522d0ca616f1f8220b2e6e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f57d092199318f03f6522d0ca616f1f8220b2e6e

Author: Emil Velikov 
Date:   Tue May 13 01:33:48 2014 +0100

configure: correctly set LD_NO_UNDEFINED

Commit 11623be934f85 was meant to have this hunk, which
I accidently dropped during git rebase.

Cc: 10.2 
Signed-off-by: Emil Velikov 
Reviewed-by: Julien Cristau 
Reviewed-by: Matt Turner 
Reviewed-by: Jonathan Gray 

---

 configure.ac |   13 +
 1 file changed, 13 insertions(+)

diff --git a/configure.ac b/configure.ac
index b4a1606..d3e96de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,6 +332,19 @@ LDFLAGS=$save_LDFLAGS
 AC_SUBST([GC_SECTIONS])
 
 dnl
+dnl OpenBSD does not have DT_NEEDED entries for libc by design
+dnl so when these flags are passed to ld via libtool the checks will fail
+dnl
+case "$host_os" in
+openbsd*)
+LD_NO_UNDEFINED="" ;;
+*)
+LD_NO_UNDEFINED="-Wl,--no-undefined" ;;
+esac
+
+AC_SUBST([LD_NO_UNDEFINED])
+
+dnl
 dnl compatibility symlinks
 dnl
 case "$host_os" in

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: Honor GL_LIB for gallium libgl-xlib

2014-05-14 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6aac2637a675060c79c62bcc01550a6cad08a37f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6aac2637a675060c79c62bcc01550a6cad08a37f

Author: Brad King 
Date:   Tue May  6 11:06:47 2014 -0400

automake: Honor GL_LIB for gallium libgl-xlib

Use "@GL_LIB@" in src/gallium/targets/libgl-xlib/Makefile.am to produce
the library name specified by the configure --with-gl-lib-name option.

Reviewed-by: Emil Velikov 

---

 src/gallium/targets/libgl-xlib/Makefile.am |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/targets/libgl-xlib/Makefile.am 
b/src/gallium/targets/libgl-xlib/Makefile.am
index 4ee364e..7651333 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -40,17 +40,17 @@ AM_CPPFLAGS = \
-DGALLIUM_GALAHAD
 AM_CFLAGS = $(X11_INCLUDES)
 
-lib_LTLIBRARIES = libGL.la
+lib_LTLIBRARIES = lib@GL_LIB@.la
 
-nodist_EXTRA_libGL_la_SOURCES = dummy.cpp
-libGL_la_SOURCES = xlib.c
-libGL_la_LDFLAGS = \
+nodist_EXTRA_lib@GL_LIB@_la_SOURCES = dummy.cpp
+lib@GL_LIB@_la_SOURCES = xlib.c
+lib@GL_LIB@_la_LDFLAGS = \
-no-undefined \
-version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
-libGL_la_LIBADD = \
+lib@GL_LIB@_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/glx/xlib/libxlib.la \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
@@ -64,9 +64,9 @@ libGL_la_LIBADD = \
$(CLOCK_LIB)
 
 if HAVE_MESA_LLVM
-libGL_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la 
$(LLVM_LIBS)
+lib@GL_LIB@_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
-libGL_la_LDFLAGS += $(LLVM_LDFLAGS)
+lib@GL_LIB@_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 
 include $(top_srcdir)/install-gallium-links.mk

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: Add a note about llvm-shared-libs and libxatracker

2014-05-14 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: e48054d0364cfc4c92120ea90b6f526c3527230a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e48054d0364cfc4c92120ea90b6f526c3527230a

Author: Emil Velikov 
Date:   Mon May  5 22:09:23 2014 +0100

docs: Add a note about llvm-shared-libs and libxatracker

Both changes landed in 10.2, and for people not following the
development cycle these will come as a surprise. Note that the
pipe_* interface is not stable.

Cc: "10.2" 
Signed-off-by: Emil Velikov 
Acked-by: Rob Clark 

---

 docs/relnotes/10.2.html |   19 +++
 1 file changed, 19 insertions(+)

diff --git a/docs/relnotes/10.2.html b/docs/relnotes/10.2.html
index 9bbaf88..af44ca1 100644
--- a/docs/relnotes/10.2.html
+++ b/docs/relnotes/10.2.html
@@ -67,6 +67,25 @@ TBD.
 Changes
 
 
+Renamed --with-llvm-shared-libs to 
--enable-llvm-shared-libs
+
+The option is used to control how mesa is linked against LLVM, and now
+defaults to enabled (shared linking).
+
+
+Split libxatracker.so into a standalone library which can be used
+with any gallium driver.
+
+Previously the library was linked statically against vmware's virtual gpu
+driver(svga), whereas now it loads a shared pipe_*.so driver. Provide the
+following options during configure, if you would like support for svga driver
+--enable-xa --with-gallium-drivers=svga
+
+
+
+Note: The files are installed in $(libdir)/gallium-pipe/ and the interface
+between them and libxatracker.so is not stable.
+
 
 
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: build only a single common library libradeon

2014-05-15 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6fcc0b0ba5b5a554682b782ee5f7930d7aabbe8e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fcc0b0ba5b5a554682b782ee5f7930d7aabbe8e

Author: Emil Velikov 
Date:   Sat May 10 14:25:08 2014 +0100

gallium/radeon: build only a single common library libradeon

Just fold libllvmradeon in libradeon.

Signed-off-by: Emil Velikov 
Reviewed-by: Tom Stellard 

---

 src/gallium/drivers/r600/Makefile.am |2 --
 src/gallium/drivers/radeon/Makefile.am   |   12 
 src/gallium/drivers/radeonsi/Makefile.am |3 +--
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/r600/Makefile.am 
b/src/gallium/drivers/r600/Makefile.am
index b2e3708..be8635d 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -28,8 +28,6 @@ AM_CFLAGS += \
 libr600_la_SOURCES += \
$(LLVM_C_SOURCES)
 
-libr600_la_LIBADD += ../radeon/libllvmradeon.la
-
 endif
 
 if USE_R600_LLVM_COMPILER
diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index b521658..e2c980f 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -13,22 +13,18 @@ libradeon_la_SOURCES = \
 
 if NEED_RADEON_LLVM
 
-noinst_LTLIBRARIES += libllvmradeon.la
-
-libllvmradeon_la_CFLAGS = \
-   $(GALLIUM_DRIVER_CFLAGS) \
-   $(RADEON_CFLAGS) \
+AM_CFLAGS += \
$(LLVM_CFLAGS)
 
-libllvmradeon_la_SOURCES = \
+libradeon_la_SOURCES += \
$(LLVM_C_FILES)
 
-libllvmradeon_la_LIBADD = \
+libradeon_la_LIBADD = \
$(CLOCK_LIB) \
$(LLVM_LIBS) \
$(ELF_LIB)
 
-libllvmradeon_la_LDFLAGS = \
+libradeon_la_LDFLAGS = \
$(LLVM_LDFLAGS)
 
 endif
diff --git a/src/gallium/drivers/radeonsi/Makefile.am 
b/src/gallium/drivers/radeonsi/Makefile.am
index 84c99f8..f409f7e 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -33,5 +33,4 @@ noinst_LTLIBRARIES = libradeonsi.la
 
 libradeonsi_la_SOURCES = $(C_SOURCES)
 libradeonsi_la_LIBADD = \
-   ../radeon/libradeon.la \
-   ../radeon/libllvmradeon.la
+   ../radeon/libradeon.la

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: link in libradeon.la at target level

2014-05-15 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: d812c745829be2155fdd0d10e4a12606c2a10826
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d812c745829be2155fdd0d10e4a12606c2a10826

Author: Emil Velikov 
Date:   Sat May 10 14:35:08 2014 +0100

gallium/radeon: link in libradeon.la at target level

It makes more sense to link the core and common parts of the driver as the
target is build. Additionally this will help us drop duplicating symbols
for targets that static link mulitple pipe-drivers. Only egl-static needs
that currently with more to come.

To simplify things a bit add HAVE_GALLIUM_RADEON_COMMON variable.

Signed-off-by: Emil Velikov 
Reviewed-by: Tom Stellard 

---

 configure.ac   |2 ++
 src/gallium/drivers/Makefile.am|   24 
 src/gallium/drivers/r600/Makefile.am   |2 --
 src/gallium/drivers/radeonsi/Makefile.am   |2 --
 src/gallium/targets/egl-static/Makefile.am |5 +
 src/gallium/targets/pipe-loader/Makefile.am|2 ++
 src/gallium/targets/r600/dri/Makefile.am   |1 +
 src/gallium/targets/r600/omx/Makefile.am   |1 +
 src/gallium/targets/r600/vdpau/Makefile.am |1 +
 src/gallium/targets/r600/xvmc/Makefile.am  |1 +
 src/gallium/targets/radeonsi/dri/Makefile.am   |1 +
 src/gallium/targets/radeonsi/omx/Makefile.am   |1 +
 src/gallium/targets/radeonsi/vdpau/Makefile.am |1 +
 13 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/configure.ac b/configure.ac
index d3e96de..4e4d761 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1967,6 +1967,8 @@ AM_CONDITIONAL(HAVE_GALLIUM_ILO, test 
"x$HAVE_GALLIUM_ILO" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_R300, test "x$HAVE_GALLIUM_R300" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_R600, test "x$HAVE_GALLIUM_R600" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_RADEONSI, test "x$HAVE_GALLIUM_RADEONSI" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_RADEON_COMMON, test "x$HAVE_GALLIUM_R600" = xyes 
-o \
+"x$HAVE_GALLIUM_RADEONSI" = 
xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
index f8baa3c..3d53cad 100644
--- a/src/gallium/drivers/Makefile.am
+++ b/src/gallium/drivers/Makefile.am
@@ -5,22 +5,6 @@ SUBDIRS = . galahad identity noop trace rbug
 
 

 
-if HAVE_GALLIUM_R600
-
-SUBDIRS += radeon
-
-else
-
-if HAVE_GALLIUM_RADEONSI
-
-SUBDIRS += radeon
-
-endif
-
-endif
-
-
-
 if HAVE_GALLIUM_FREEDRENO
 
 SUBDIRS += freedreno
@@ -61,6 +45,14 @@ endif
 
 

 
+if HAVE_GALLIUM_RADEON_COMMON
+
+SUBDIRS += radeon
+
+endif
+
+
+
 if HAVE_GALLIUM_R300
 
 SUBDIRS += r300
diff --git a/src/gallium/drivers/r600/Makefile.am 
b/src/gallium/drivers/r600/Makefile.am
index be8635d..30e098e 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -17,8 +17,6 @@ libr600_la_SOURCES = \
$(C_SOURCES) \
$(CXX_SOURCES)
 
-libr600_la_LIBADD = ../radeon/libradeon.la
-
 if NEED_RADEON_LLVM
 
 AM_CFLAGS += \
diff --git a/src/gallium/drivers/radeonsi/Makefile.am 
b/src/gallium/drivers/radeonsi/Makefile.am
index f409f7e..926b203 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -32,5 +32,3 @@ AM_CFLAGS = \
 noinst_LTLIBRARIES = libradeonsi.la
 
 libradeonsi_la_SOURCES = $(C_SOURCES)
-libradeonsi_la_LIBADD = \
-   ../radeon/libradeon.la
diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index 1aa5d37..332b38d 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -183,6 +183,11 @@ egl_gallium_la_LIBADD += \
$(NOUVEAU_LIBS)
 endif
 
+if HAVE_GALLIUM_RADEON_COMMON
+egl_gallium_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/radeon/libradeon.la
+endif
+
 if HAVE_GALLIUM_R300
 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
 egl_gallium_la_LIBADD += \
diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index a1c7d25..3280694 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -107,6 +107,7 @@ nodist_EXTRA_pipe_r600_la_SOURCES = dummy.cpp
 pipe_r600_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/winsys/radeo

Mesa (master): egl-static: include libradeonwinsys.la only once

2014-05-15 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 39ae284a6941df5942602c027d4a8863ca35e654
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=39ae284a6941df5942602c027d4a8863ca35e654

Author: Emil Velikov 
Date:   Sat May 10 15:59:03 2014 +0100

egl-static: include libradeonwinsys.la only once

With this and the previous patch, we no longer have multiple
definitions in the final egl_gallium.so.

v2: Drop duplicate libloader link.

Signed-off-by: Emil Velikov 
Reviewed-by: Chia-I Wu  (v1)
Reviewed-by: Tom Stellard  (v1)

---

 src/gallium/targets/egl-static/Makefile.am |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index 332b38d..38e5d07 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -68,17 +68,12 @@ egl_gallium_la_LIBADD = \
$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
$(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
$(top_builddir)/src/egl/main/libEGL.la \
-   $(top_builddir)/src/loader/libloader.la \
$(GALLIUM_COMMON_LIB_DEPS)
 
 if HAVE_MESA_LLVM
 AM_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 
-egl_gallium_la_LDFLAGS = \
-   $(AM_LDFLAGS) \
-   -Wl,--allow-multiple-definition
-
 if HAVE_EGL_PLATFORM_X11
 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
 egl_gallium_la_LIBADD += \
@@ -183,6 +178,11 @@ egl_gallium_la_LIBADD += \
$(NOUVEAU_LIBS)
 endif
 
+if NEED_RADEON_DRM_WINSYS
+egl_gallium_la_LIBADD += \
+   $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
+endif
+
 if HAVE_GALLIUM_RADEON_COMMON
 egl_gallium_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/radeon/libradeon.la
@@ -191,7 +191,6 @@ endif
 if HAVE_GALLIUM_R300
 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
 egl_gallium_la_LIBADD += \
-   $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
$(top_builddir)/src/gallium/drivers/r300/libr300.la \
$(RADEON_LIBS)
 endif
@@ -199,7 +198,6 @@ endif
 if HAVE_GALLIUM_R600
 AM_CPPFLAGS += -D_EGL_PIPE_R600=1
 egl_gallium_la_LIBADD += \
-   $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
$(top_builddir)/src/gallium/drivers/r600/libr600.la \
$(RADEON_LIBS)
 endif
@@ -207,7 +205,6 @@ endif
 if HAVE_GALLIUM_RADEONSI
 AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
 egl_gallium_la_LIBADD += \
-   $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
$(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
$(RADEON_LIBS)
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Re: Mesa (master): targets/osmesa: limit the amount of exported symbols

2014-05-23 Thread Emil Velikov
On 23/05/14 16:04, Brian Paul wrote:
> Emil, I accidentally pushed this patch.  I forgot I had applied it in my tree
> for testing a couple days ago.  If you have any concerns with this, please
> feel free to revert.
> 
No problems Brian.

I will just follow up with a one-liner for the mangledGL symbols.

-Emil
> -Brian
> 
> On 05/23/2014 08:10 AM, Brian Paul wrote:
>> Module: Mesa
>> Branch: master
>> Commit: d4c3968c25885f6eb53dee4cc0c60d8d3f8fec32
>> URL:   
>> https://urldefense.proofpoint.com/v1/url?u=http://cgit.freedesktop.org/mesa/mesa/commit/?id%3Dd4c3968c25885f6eb53dee4cc0c60d8d3f8fec32&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=ueLGideVgyLbNvVSlKWOLqk4jXG4BWLcFvE5Op4EOcM%3D%0A&s=d5267a18f84a19cadc2be26519bbdf13c45a1d10b2d8a5260161bdd279006b31
>>
>>
>> Author: Emil Velikov 
>> Date:   Tue May 20 18:07:00 2014 -0600
>>
>> targets/osmesa: limit the amount of exported symbols
>>
>> src/gallium/targets/osmesa/Makefile.am |  1 +
>> src/gallium/targets/osmesa/osmesa.sym  | 18 ++
>> 2 files changed, 19 insertions(+)
>> create mode 100644 src/gallium/targets/osmesa/osmesa.sym
>>
>> ---
>>
>>   src/gallium/targets/osmesa/Makefile.am |1 +
>>   src/gallium/targets/osmesa/osmesa.sym  |   18 ++
>>   2 files changed, 19 insertions(+)
>>
>> diff --git a/src/gallium/targets/osmesa/Makefile.am
>> b/src/gallium/targets/osmesa/Makefile.am
>> index 067f980..0ec8a26 100644
>> --- a/src/gallium/targets/osmesa/Makefile.am
>> +++ b/src/gallium/targets/osmesa/Makefile.am
>> @@ -45,6 +45,7 @@ lib@OSMESA_LIB@_la_LDFLAGS = \
>>   -module \
>>   -no-undefined \
>>   -version-number @OSMESA_VERSION@ \
>> +
>> -Wl,--version-script=$(top_srcdir)/src/gallium/targets/osmesa/osmesa.sym \
>>   $(GC_SECTIONS) \
>>   $(LD_NO_UNDEFINED)
>>
>> diff --git a/src/gallium/targets/osmesa/osmesa.sym
>> b/src/gallium/targets/osmesa/osmesa.sym
>> new file mode 100644
>> index 000..b8230e0
>> --- /dev/null
>> +++ b/src/gallium/targets/osmesa/osmesa.sym
>> @@ -0,0 +1,18 @@
>> +{
>> +global:
>> +OSMesaColorClamp;
>> +OSMesaCreateContext;
>> +OSMesaCreateContextExt;
>> +OSMesaDestroyContext;
>> +OSMesaGetColorBuffer;
>> +OSMesaGetCurrentContext;
>> +OSMesaGetDepthBuffer;
>> +OSMesaGetIntegerv;
>> +OSMesaGetProcAddress;
>> +OSMesaMakeCurrent;
>> +OSMesaPixelStore;
>> +OSMesaPostprocess;
>> +gl*;
>> +local:
>> +*;
>> +};
>>
>> ___
>> mesa-commit mailing list
>> mesa-commit@lists.freedesktop.org
>> https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-commit&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=ueLGideVgyLbNvVSlKWOLqk4jXG4BWLcFvE5Op4EOcM%3D%0A&s=069a06af24b99b57551ae2d5f428be271ee52baf6954f576c5db783d7f98dc67
>>
>>
> 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): dri_util: set implemented version of the DRI_CORE extension

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: a9afdcc3a144f5fa4998891b2f63061e38db293a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9afdcc3a144f5fa4998891b2f63061e38db293a

Author: Emil Velikov 
Date:   Sat May 10 03:41:43 2014 +0100

dri_util: set implemented version of the DRI_CORE extension

... rather than the one defined in our internal interface (dri_interface.h)

Signed-off-by: Emil Velikov 
Reviewed-by: Kristian Høgsberg 

---

 src/mesa/drivers/dri/common/dri_util.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index 248c361..ce8b0ed 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -732,7 +732,7 @@ driSwapBuffers(__DRIdrawable *pdp)
 
 /** Core interface */
 const __DRIcoreExtension driCoreExtension = {
-.base = { __DRI_CORE, __DRI_CORE_VERSION },
+.base = { __DRI_CORE, 1 },
 
 .createNewScreen= NULL,
 .destroyScreen  = driDestroyScreen,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/osmesa: include mangled gl symbols

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 7e613f4683cef5274b18cba61f8f8ebabd91367a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e613f4683cef5274b18cba61f8f8ebabd91367a

Author: Emil Velikov 
Date:   Sun May 25 01:46:42 2014 +0100

targets/osmesa: include mangled gl symbols

Missed out with commit d4c3968c25885f6eb53dee4cc0c60d8d3f8fec32

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/osmesa/osmesa.sym |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/targets/osmesa/osmesa.sym 
b/src/gallium/targets/osmesa/osmesa.sym
index b8230e0..d4b963d 100644
--- a/src/gallium/targets/osmesa/osmesa.sym
+++ b/src/gallium/targets/osmesa/osmesa.sym
@@ -13,6 +13,7 @@
OSMesaPixelStore;
OSMesaPostprocess;
gl*;
+   mgl*;
local:
*;
 };

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: correctly append the version-script

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 7a63bd960c33127dbce0e5802a7cda96dc011104
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7a63bd960c33127dbce0e5802a7cda96dc011104

Author: Emil Velikov 
Date:   Sun May 25 03:23:42 2014 +0100

automake: correctly append the version-script

Turns out that the AC conditional did not include the
the version-scripts as expected. Rather it truncated
the remaining linker flags.

Cc: Jon TURNEY 
Signed-off-by: Emil Velikov 
Reviewed-by: Jon TURNEY 

---

 src/gallium/Automake.inc|   27 +++
 src/gallium/targets/egl-static/Makefile.am  |8 +---
 src/gallium/targets/gbm/Makefile.am |8 +---
 src/gallium/targets/opencl/Makefile.am  |7 ---
 src/gallium/targets/osmesa/Makefile.am  |5 -
 src/gallium/targets/pipe-loader/Makefile.am |8 +---
 6 files changed, 38 insertions(+), 25 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 70921ec..97735ab 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -56,9 +56,6 @@ GALLIUM_DRI_LINKER_FLAGS = \
-shrext .so \
-module \
-avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym \
-endif
$(GC_SECTIONS)
 
 GALLIUM_VDPAU_LINKER_FLAGS = \
@@ -66,9 +63,6 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
-if HAVE_LD_VERSION_SCRIPT
-   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
-endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
@@ -77,9 +71,6 @@ GALLIUM_XVMC_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
-if HAVE_LD_VERSION_SCRIPT
-   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym \
-endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
@@ -88,12 +79,24 @@ GALLIUM_OMX_LINKER_FLAGS = \
-module \
-no-undefined \
-avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
-endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+GALLIUM_DRI_LINKER_FLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym
+
+GALLIUM_VDPAU_LINKER_FLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym
+
+GALLIUM_XVMC_LINKER_FLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym
+
+GALLIUM_OMX_LINKER_FLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym
+endif
+
+
 GALLIUM_COMMON_LIB_DEPS = \
-lm \
$(CLOCK_LIB) \
diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index bd18f99..ec09b28 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -48,12 +48,14 @@ AM_LDFLAGS = \
-module \
-no-undefined \
-avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym \
-endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+AM_LDFLAGS += \
+   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym
+endif
+
 egldir = $(EGL_DRIVER_INSTALL_DIR)
 egl_LTLIBRARIES = egl_gallium.la
 
diff --git a/src/gallium/targets/gbm/Makefile.am 
b/src/gallium/targets/gbm/Makefile.am
index ccfddac..5efc0e4 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -67,12 +67,14 @@ gbm_gallium_drm_la_LDFLAGS = \
-module \
-no-undefined \
-avoid-version \
-if HAVE_LD_VERSION_SCRIPT
-   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym \
-endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+gbm_gallium_drm_la_LDFLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym
+endif
+
 if HAVE_MESA_LLVM
 gbm_gallium_drm_la_LIBADD += $(LLVM_LIBS)
 gbm_gallium_drm_la_LDFLAGS += $(LLVM_LDFLAGS)
diff --git a/src/gallium/targets/opencl/Makefile.am 
b/src/gallium/targets/opencl/Makefile.am
index 55a73b4..7f2854d 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -6,12 +6,13 @@ lib@OPENCL_LIBNAME@_la_LDFLAGS = \
$(LLVM_LDFLAGS) \
-no-undefined \
-version-number 1:0 \
-if HAVE_LD_VERSION_SCRIPT
-   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/opencl/opencl.sym \
-endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+lib@OPENCL_LIBNAME@_la_LDFLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/opencl/opencl.sym
+endif
 
 lib@OPENCL_LIBNAME@_la_LIBADD = \

$(top_builddir)/src/gallium/auxiliary/pipe

Mesa (master): targets/libgl-xlib: hide all the exported symbol mayhem

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 239df5b654fcc52ba2e35370476cb03193dba04c
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=239df5b654fcc52ba2e35370476cb03193dba04c

Author: Emil Velikov 
Date:   Sun May 25 01:54:42 2014 +0100

targets/libgl-xlib: hide all the exported symbol mayhem

Leave only the gl/glx and mangled gl symbols.
XMesa* was never an official interface and the only
user of it was mesa-demos, while they were still in
the same repo as mesa.

v2: Conditionally use the version-script.

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/libgl-xlib/Makefile.am|5 +
 src/gallium/targets/libgl-xlib/libgl-xlib.sym |7 +++
 2 files changed, 12 insertions(+)

diff --git a/src/gallium/targets/libgl-xlib/Makefile.am 
b/src/gallium/targets/libgl-xlib/Makefile.am
index 7651333..4ed2025 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -50,6 +50,11 @@ lib@GL_LIB@_la_LDFLAGS = \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+lib@GL_LIB@_la_LDFLAGS += \
+   
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/libgl-xlib/libgl-xlib.sym
+endif
+
 lib@GL_LIB@_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/glx/xlib/libxlib.la \
$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
diff --git a/src/gallium/targets/libgl-xlib/libgl-xlib.sym 
b/src/gallium/targets/libgl-xlib/libgl-xlib.sym
new file mode 100644
index 000..956fa40
--- /dev/null
+++ b/src/gallium/targets/libgl-xlib/libgl-xlib.sym
@@ -0,0 +1,7 @@
+{
+   global:
+   gl*;
+   mgl*;
+   local:
+   *;
+};
\ No newline at end of file

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/egl: st_profiles are build time decision, treat them as such

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: b52a530ce2aada1967bc8fefa83ab53e6a737dae
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b52a530ce2aada1967bc8fefa83ab53e6a737dae

Author: Emil Velikov 
Date:   Sat May 10 03:41:44 2014 +0100

gallium/egl: st_profiles are build time decision, treat them as such

The profiles are present depending on the defines at build time.
Drop the extra functions and feed the defines directly into the
state-tracker at build time.

v2: Drop unused variable i.

Acked-by: Chia-I Wu  (v1)
Signed-off-by: Emil Velikov 

---

 src/gallium/state_trackers/egl/Android.mk  |5 +++-
 src/gallium/state_trackers/egl/SConscript  |   12 
 src/gallium/state_trackers/egl/common/egl_g3d.c|   20 --
 .../state_trackers/egl/common/egl_g3d_loader.h |1 -
 src/gallium/targets/egl-static/Android.mk  |2 --
 src/gallium/targets/egl-static/SConscript  |6 
 src/gallium/targets/egl-static/egl.c   |5 
 src/gallium/targets/egl-static/egl_st.c|   29 
 src/gallium/targets/egl-static/egl_st.h|3 --
 9 files changed, 28 insertions(+), 55 deletions(-)

diff --git a/src/gallium/state_trackers/egl/Android.mk 
b/src/gallium/state_trackers/egl/Android.mk
index b27e14b..7c4c936 100644
--- a/src/gallium/state_trackers/egl/Android.mk
+++ b/src/gallium/state_trackers/egl/Android.mk
@@ -32,7 +32,10 @@ LOCAL_SRC_FILES := \
$(common_FILES) \
$(android_FILES)
 
-LOCAL_CFLAGS := -DHAVE_ANDROID_BACKEND
+LOCAL_CFLAGS := \
+   -DFEATURE_ES1=1 \
+   -DFEATURE_ES2=1 \
+   -DHAVE_ANDROID_BACKEND
 
 LOCAL_C_INCLUDES := \
$(GALLIUM_TOP)/state_trackers/egl \
diff --git a/src/gallium/state_trackers/egl/SConscript 
b/src/gallium/state_trackers/egl/SConscript
index 3ddf0bc..3727fb2 100644
--- a/src/gallium/state_trackers/egl/SConscript
+++ b/src/gallium/state_trackers/egl/SConscript
@@ -14,6 +14,18 @@ env.Append(CPPPATH = [
 
 sources = env.ParseSourceList('Makefile.sources', 'common_FILES')
 
+# OpenGL ES and OpenGL
+if env['gles']:
+env.Append(CPPDEFINES = [
+'FEATURE_GL=1',
+'FEATURE_ES1=1',
+'FEATURE_ES2=1'
+])
+
+# OpenVG
+if True:
+env.Append(CPPDEFINES = ['FEATURE_VG=1'])
+
 if env['platform'] == 'windows':
 env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
 sources.append(env.ParseSourceList('Makefile.sources', 'gdi_FILES'))
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c 
b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 7cc4e8f..d3f5e92 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -548,14 +548,18 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy)
   goto fail;
}
 
-   if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_DEFAULT_MASK)
-  dpy->ClientAPIs |= EGL_OPENGL_BIT;
-   if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_OPENGL_ES1_MASK)
-  dpy->ClientAPIs |= EGL_OPENGL_ES_BIT;
-   if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_OPENGL_ES2_MASK)
-  dpy->ClientAPIs |= EGL_OPENGL_ES2_BIT;
-   if (gdpy->loader->profile_masks[ST_API_OPENVG] & ST_PROFILE_DEFAULT_MASK)
-  dpy->ClientAPIs |= EGL_OPENVG_BIT;
+#if FEATURE_GL
+   dpy->ClientAPIs |= EGL_OPENGL_BIT;
+#endif
+#if FEATURE_ES1
+   dpy->ClientAPIs |= EGL_OPENGL_ES_BIT;
+#endif
+#if FEATURE_ES2
+   dpy->ClientAPIs |= EGL_OPENGL_ES2_BIT;
+#endif
+#if FEATURE_VG
+   dpy->ClientAPIs |= EGL_OPENVG_BIT;
+#endif
 
gdpy->smapi = egl_g3d_create_st_manager(dpy);
if (!gdpy->smapi) {
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_loader.h 
b/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
index 51b4d19..03db153 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
@@ -36,7 +36,6 @@ struct pipe_screen;
 struct sw_winsys;
 
 struct egl_g3d_loader {
-   uint profile_masks[ST_API_COUNT];
struct st_api *(*get_st_api)(enum st_api_type api);
 
struct pipe_screen *(*create_drm_screen)(const char *name, int fd);
diff --git a/src/gallium/targets/egl-static/Android.mk 
b/src/gallium/targets/egl-static/Android.mk
index 37244b5..01408a7 100644
--- a/src/gallium/targets/egl-static/Android.mk
+++ b/src/gallium/targets/egl-static/Android.mk
@@ -31,8 +31,6 @@ LOCAL_SRC_FILES := \
egl_st.c
 
 LOCAL_CFLAGS := \
-   -DFEATURE_ES1=1 \
-   -DFEATURE_ES2=1 \
-D_EGL_MAIN=_eglBuiltInDriverGALLIUM
 
 LOCAL_C_INCLUDES := \
diff --git a/src/gallium/targets/egl-static/SConscript 
b/src/gallium/targets/egl-static/SConscript
index 83937fe..f879cc3 100644
--- a/src/gallium/targets/egl-static/SConscript
+++ b/

Mesa (master): targets/xa: limit the amount of exported symbols

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: a75baba2f14a2bcdaf640aeef86d67b41bb2a76f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a75baba2f14a2bcdaf640aeef86d67b41bb2a76f

Author: Emil Velikov 
Date:   Fri May  2 22:02:15 2014 +0100

targets/xa: limit the amount of exported symbols

In the presence of LLVM the final library exports every symbol from
the llvm namespace. Resolve this by using a version script (w/o the
version/name tag).

Considering that there are only ~35 symbols, explicitly list them
to minimize the chances of rogue symbols sneaking in.

v2: Conditionally include the version-script.

Reviewed-by: Thomas Hellstrom  (v1)
Signed-off-by: Emil Velikov 

---

 src/gallium/targets/xa/Makefile.am |5 +
 src/gallium/targets/xa/xa.sym  |   38 
 2 files changed, 43 insertions(+)

diff --git a/src/gallium/targets/xa/Makefile.am 
b/src/gallium/targets/xa/Makefile.am
index 0d39454..cb9fdc4 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -66,6 +66,11 @@ libxatracker_la_LDFLAGS = \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+libxatracker_la_LDFLAGS += \
+   -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xa/xa.sym
+endif
+
 if HAVE_MESA_LLVM
 libxatracker_la_LIBADD += $(LLVM_LIBS)
 libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
diff --git a/src/gallium/targets/xa/xa.sym b/src/gallium/targets/xa/xa.sym
new file mode 100644
index 000..9c7f422
--- /dev/null
+++ b/src/gallium/targets/xa/xa.sym
@@ -0,0 +1,38 @@
+{
+   global:
+   xa_composite_allocation;
+   xa_composite_check_accelerated;
+   xa_composite_done;
+   xa_composite_prepare;
+   xa_composite_rect;
+   xa_context_create;
+   xa_context_default;
+   xa_context_destroy;
+   xa_context_flush;
+   xa_copy;
+   xa_copy_done;
+   xa_copy_prepare;
+   xa_fence_get;
+   xa_fence_wait;
+   xa_fence_destroy;
+   xa_format_check_supported;
+   xa_solid;
+   xa_solid_done;
+   xa_solid_prepare;
+   xa_surface_create;
+   xa_surface_dma;
+   xa_surface_format;
+   xa_surface_from_handle;
+   xa_surface_handle;
+   xa_surface_map;
+   xa_surface_redefine;
+   xa_surface_ref;
+   xa_surface_unmap;
+   xa_surface_unref;
+   xa_tracker_create;
+   xa_tracker_destroy;
+   xa_tracker_version;
+   xa_yuv_planar_blit;
+   local:
+   *;
+};

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: do not leak dri3Display

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: eb2241f8a921a09db13bc453ce97b1f1939add17
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb2241f8a921a09db13bc453ce97b1f1939add17

Author: Emil Velikov 
Date:   Sat May 10 03:41:45 2014 +0100

glx: do not leak dri3Display

v2: Do not wrap the code in ifdef HAVE_DRI3 (suggested by Keith)

Cc: "10.1 10.2" 
Cc: Keith Packard 
Signed-off-by: Emil Velikov 

---

 src/glx/glxext.c |4 
 1 file changed, 4 insertions(+)

diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 24c80d4..8528e88 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -249,6 +249,10 @@ glx_display_free(struct glx_display *priv)
if (priv->dri2Display)
   (*priv->dri2Display->destroyDisplay) (priv->dri2Display);
priv->dri2Display = NULL;
+
+   if (priv->dri3Display)
+  (*priv->dri3Display->destroyDisplay) (priv->dri3Display);
+   priv->dri3Display = NULL;
 #endif
 
free((char *) priv);

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): dri_util: keep __dri2ConfigOptions symbol private

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: ce12bbd107996dacdb01e4a0f90ce141dfa8b05d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce12bbd107996dacdb01e4a0f90ce141dfa8b05d

Author: Emil Velikov 
Date:   Fri May  2 22:02:14 2014 +0100

dri_util: keep __dri2ConfigOptions symbol private

The symbol was added with commit 45e2b51c853(DRI2/GLX: check for
vblank_mode in DRI2 GLX code) but was never used as such according
to git log.

Possibly it was marked as public due to confusion with
__driConfigOptions which was used for dri1 drivers.

Acked-by: Jesse Barnes 
Signed-off-by: Emil Velikov 

---

 src/mesa/drivers/dri/common/dri_util.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index ce8b0ed..4712879 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -52,7 +52,7 @@
 #include "main/errors.h"
 #include "main/macros.h"
 
-PUBLIC const char __dri2ConfigOptions[] =
+const char __dri2ConfigOptions[] =
DRI_CONF_BEGIN
   DRI_CONF_SECTION_PERFORMANCE
  DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_1)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/opencl: Fix (static) linking with LLVM (v2)

2014-05-25 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 97aa256b199644dbf16ae8371ad339fef1a25d91
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=97aa256b199644dbf16ae8371ad339fef1a25d91

Author: Kai Wasserbäch 
Date:   Mon May 19 17:02:49 2014 +0200

targets/opencl: Fix (static) linking with LLVM (v2)

Without this, I get linking failures (static linking).

The static linking is sort of required for me, because otherwise Steam and
applications using the Steam runtime regularily fail because my LLVM was
compiled and linked against a newer libgcc_s, libstdc++, etc. and uses
features from those newer versions. And instead of Steam just not
starting, my X starts crashing, whenever libGL fails to load a (32 bit)
driver.

Since I hate crashes of X and I don't think Valve/Steam will behave like
a proper distribution soon (rebuilds versus current Debian Testing, since
they base their Steam OS off that), I need a radeonsi which carries its
own LLVM within and doesn't care about what the runtime sets. This means
linking Mesa statically.

v1 → v2: Move logic to configure.ac

Acked-by: Emil Velikov 
Signed-off-by: Kai Wasserbäch 

---

 configure.ac |7 +++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 7397341..bee85a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1728,6 +1728,13 @@ if test "x$enable_gallium_llvm" = xyes; then
 if $LLVM_CONFIG --components | grep -qw 'option'; then
 LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
 fi
+# Current OpenCL/Clover and LLVM 3.5 require ObjCARCOpts and 
ProfileData
+if $LLVM_CONFIG --components | grep -qw 'objcarcopts'; then
+LLVM_COMPONENTS="${LLVM_COMPONENTS} objcarcopts"
+fi
+if $LLVM_CONFIG --components | grep -qw 'profiledata'; then
+LLVM_COMPONENTS="${LLVM_COMPONENTS} profiledata"
+fi
 fi
 DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT 
-DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
 MESA_LLVM=1

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl_dri2: fix wayland_platform when drm_platform is not set

2014-05-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6638c55838b8f5186166b7855fdaf41e0a015e88
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6638c55838b8f5186166b7855fdaf41e0a015e88

Author: Emil Velikov 
Date:   Wed May 28 14:36:46 2014 +0100

egl_dri2: fix wayland_platform when drm_platform is not set

The build fails with implicit delaration of drmGetCap (xf86drm.h)
Were we're including the header only when building the DRM_PLATFORM.

Wayland backend can operate without DRM_PLATFORM so replace the
guard, and fold in drmGetCap() usage to silence compiler warnings.

Cc: Chad Versace 
Cc: Kristian Høgsberg 
Signed-off-by: Emil Velikov 

---

 src/egl/drivers/dri2/egl_dri2.c |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f7f2da2..c1497b8 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -35,7 +35,7 @@
 #include 
 #include 
 #include 
-#ifdef HAVE_DRM_PLATFORM
+#ifdef HAVE_LIBDRM
 #include 
 #include 
 #endif
@@ -2001,7 +2001,7 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay 
*disp,
 struct wl_display *wl_dpy)
 {
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
-   int ret, flags = 0;
+   int flags = 0;
uint64_t cap;
 
(void) drv;
@@ -2012,11 +2012,13 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, 
_EGLDisplay *disp,
wl_drm_callbacks.authenticate =
   (int(*)(void *, uint32_t)) dri2_dpy->vtbl->authenticate;
 
-   ret = drmGetCap(dri2_dpy->fd, DRM_CAP_PRIME, &cap);
-   if (ret == 0 && cap == (DRM_PRIME_CAP_IMPORT | DRM_PRIME_CAP_EXPORT) &&
+#ifdef HAVE_LIBDRM
+   if (drmGetCap(dri2_dpy->fd, DRM_CAP_PRIME, &cap) == 0 &&
+   cap == (DRM_PRIME_CAP_IMPORT | DRM_PRIME_CAP_EXPORT) &&
dri2_dpy->image->base.version >= 7 &&
dri2_dpy->image->createImageFromFds != NULL)
   flags |= WAYLAND_DRM_PRIME;
+#endif
 
dri2_dpy->wl_server_drm =
   wayland_drm_init(wl_dpy, dri2_dpy->device_name,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/egl: do not link against libloader

2014-05-29 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: febec731475a5b288cc50660b2d32780e395b950
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=febec731475a5b288cc50660b2d32780e395b950

Author: Emil Velikov 
Date:   Wed May 28 15:43:35 2014 +0100

st/egl: do not link against libloader

Move the link to the final targets, like any other place in
mesa/gallium. This allows better visibilty and will prevent
us from including the library archive twice.

Resolves multiple definition of `loader_get_pci_id_for_fd'

multiple definition of `loader_get_pci_id_for_fd'

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79382
Cc: Chia-I Wu 
Signed-off-by: Emil Velikov 
Reviewed-by: Chia-I Wu 
Tested-by: Michel Dänzer 

---

 src/gallium/state_trackers/egl/Makefile.am |1 -
 1 file changed, 1 deletion(-)

diff --git a/src/gallium/state_trackers/egl/Makefile.am 
b/src/gallium/state_trackers/egl/Makefile.am
index 26266ed..b7dcdab 100644
--- a/src/gallium/state_trackers/egl/Makefile.am
+++ b/src/gallium/state_trackers/egl/Makefile.am
@@ -65,7 +65,6 @@ endif
 
 if HAVE_EGL_PLATFORM_DRM
 libegl_la_SOURCES += $(drm_FILES)
-libegl_la_LIBADD = $(top_builddir)/src/loader/libloader.la
 AM_CFLAGS += \
$(LIBDRM_CFLAGS)
 AM_CPPFLAGS += \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): add megadriver_stub_FILES

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: eb3f80dbba3c7e6e33d9b98a6b88761550fddb97
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb3f80dbba3c7e6e33d9b98a6b88761550fddb97

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:05 2014 +0300

add megadriver_stub_FILES

So that android part can also use $(megadriver_stub_FILES)

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/mesa/drivers/dri/common/Makefile.am  |2 +-
 src/mesa/drivers/dri/common/Makefile.sources |3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/common/Makefile.am 
b/src/mesa/drivers/dri/common/Makefile.am
index c98ccf7..7222a96 100644
--- a/src/mesa/drivers/dri/common/Makefile.am
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -42,7 +42,7 @@ libdricommon_la_SOURCES = $(DRI_COMMON_FILES)
 libdri_test_stubs_la_SOURCES = $(test_stubs_FILES)
 libdri_test_stubs_la_CFLAGS = $(AM_CFLAGS) -DNO_MAIN
 
-libmegadriver_stub_la_SOURCES = megadriver_stub.c
+libmegadriver_stub_la_SOURCES = $(megadriver_stub_FILES)
 
 sysconf_DATA = drirc
 
diff --git a/src/mesa/drivers/dri/common/Makefile.sources 
b/src/mesa/drivers/dri/common/Makefile.sources
index 8469b49..43b289e 100644
--- a/src/mesa/drivers/dri/common/Makefile.sources
+++ b/src/mesa/drivers/dri/common/Makefile.sources
@@ -14,3 +14,6 @@ mesa_dri_common_INCLUDES := \
 
 test_stubs_FILES := \
dri_test.c
+
+megadriver_stub_FILES := \
+   megadriver_stub.c

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure: error out when building opencl without LLVM

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 93257a56b5b585e79e4ba9f95b38f5bd718e3959
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=93257a56b5b585e79e4ba9f95b38f5bd718e3959

Author: Emil Velikov 
Date:   Thu May 15 22:54:48 2014 +0100

configure: error out when building opencl without LLVM

Cc: Tom Stellard 
Cc: "10.1 10.2" 
Signed-off-by: Emil Velikov 
Reviewed-by: Tom Stellard 

---

 configure.ac |4 
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index a12f27a..7b0009d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1475,6 +1475,10 @@ if test "x$enable_opencl" = xyes; then
 AC_MSG_ERROR([cannot enable OpenCL without Gallium])
 fi
 
+if test "x$enable_gallium_llvm" != xyes; then
+AC_MSG_ERROR([cannot enable OpenCL without LLVM])
+fi
+
 if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a 
$GCC_VERSION_MINOR -lt 7; then
 AC_MSG_ERROR([gcc >= 4.7 is required to build clover])
 fi

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): scons: remove dri-i915 build target

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: c21fca8bf241544ef2690be22d5b0e1eaba6397d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c21fca8bf241544ef2690be22d5b0e1eaba6397d

Author: Emil Velikov 
Date:   Thu May 15 19:32:52 2014 +0100

scons: remove dri-i915 build target

Unmaintained and broken.

Cc: Jakob Bornecrantz 
Signed-off-by: Emil Velikov 
Acked-by: Jakob Bornecrantz 

---

 scons/gallium.py  |1 -
 src/gallium/SConscript|9 -
 src/gallium/targets/dri-i915/SConscript   |   29 -
 src/gallium/targets/egl-static/SConscript |9 -
 src/gallium/winsys/i915/drm/SConscript|   14 --
 5 files changed, 62 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 5109ebf..4c194aa 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -591,7 +591,6 @@ def generate(env):
 env.PkgCheckModules('XCB', ['x11-xcb', 'xcb-glx >= 1.8.1'])
 env.PkgCheckModules('XF86VIDMODE', ['xxf86vm'])
 env.PkgCheckModules('DRM', ['libdrm >= 2.4.38'])
-env.PkgCheckModules('DRM_INTEL', ['libdrm_intel >= 2.4.52'])
 env.PkgCheckModules('UDEV', ['libudev >= 151'])
 
 env['dri'] = env['x11'] and env['drm']
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index 32bbdbe..816c79c 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -85,11 +85,6 @@ if env['dri']:
 'winsys/svga/drm/SConscript',
 ])
 
-if env['drm_intel']:
-SConscript([
-'winsys/i915/drm/SConscript',
-])
-
 #
 # Targets
 #
@@ -126,10 +121,6 @@ if not env['embedded']:
 'targets/dri-swrast/SConscript',
 'targets/dri-vmwgfx/SConscript',
 ])
-if env['drm_intel']:
-SConscript([
-'targets/dri-i915/SConscript',
-])
 
 
 #
diff --git a/src/gallium/targets/dri-i915/SConscript 
b/src/gallium/targets/dri-i915/SConscript
deleted file mode 100644
index b3bd3dd..000
--- a/src/gallium/targets/dri-i915/SConscript
+++ /dev/null
@@ -1,29 +0,0 @@
-Import('*')
-
-env = drienv.Clone()
-
-env.PkgUseModules('DRM_INTEL')
-
-env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE', 'GALLIUM_GALAHAD'])
-
-env.Prepend(LIBS = [
-ws_wrapper,
-st_dri,
-i915drm,
-i915,
-galahad,
-trace,
-rbug,
-mesa,
-glsl,
-gallium,
-COMMON_DRI_DRM_OBJECTS
-])
-
-module = env.LoadableModule(
-target = 'i915_dri.so',
-source = 'target.c',
-SHLIBPREFIX = '',
-)
-
-env.Alias('dri-i915', module)
diff --git a/src/gallium/targets/egl-static/SConscript 
b/src/gallium/targets/egl-static/SConscript
index f879cc3..7d8d4d2 100644
--- a/src/gallium/targets/egl-static/SConscript
+++ b/src/gallium/targets/egl-static/SConscript
@@ -85,15 +85,6 @@ if env['HAVE_X11']:
 if env['HAVE_DRM']:
 env.PkgUseModules('DRM')
 
-if env['HAVE_DRM_INTEL']:
-env.PkgUseModules('DRM_INTEL')
-env.Append(CPPDEFINES = ['_EGL_PIPE_I915'])
-env.Prepend(LIBS = [
-i915drm,
-i915,
-ws_wrapper,
-])
-
 env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX'])
 env.Prepend(LIBS = [
 svgadrm,
diff --git a/src/gallium/winsys/i915/drm/SConscript 
b/src/gallium/winsys/i915/drm/SConscript
deleted file mode 100644
index 3d27628..000
--- a/src/gallium/winsys/i915/drm/SConscript
+++ /dev/null
@@ -1,14 +0,0 @@
-Import('*')
-
-env = env.Clone()
-
-env.PkgUseModules('DRM')
-
-i915drm_sources = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
-
-i915drm = env.ConvenienceLibrary(
-target ='i915drm',
-source = i915drm_sources,
-)
-
-Export('i915drm')

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android: adapt to the megadriver mechanism

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: aba0f152be5bbc9fa844a53014bde7c02f056e4f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=aba0f152be5bbc9fa844a53014bde7c02f056e4f

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:06 2014 +0300

android: adapt to the megadriver mechanism

Fixes linker error:
  ld:
  .../libmesa_dri_common_intermediates/libmesa_dri_common.a(dri_util.o):
in function globalDriverAPI:dri_util.c(.data.rel+0x0): error:
undefined reference to 'driDriverAPI'

As an example, you can see that mesa_dri_drivers
also uses common/libmegadriver_stub (src/mesa/drivers/dri/Makefile.am)

The _stub part might be confusing, but
it actually provides the dri-driver shared lib constructor,
megadriver_stub_init, which will later on load the real
platform dependent part and call
l __driDriverGetExtensions_

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/mesa/drivers/dri/Android.mk|1 +
 src/mesa/drivers/dri/common/Android.mk |   17 +
 2 files changed, 18 insertions(+)

diff --git a/src/mesa/drivers/dri/Android.mk b/src/mesa/drivers/dri/Android.mk
index 9adf0b3..e0cf51c 100644
--- a/src/mesa/drivers/dri/Android.mk
+++ b/src/mesa/drivers/dri/Android.mk
@@ -43,6 +43,7 @@ MESA_DRI_C_INCLUDES := \
 
 MESA_DRI_WHOLE_STATIC_LIBRARIES := \
libmesa_glsl \
+   libmegadriver_stub \
libmesa_dri_common \
libmesa_dricore
 
diff --git a/src/mesa/drivers/dri/common/Android.mk 
b/src/mesa/drivers/dri/common/Android.mk
index 0489a32..a172a0b 100644
--- a/src/mesa/drivers/dri/common/Android.mk
+++ b/src/mesa/drivers/dri/common/Android.mk
@@ -86,3 +86,20 @@ $(intermediates)/xmlpool/options.h: $$(PRIVATE_SCRIPT) 
$$(PRIVATE_TEMPLATE_HEADE
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
+
+#
+# Build libmegadriver_stub
+#
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/Makefile.sources
+
+LOCAL_MODULE := libmegadriver_stub
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_C_INCLUDES := \
+$(MESA_DRI_C_INCLUDES)
+
+LOCAL_SRC_FILES := $(megadriver_stub_FILES)
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl/dri2: do not leak dri2_dpy->driver_name

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5cb1cad0aef8d1c426207c955996278290e19e60
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cb1cad0aef8d1c426207c955996278290e19e60

Author: Emil Velikov 
Date:   Mon Jun  2 12:26:17 2014 +0100

egl/dri2: do not leak dri2_dpy->driver_name

Originally all hardware drivers duplicate the driver_name string
from an external source, while for the software rasterizer we set
it to "swrast". Follow the example set by hw drivers this way
we can free the string at dri2_terminate().

v2: Use strdup over strndup. Suggested by Ilia Mirkin.
v3: Handle platform_drm in a similar manner. Cleanup swrast
driver_name in error path.

Cc: Chia-I Wu 
Signed-off-by: Emil Velikov 

---

 src/egl/drivers/dri2/egl_dri2.c |3 +--
 src/egl/drivers/dri2/platform_drm.c |2 +-
 src/egl/drivers/dri2/platform_x11.c |6 ++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index c1497b8..eb6abfd 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -469,9 +469,7 @@ dri2_load_driver_swrast(_EGLDisplay *disp)
struct dri2_egl_display *dri2_dpy = disp->DriverData;
const __DRIextension **extensions;
 
-   dri2_dpy->driver_name = "swrast";
extensions = dri2_open_driver(disp);
-
if (!extensions)
   return EGL_FALSE;
 
@@ -673,6 +671,7 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
if (dri2_dpy->driver)
   dlclose(dri2_dpy->driver);
free(dri2_dpy->device_name);
+   free(dri2_dpy->driver_name);
 
switch (disp->Platform) {
 #ifdef HAVE_X11_PLATFORM
diff --git a/src/egl/drivers/dri2/platform_drm.c 
b/src/egl/drivers/dri2/platform_drm.c
index 52d8b49..6227bc9 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -526,7 +526,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
 
dri2_dpy->fd = fd;
dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd);
-   dri2_dpy->driver_name = dri2_dpy->gbm_dri->base.driver_name;
+   dri2_dpy->driver_name = strdup(dri2_dpy->gbm_dri->base.driver_name);
 
dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
dri2_dpy->core = dri2_dpy->gbm_dri->core;
diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index 548334e..4ef1f3e 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1076,6 +1076,11 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay 
*disp)
   goto cleanup_dpy;
}
 
+   /*
+* Every hardware driver_name is set using strdup. Doing the same in
+* here will allow is to simply free the memory at dri2_terminate().
+*/
+   dri2_dpy->driver_name = strdup("swrast");
if (!dri2_load_driver_swrast(disp))
   goto cleanup_conn;
 
@@ -1114,6 +1119,7 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay 
*disp)
  cleanup_driver:
dlclose(dri2_dpy->driver);
  cleanup_conn:
+   free(dri2_dpy->driver_name);
if (disp->PlatformDisplay == NULL)
   xcb_disconnect(dri2_dpy->conn);
  cleanup_dpy:

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android, egl: add correct drm include for libmesa_egl_dri2

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 4dc5545eff9f8fbf4e3d80bad5421821434605f9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4dc5545eff9f8fbf4e3d80bad5421821434605f9

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:09 2014 +0300

android, egl: add correct drm include for libmesa_egl_dri2

Fixes:
  src/egl/drivers/dri2/platform_android.c:38:
  include/GL/internal/dri_interface.h:51:17:
fatal error: drm.h: No such file or directory

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/egl/drivers/dri2/Android.mk |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/egl/drivers/dri2/Android.mk b/src/egl/drivers/dri2/Android.mk
index 2ff62fc..c9e2b64 100644
--- a/src/egl/drivers/dri2/Android.mk
+++ b/src/egl/drivers/dri2/Android.mk
@@ -40,6 +40,7 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \
$(MESA_TOP)/src/egl/main \
$(MESA_TOP)/src/loader \
+   $(DRM_TOP)/include/drm \
$(DRM_GRALLOC_TOP)
 
 LOCAL_STATIC_LIBRARIES := \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android, egl: typo dri2_fallback_pixmap_surface -> dri2_fallback_create_pixmap_surface

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6980cae6aeb6671b6b0245e20a2d34957c1fff0a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6980cae6aeb6671b6b0245e20a2d34957c1fff0a

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:10 2014 +0300

android, egl: typo dri2_fallback_pixmap_surface -> 
dri2_fallback_create_pixmap_surface

I used commit bc8b07a6 as reference, and only the droid_display_vtbl had this 
issue.

This fixes:
src/egl/drivers/dri2/platform_android.c:641:29:
  error: 'dri2_fallback_pixmap_surface' undeclared here (not in a function)

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/egl/drivers/dri2/platform_android.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/platform_android.c 
b/src/egl/drivers/dri2/platform_android.c
index 71948bd..d1f597c 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -638,7 +638,7 @@ droid_log(EGLint level, const char *msg)
 static struct dri2_egl_display_vtbl droid_display_vtbl = {
.authenticate = NULL,
.create_window_surface = droid_create_window_surface,
-   .create_pixmap_surface = dri2_fallback_pixmap_surface,
+   .create_pixmap_surface = dri2_fallback_create_pixmap_surface,
.create_pbuffer_surface = droid_create_pbuffer_surface,
.destroy_surface = droid_destroy_surface,
.create_image = droid_create_image_khr,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android, mesa_gen_matypes: pull in timespec POSIX definition

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 6eb3888c863dfef249c3910dbe3fe1f2b251db05
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6eb3888c863dfef249c3910dbe3fe1f2b251db05

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:11 2014 +0300

android, mesa_gen_matypes: pull in timespec POSIX definition

This fixes:
  include/c11/threads_posix.h: In function 'cnd_timedwait':
  include/c11/threads_posix.h:140:21: error: storage size of 'abs_time' isn't 
known

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/mesa/Android.libmesa_glsl_utils.mk |1 +
 src/mesa/Android.mesa_gen_matypes.mk   |1 +
 2 files changed, 2 insertions(+)

diff --git a/src/mesa/Android.libmesa_glsl_utils.mk 
b/src/mesa/Android.libmesa_glsl_utils.mk
index 47f2e15..e93891f 100644
--- a/src/mesa/Android.libmesa_glsl_utils.mk
+++ b/src/mesa/Android.libmesa_glsl_utils.mk
@@ -56,6 +56,7 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE := libmesa_glsl_utils
 LOCAL_IS_HOST_MODULE := true
+LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
 
 LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/glsl \
diff --git a/src/mesa/Android.mesa_gen_matypes.mk 
b/src/mesa/Android.mesa_gen_matypes.mk
index 6e301f9..5521087 100644
--- a/src/mesa/Android.mesa_gen_matypes.mk
+++ b/src/mesa/Android.mesa_gen_matypes.mk
@@ -33,6 +33,7 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE := mesa_gen_matypes
 LOCAL_IS_HOST_MODULE := true
+LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
 
 LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android: add libloader to libGLES_mesa and libmesa_egl_dri2

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: a49ebfab1d093475610e8504cf3400c054e300c0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a49ebfab1d093475610e8504cf3400c054e300c0

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:07 2014 +0300

android: add libloader to libGLES_mesa and libmesa_egl_dri2

This fixes
  src/egl/drivers/dri2/platform_android.c:664: error: undefined reference to 
'loader_set_logger'
  src/egl/drivers/dri2/platform_android.c:678: error: undefined reference to 
'loader_get_driver_for_fd'

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/egl/drivers/dri2/Android.mk |3 +++
 src/egl/main/Android.mk |5 -
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/Android.mk b/src/egl/drivers/dri2/Android.mk
index e46c8a9..2ff62fc 100644
--- a/src/egl/drivers/dri2/Android.mk
+++ b/src/egl/drivers/dri2/Android.mk
@@ -42,6 +42,9 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/loader \
$(DRM_GRALLOC_TOP)
 
+LOCAL_STATIC_LIBRARIES := \
+   libloader
+
 LOCAL_MODULE := libmesa_egl_dri2
 
 include $(MESA_COMMON_MK)
diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk
index 61465da..580289f 100644
--- a/src/egl/main/Android.mk
+++ b/src/egl/main/Android.mk
@@ -154,11 +154,14 @@ LOCAL_STATIC_LIBRARIES := \
libmesa_glsl \
libmesa_glsl_utils \
libmesa_gallium \
-   libloader \
$(LOCAL_STATIC_LIBRARIES)
 
 endif # MESA_BUILD_GALLIUM
 
+LOCAL_STATIC_LIBRARIES := \
+   $(LOCAL_STATIC_LIBRARIES) \
+   libloader
+
 LOCAL_MODULE := libGLES_mesa
 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android, dricore: undefined reference to _mesa_streaming_load_memcpy

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 357a8b6f334da9e78d9cadebb8d729a0d1d38c3d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=357a8b6f334da9e78d9cadebb8d729a0d1d38c3d

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:12 2014 +0300

android, dricore: undefined reference to _mesa_streaming_load_memcpy

_mesa_streaming_load_memcpy is defined in main/streaming-load-memcpy.c
I'm adding it to the dricore lib

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/mesa/Android.libmesa_dricore.mk |5 +
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/Android.libmesa_dricore.mk 
b/src/mesa/Android.libmesa_dricore.mk
index 1332ebf..217f649 100644
--- a/src/mesa/Android.libmesa_dricore.mk
+++ b/src/mesa/Android.libmesa_dricore.mk
@@ -47,6 +47,11 @@ ifeq ($(TARGET_ARCH),x86)
 endif # x86
 endif # MESA_ENABLE_ASM
 
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+LOCAL_SRC_FILES += \
+   $(SRCDIR)main/streaming-load-memcpy.c
+endif
+
 LOCAL_C_INCLUDES := \
$(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
$(MESA_TOP)/src/mapi \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl/dri2/x11: use standard strndup function

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: c153b1f39b60f7a2ba59262b12b4597cbfbf36ca
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c153b1f39b60f7a2ba59262b12b4597cbfbf36ca

Author: Emil Velikov 
Date:   Sun Jun  1 15:19:46 2014 +0100

egl/dri2/x11: use standard strndup function

Using a custom version of the function brings no benefit.

Cc: Chad Versace 
Signed-off-by: Emil Velikov 

---

 src/egl/drivers/dri2/platform_x11.c |   23 ---
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index 874bcc4..548334e 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -481,21 +481,6 @@ dri2_x11_flush_front_buffer(__DRIdrawable * driDrawable, 
void *loaderPrivate)
 #endif
 }
 
-static char *
-dri2_x11_strndup(const char *s, int length)
-{
-   char *d;
-
-   d = malloc(length + 1);
-   if (d == NULL)
-  return NULL;
-
-   memcpy(d, s, length);
-   d[length] = '\0';
-
-   return d;
-}
-
 static EGLBoolean
 dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
 {
@@ -565,14 +550,14 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
 
driver_name = xcb_dri2_connect_driver_name (connect);
dri2_dpy->driver_name =
-  dri2_x11_strndup(driver_name,
-   xcb_dri2_connect_driver_name_length(connect));
+  strndup(driver_name,
+  xcb_dri2_connect_driver_name_length(connect));
 
device_name = xcb_dri2_connect_device_name (connect);
 
dri2_dpy->device_name =
-  dri2_x11_strndup(device_name,
-   xcb_dri2_connect_device_name_length(connect));
+  strndup(device_name,
+  xcb_dri2_connect_device_name_length(connect));
 
if (dri2_dpy->device_name == NULL || dri2_dpy->driver_name == NULL) {
   free(dri2_dpy->device_name);

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): android: add src/gallium/ auxiliary as include path for libmesa_dricore

2014-06-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 0048483f73c0cdd6015f1f8a65b9e9d0fce4e93b
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0048483f73c0cdd6015f1f8a65b9e9d0fce4e93b

Author: Adrian Negreanu 
Date:   Fri Jun  6 12:16:08 2014 +0300

android: add src/gallium/auxiliary as include path for libmesa_dricore

This fixes:
In file included from
/home/adrian/workspace/mesa/mesa-master.git/src/mesa/vbo/vbo_exec_api.c:445:0:
/home/adrian/workspace/mesa/mesa-master.git/src/mesa/vbo/vbo_attrib_tmp.h:28:38:
fatal error: util/u_format_r11g11b10f.h: No such file or directory

Cc: "10.1 10.2" 
Signed-off-by: Adrian Negreanu 
Reviewed-by: Emil Velikov 
Reviewed-by: Juha-Pekka Heikkila 

---

 src/mesa/Android.libmesa_dricore.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/Android.libmesa_dricore.mk 
b/src/mesa/Android.libmesa_dricore.mk
index 0db5825..1332ebf 100644
--- a/src/mesa/Android.libmesa_dricore.mk
+++ b/src/mesa/Android.libmesa_dricore.mk
@@ -50,7 +50,8 @@ endif # MESA_ENABLE_ASM
 LOCAL_C_INCLUDES := \
$(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
$(MESA_TOP)/src/mapi \
-   $(MESA_TOP)/src/glsl
+   $(MESA_TOP)/src/glsl \
+   $(MESA_TOP)/src/gallium/auxiliary
 
 LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_program

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): egl/gallium: Set defines for supported APIs when using automake

2014-06-12 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 607bc899701dda25f7c91ebd2ec2136d4dab0448
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=607bc899701dda25f7c91ebd2ec2136d4dab0448

Author: Niels Ole Salscheider 
Date:   Wed Jun 11 23:13:12 2014 +0200

egl/gallium: Set defines for supported APIs when using automake

This fixes automake builds which are broken since
b52a530ce2aada1967bc8fefa83ab53e6a737dae.

v2: This patch also adds the FEATURE_* defines back to targets/egl-static for
Android and Scons that have been removed in the mentioned commit.

Signed-off-by: Niels Ole Salscheider 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79885
Reviewed-by: Emil Velikov 

---

 src/gallium/state_trackers/egl/Makefile.am |   20 
 src/gallium/targets/egl-static/Android.mk  |2 ++
 src/gallium/targets/egl-static/SConscript  |6 ++
 3 files changed, 28 insertions(+)

diff --git a/src/gallium/state_trackers/egl/Makefile.am 
b/src/gallium/state_trackers/egl/Makefile.am
index b7dcdab..828bf13 100644
--- a/src/gallium/state_trackers/egl/Makefile.am
+++ b/src/gallium/state_trackers/egl/Makefile.am
@@ -88,3 +88,23 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/src/gallium/winsys/sw \
-DHAVE_NULL_BACKEND
 endif
+
+if HAVE_OPENGL
+AM_CPPFLAGS += \
+   -DFEATURE_GL=1
+endif
+
+if HAVE_OPENGL_ES1
+AM_CPPFLAGS += \
+   -DFEATURE_ES1=1
+endif
+
+if HAVE_OPENGL_ES2
+AM_CPPFLAGS += \
+   -DFEATURE_ES2=1
+endif
+
+if HAVE_OPENVG
+AM_CPPFLAGS += \
+   -DFEATURE_VG=1
+endif
diff --git a/src/gallium/targets/egl-static/Android.mk 
b/src/gallium/targets/egl-static/Android.mk
index 01408a7..37244b5 100644
--- a/src/gallium/targets/egl-static/Android.mk
+++ b/src/gallium/targets/egl-static/Android.mk
@@ -31,6 +31,8 @@ LOCAL_SRC_FILES := \
egl_st.c
 
 LOCAL_CFLAGS := \
+   -DFEATURE_ES1=1 \
+   -DFEATURE_ES2=1 \
-D_EGL_MAIN=_eglBuiltInDriverGALLIUM
 
 LOCAL_C_INCLUDES := \
diff --git a/src/gallium/targets/egl-static/SConscript 
b/src/gallium/targets/egl-static/SConscript
index 7d8d4d2..afb5c11 100644
--- a/src/gallium/targets/egl-static/SConscript
+++ b/src/gallium/targets/egl-static/SConscript
@@ -63,6 +63,11 @@ if env['platform'] == 'windows':
 
 # OpenGL ES and OpenGL
 if env['gles']:
+env.Append(CPPDEFINES = [
+'FEATURE_GL=1',
+'FEATURE_ES1=1',
+'FEATURE_ES2=1'
+])
 env.Prepend(LIBPATH = [shared_glapi.dir])
 # manually add LIBPREFIX on windows
 glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
@@ -70,6 +75,7 @@ if env['gles']:
 
 # OpenVG
 if True:
+env.Append(CPPDEFINES = ['FEATURE_VG=1'])
 env.Prepend(LIBPATH = [openvg.dir])
 # manually add LIBPREFIX on windows
 openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure: correctly autodetect xvmc/vdpau/omx

2014-06-12 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 816d392b586ecd95bd5b2dc24945bb9fc5d73d6e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=816d392b586ecd95bd5b2dc24945bb9fc5d73d6e

Author: Emil Velikov 
Date:   Wed Jun 11 22:15:58 2014 +0100

configure: correctly autodetect xvmc/vdpau/omx

Commit e62b7d38a1d (configure: autodetect video state-trackers
when non swrast driver is present) added a check that caused
the autodetection to be omitted when we have the swrast gallium
driver. Whereas it should have skipped the VL targets when only
swrast was selected.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79907
Cc: "10.2" 
Signed-off-by: Emil Velikov 
Reviewed-by: Christian König 

---

 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d897ac6..390adaa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1393,7 +1393,7 @@ AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes)
 dnl
 dnl Gallium G3DVL configuration
 dnl
-if test -n "$with_gallium_drivers" && ! echo "$with_gallium_drivers" | grep -q 
'swrast'; then
+if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
 if test "x$enable_xvmc" = xauto; then
PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no])
 fi

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): target-helpers: add dd_configuration(), dd_driver_name()

2014-06-19 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 86c30c6c5b0d06b36b369c29a0a9264a2d1819d9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=86c30c6c5b0d06b36b369c29a0a9264a2d1819d9

Author: Emil Velikov 
Date:   Sun May 18 00:20:47 2014 +0100

target-helpers: add dd_configuration(), dd_driver_name()

Add a couple of helpers to be used by the dri targets when
built with static pipe-drivers. Both functions provide
functionality required by the dri state-tracker.

With this patch ilo, nouveau and r300 gain support for
throttle dri configuration.

Signed-off-by: Emil Velikov 

---

 .../auxiliary/target-helpers/inline_drm_helper.h   |   78 
 src/gallium/include/state_tracker/drm_driver.h |4 +
 2 files changed, 82 insertions(+)

diff --git a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h 
b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
index e039a82..a03db3a 100644
--- a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
@@ -203,4 +203,82 @@ dd_create_screen(int fd)
   return NULL;
 }
 
+inline const char *
+dd_driver_name(void)
+{
+   return driver_name;
+}
+
+static const struct drm_conf_ret throttle_ret = {
+   .type = DRM_CONF_INT,
+   .val.val_int = 2,
+};
+
+static const struct drm_conf_ret share_fd_ret = {
+   .type = DRM_CONF_BOOL,
+   .val.val_int = true,
+};
+
+static const struct drm_conf_ret *
+configuration_query(enum drm_conf conf)
+{
+   switch (conf) {
+   case DRM_CONF_THROTTLE:
+  return &throttle_ret;
+   case DRM_CONF_SHARE_FD:
+  return &share_fd_ret;
+   default:
+  break;
+   }
+   return NULL;
+}
+
+inline const struct drm_conf_ret *
+dd_configuration(enum drm_conf conf)
+{
+   if (!driver_name)
+  return NULL;
+
+#if defined(GALLIUM_I915)
+   if (strcmp(driver_name, "i915") == 0)
+  return NULL;
+   else
+#endif
+#if defined(GALLIUM_ILO)
+   if (strcmp(driver_name, "i965") == 0)
+  return configuration_query(conf);
+   else
+#endif
+#if defined(GALLIUM_NOUVEAU)
+   if (strcmp(driver_name, "nouveau") == 0)
+  return configuration_query(conf);
+   else
+#endif
+#if defined(GALLIUM_R300)
+   if (strcmp(driver_name, "r300") == 0)
+  return configuration_query(conf);
+   else
+#endif
+#if defined(GALLIUM_R600)
+   if (strcmp(driver_name, "r600") == 0)
+  return configuration_query(conf);
+   else
+#endif
+#if defined(GALLIUM_RADEONSI)
+   if (strcmp(driver_name, "radeonsi") == 0)
+  return configuration_query(conf);
+   else
+#endif
+#if defined(GALLIUM_VMWGFX)
+   if (strcmp(driver_name, "vmwgfx") == 0)
+  return configuration_query(conf);
+   else
+#endif
+#if defined(GALLIUM_FREEDRENO)
+   if ((strcmp(driver_name, "kgsl") == 0) || (strcmp(driver_name, "msm") == 0))
+  return NULL;
+   else
+#endif
+  return NULL;
+}
 #endif /* INLINE_DRM_HELPER_H */
diff --git a/src/gallium/include/state_tracker/drm_driver.h 
b/src/gallium/include/state_tracker/drm_driver.h
index ea07685..740c4bb 100644
--- a/src/gallium/include/state_tracker/drm_driver.h
+++ b/src/gallium/include/state_tracker/drm_driver.h
@@ -119,4 +119,8 @@ struct drm_driver_descriptor driver_descriptor = {  
   \
 
 extern struct pipe_screen *dd_create_screen(int fd);
 
+extern const char *dd_driver_name(void);
+
+extern const struct drm_conf_ret *dd_configuration(enum drm_conf conf);
+
 #endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): targets/pipe-loader: add driver specific drm_configuration

2014-06-19 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 665a4d9d9b883324dbe9ba7ff55c9cb8201bc6b3
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=665a4d9d9b883324dbe9ba7ff55c9cb8201bc6b3

Author: Emil Velikov 
Date:   Sat May 17 18:53:36 2014 +0100

targets/pipe-loader: add driver specific drm_configuration

Signed-off-by: Emil Velikov 

---

 src/gallium/targets/pipe-loader/pipe_nouveau.c  |   25 ++-
 src/gallium/targets/pipe-loader/pipe_r300.c |   25 ++-
 src/gallium/targets/pipe-loader/pipe_r600.c |   25 ++-
 src/gallium/targets/pipe-loader/pipe_radeonsi.c |   25 ++-
 src/gallium/targets/pipe-loader/pipe_vmwgfx.c   |   25 ++-
 5 files changed, 120 insertions(+), 5 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/pipe_nouveau.c 
b/src/gallium/targets/pipe-loader/pipe_nouveau.c
index 65425e8..825b36f 100644
--- a/src/gallium/targets/pipe-loader/pipe_nouveau.c
+++ b/src/gallium/targets/pipe-loader/pipe_nouveau.c
@@ -17,5 +17,28 @@ create_screen(int fd)
return screen;
 }
 
+static const struct drm_conf_ret throttle_ret = {
+   .type = DRM_CONF_INT,
+   .val.val_int = 2,
+};
+
+static const struct drm_conf_ret share_fd_ret = {
+   .type = DRM_CONF_BOOL,
+   .val.val_int = true,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+   switch (conf) {
+   case DRM_CONF_THROTTLE:
+  return &throttle_ret;
+   case DRM_CONF_SHARE_FD:
+  return &share_fd_ret;
+   default:
+  break;
+   }
+   return NULL;
+}
+
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, NULL)
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_r300.c 
b/src/gallium/targets/pipe-loader/pipe_r300.c
index 6ab7e74..abcade4 100644
--- a/src/gallium/targets/pipe-loader/pipe_r300.c
+++ b/src/gallium/targets/pipe-loader/pipe_r300.c
@@ -13,5 +13,28 @@ create_screen(int fd)
return sws ? debug_screen_wrap(sws->screen) : NULL;
 }
 
+static const struct drm_conf_ret throttle_ret = {
+   .type = DRM_CONF_INT,
+   .val.val_int = 2,
+};
+
+static const struct drm_conf_ret share_fd_ret = {
+   .type = DRM_CONF_BOOL,
+   .val.val_int = true,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+   switch (conf) {
+   case DRM_CONF_THROTTLE:
+  return &throttle_ret;
+   case DRM_CONF_SHARE_FD:
+  return &share_fd_ret;
+   default:
+  break;
+   }
+   return NULL;
+}
+
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_r600.c 
b/src/gallium/targets/pipe-loader/pipe_r600.c
index 2e6bd42..eb53637 100644
--- a/src/gallium/targets/pipe-loader/pipe_r600.c
+++ b/src/gallium/targets/pipe-loader/pipe_r600.c
@@ -13,5 +13,28 @@ create_screen(int fd)
return rw ? debug_screen_wrap(rw->screen) : NULL;
 }
 
+static const struct drm_conf_ret throttle_ret = {
+   .type = DRM_CONF_INT,
+   .val.val_int = 2,
+};
+
+static const struct drm_conf_ret share_fd_ret = {
+   .type = DRM_CONF_BOOL,
+   .val.val_int = true,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+   switch (conf) {
+   case DRM_CONF_THROTTLE:
+  return &throttle_ret;
+   case DRM_CONF_SHARE_FD:
+  return &share_fd_ret;
+   default:
+  break;
+   }
+   return NULL;
+}
+
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_radeonsi.c 
b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
index 9a8feae..1dcd781 100644
--- a/src/gallium/targets/pipe-loader/pipe_radeonsi.c
+++ b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
@@ -13,5 +13,28 @@ create_screen(int fd)
return rw ? debug_screen_wrap(rw->screen) : NULL;
 }
 
+static const struct drm_conf_ret throttle_ret = {
+   .type = DRM_CONF_INT,
+   .val.val_int = 2,
+};
+
+static const struct drm_conf_ret share_fd_ret = {
+   .type = DRM_CONF_BOOL,
+   .val.val_int = true,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+   switch (conf) {
+   case DRM_CONF_THROTTLE:
+  return &throttle_ret;
+   case DRM_CONF_SHARE_FD:
+  return &share_fd_ret;
+   default:
+  break;
+   }
+   return NULL;
+}
+
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("radeonsi", "radeon", create_screen, NULL)
+DRM_DRIVER_DESCRIPTOR("radeonsi", "radeon", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_vmwgfx.c 
b/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
index bfe665b..71015df 100644
--- a/src/gallium/targets/pi

Mesa (master): pipe-loader: add pipe_loader_ops::configuration()

2014-06-19 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 36ff20027c43cd7115f1b6f073e4094582f643b6
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=36ff20027c43cd7115f1b6f073e4094582f643b6

Author: Emil Velikov 
Date:   Sat May 17 15:31:32 2014 +0100

pipe-loader: add pipe_loader_ops::configuration()

Required for the dri state-tracker. Will be used to retrieve
driver specific configuration parameters:
 - share_fd (dmabuf) capability
 - throttle

Signed-off-by: Emil Velikov 

---

 src/gallium/auxiliary/pipe-loader/pipe_loader.c|7 ++
 src/gallium/auxiliary/pipe-loader/pipe_loader.h|   11 +
 .../auxiliary/pipe-loader/pipe_loader_drm.c|   24 
 .../auxiliary/pipe-loader/pipe_loader_priv.h   |3 +++
 src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c |8 +++
 5 files changed, 53 insertions(+)

diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c 
b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 2639763..8e79f85 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -61,6 +61,13 @@ pipe_loader_release(struct pipe_loader_device **devs, int 
ndev)
   devs[i]->ops->release(&devs[i]);
 }
 
+const struct drm_conf_ret *
+pipe_loader_configuration(struct pipe_loader_device *dev,
+  enum drm_conf conf)
+{
+   return dev->ops->configuration(dev, conf);
+}
+
 struct pipe_screen *
 pipe_loader_create_screen(struct pipe_loader_device *dev,
   const char *library_paths)
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h 
b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index caef6c1..8ff00b1 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -34,6 +34,7 @@
 #define PIPE_LOADER_H
 
 #include "pipe/p_compiler.h"
+#include "state_tracker/drm_driver.h"
 
 #ifdef HAVE_PIPE_LOADER_XLIB
 #include 
@@ -94,6 +95,16 @@ pipe_loader_create_screen(struct pipe_loader_device *dev,
   const char *library_paths);
 
 /**
+ * Query the configuration parameters for the specified device.
+ *
+ * \param dev Device that will be queried.
+ * \param conf The drm_conf id of the option to be queried.
+ */
+const struct drm_conf_ret *
+pipe_loader_configuration(struct pipe_loader_device *dev,
+  enum drm_conf conf);
+
+/**
  * Release resources allocated for a list of devices.
  *
  * Should be called when the specified devices are no longer in use to
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c 
b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 2e5b74b..1bbaf19 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -261,6 +261,29 @@ pipe_loader_drm_release(struct pipe_loader_device **dev)
*dev = NULL;
 }
 
+static const struct drm_conf_ret *
+pipe_loader_drm_configuration(struct pipe_loader_device *dev,
+  enum drm_conf conf)
+{
+   struct pipe_loader_drm_device *ddev = pipe_loader_drm_device(dev);
+   const struct drm_driver_descriptor *dd;
+
+   if (!ddev->lib)
+  return NULL;
+
+   dd = (const struct drm_driver_descriptor *)
+  util_dl_get_proc_address(ddev->lib, "driver_descriptor");
+
+   /* sanity check on the name */
+   if (!dd || strcmp(dd->name, ddev->base.driver_name) != 0)
+  return NULL;
+
+   if (!dd->configuration)
+  return NULL;
+
+   return dd->configuration(conf);
+}
+
 static struct pipe_screen *
 pipe_loader_drm_create_screen(struct pipe_loader_device *dev,
   const char *library_paths)
@@ -285,5 +308,6 @@ pipe_loader_drm_create_screen(struct pipe_loader_device 
*dev,
 
 static struct pipe_loader_ops pipe_loader_drm_ops = {
.create_screen = pipe_loader_drm_create_screen,
+   .configuration = pipe_loader_drm_configuration,
.release = pipe_loader_drm_release
 };
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h 
b/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
index 476c0ad..d3b0252 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
@@ -34,6 +34,9 @@ struct pipe_loader_ops {
struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev,
 const char *library_paths);
 
+   const struct drm_conf_ret *(*configuration)(struct pipe_loader_device *dev,
+   enum drm_conf conf);
+
void (*release)(struct pipe_loader_device **dev);
 };
 
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c 
b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index fa317f2..b1b1ca6 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -1

Mesa (master): configure: add HAVE_GALLIUM_STATIC_TARGETS

2014-06-19 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 949beb0b84bb5b6a24b62ca19df9d44ff64be120
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=949beb0b84bb5b6a24b62ca19df9d44ff64be120

Author: Emil Velikov 
Date:   Fri May 16 15:09:26 2014 +0100

configure: add HAVE_GALLIUM_STATIC_TARGETS

Will be used to control the linking mode of pipe-drivers
in gallium targets.

Keep this hardcoded to static, as the pipe-drivers bare
an unstable interface which we do not want to expose to
the normal user.

Signed-off-by: Emil Velikov 

---

 configure.ac |4 
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index 9c0c77d..8f86154 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2057,6 +2057,10 @@ AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test 
"x$HAVE_GALLIUM_SVGA" = xyes -
 AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_SOFTPIPE" = 
xyes \
   && test "x$MESA_LLVM" = x1)
 
+# Enable static gallium targets for now.
+# Do not touch this unless you know what you are doing.
+AM_CONDITIONAL(HAVE_GALLIUM_STATIC_TARGETS, test "xyes" = xyes)
+
 # NOTE: anything using xcb or other client side libs ends up in separate
 #   _CLIENT variables.  The pipe loader is built in two variants,
 #   one that is standalone and does not link any x client libs (for

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): target-helpers: add dd_create_screen() helper

2014-06-19 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 573b55e302dcf47ed6c2fe327ce720d72118921b
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=573b55e302dcf47ed6c2fe327ce720d72118921b

Author: Emil Velikov 
Date:   Wed May 14 18:50:15 2014 +0100

target-helpers: add dd_create_screen() helper

Will be used by gallium targets that statically link the
pipe-drivers in the final library. Provides identical
functionality to device_descriptor.create_screan.

v2:
 - Don't sw_screen_wrap the i915/svga screen.

Signed-off-by: Emil Velikov 

---

 .../auxiliary/target-helpers/inline_drm_helper.h   |  206 
 src/gallium/include/state_tracker/drm_driver.h |2 +
 2 files changed, 208 insertions(+)

diff --git a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h 
b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
new file mode 100644
index 000..e039a82
--- /dev/null
+++ b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
@@ -0,0 +1,206 @@
+#ifndef INLINE_DRM_HELPER_H
+#define INLINE_DRM_HELPER_H
+
+#include "state_tracker/drm_driver.h"
+#include "target-helpers/inline_debug_helper.h"
+#include "loader.h"
+
+#if GALLIUM_I915
+#include "i915/drm/i915_drm_public.h"
+#include "i915/i915_public.h"
+#endif
+
+#if GALLIUM_ILO
+#include "intel/intel_winsys.h"
+#include "ilo/ilo_public.h"
+#endif
+
+#if GALLIUM_NOUVEAU
+#include "nouveau/drm/nouveau_drm_public.h"
+#endif
+
+#if GALLIUM_R300
+#include "radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_drm_public.h"
+#include "r300/r300_public.h"
+#endif
+
+#if GALLIUM_R600
+#include "radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_drm_public.h"
+#include "r600/r600_public.h"
+#endif
+
+#if GALLIUM_RADEONSI
+#include "radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_drm_public.h"
+#include "radeonsi/si_public.h"
+#endif
+
+#if GALLIUM_VMWGFX
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
+#endif
+
+#if GALLIUM_FREEDRENO
+#include "freedreno/drm/freedreno_drm_public.h"
+#endif
+
+static char* driver_name = NULL;
+
+/* XXX: We need to teardown the winsys if *screen_create() fails. */
+
+#if defined(GALLIUM_I915)
+static struct pipe_screen *
+pipe_i915_create_screen(int fd)
+{
+   struct i915_winsys *iws;
+   struct pipe_screen *screen;
+
+   iws = i915_drm_winsys_create(fd);
+   if (!iws)
+  return NULL;
+
+   screen = i915_screen_create(iws);
+   return screen ? debug_screen_wrap(screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_ILO)
+static struct pipe_screen *
+pipe_ilo_create_screen(int fd)
+{
+   struct intel_winsys *iws;
+   struct pipe_screen *screen;
+
+   iws = intel_winsys_create_for_fd(fd);
+   if (!iws)
+  return NULL;
+
+   screen = ilo_screen_create(iws);
+   return screen ? debug_screen_wrap(screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_NOUVEAU)
+static struct pipe_screen *
+pipe_nouveau_create_screen(int fd)
+{
+   struct pipe_screen *screen;
+
+   screen = nouveau_drm_screen_create(fd);
+   return screen ? debug_screen_wrap(screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_R300)
+static struct pipe_screen *
+pipe_r300_create_screen(int fd)
+{
+   struct radeon_winsys *rw;
+
+   rw = radeon_drm_winsys_create(fd, r300_screen_create);
+   return rw ? debug_screen_wrap(rw->screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_R600)
+static struct pipe_screen *
+pipe_r600_create_screen(int fd)
+{
+   struct radeon_winsys *rw;
+
+   rw = radeon_drm_winsys_create(fd, r600_screen_create);
+   return rw ? debug_screen_wrap(rw->screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_RADEONSI)
+static struct pipe_screen *
+pipe_radeonsi_create_screen(int fd)
+{
+   struct radeon_winsys *rw;
+
+   rw = radeon_drm_winsys_create(fd, radeonsi_screen_create);
+   return rw ? debug_screen_wrap(rw->screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_VMWGFX)
+static struct pipe_screen *
+pipe_vmwgfx_create_screen(int fd)
+{
+   struct svga_winsys_screen *sws;
+   struct pipe_screen *screen;
+
+   sws = svga_drm_winsys_screen_create(fd);
+   if (!sws)
+  return NULL;
+
+   screen = svga_screen_create(sws);
+   return screen ? debug_screen_wrap(screen) : NULL;
+}
+#endif
+
+#if defined(GALLIUM_FREEDRENO)
+static struct pipe_screen *
+pipe_freedreno_create_screen(int fd)
+{
+   struct pipe_screen *screen;
+
+   screen = fd_drm_screen_create(fd);
+   return screen ? debug_screen_wrap(screen) : NULL;
+}
+#endif
+
+inline struct pipe_screen *
+dd_create_screen(int fd)
+{
+   driver_name = loader_get_driver_for_fd(fd, _LOADER_GALLIUM);
+   if (!driver_name)
+  return NULL;
+
+#if defined(GALLIUM_I915)
+   if (strcmp(driver_name, "i915") == 0)
+  return pipe_i915_create_screen(fd);
+   else
+#endif
+#if defined(GALLIUM_ILO)
+   if (strcmp(driver_name, "i965") ==

  1   2   3   4   5   6   7   8   9   10   >