summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-10-14 16:37:37 +0100
committerEmil Velikov <[email protected]>2015-11-21 12:52:18 +0000
commit74d41a32bc179425e866f8afa33a222488ea7760 (patch)
tree7f3c766ab1585845c4bb7b635d698adaebcb4427 /src/gallium/auxiliary/pipe-loader
parentcbc4d9730a7c48744fe7ac62d55b40a80e8fc2e2 (diff)
gallium: remove library_path argument from pipe_loader_create_screen()
Currently the location is determined at configure/build time and consistently copied across gallium. Just remove the extra argument, and use PIPE_SEARCH_DIR where appropriate. This will allow us to remove the duplication in the *configuration and *screen_create APIs by moving util_dl_get_proc_address() and friends to probe time. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader')
-rw-r--r--src/gallium/auxiliary/pipe-loader/Makefile.am1
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.c5
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.h6
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c5
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h3
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c5
6 files changed, 9 insertions, 16 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am
index e12620c4418..1597b79598e 100644
--- a/src/gallium/auxiliary/pipe-loader/Makefile.am
+++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
@@ -5,6 +5,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
-I$(top_srcdir)/src/loader \
-I$(top_srcdir)/src/gallium/winsys \
+ -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
$(GALLIUM_PIPE_LOADER_DEFINES) \
$(GALLIUM_CFLAGS) \
$(VISIBILITY_CFLAGS)
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 0ca2e8ce4cd..40df2167797 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -69,10 +69,9 @@ pipe_loader_configuration(struct pipe_loader_device *dev,
}
struct pipe_screen *
-pipe_loader_create_screen(struct pipe_loader_device *dev,
- const char *library_paths)
+pipe_loader_create_screen(struct pipe_loader_device *dev)
{
- return dev->ops->create_screen(dev, library_paths);
+ return dev->ops->create_screen(dev);
}
struct util_dl_library *
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index 8eba8a6f008..690d088ed82 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -82,13 +82,9 @@ pipe_loader_probe(struct pipe_loader_device **devs, int ndev);
* Create a pipe_screen for the specified device.
*
* \param dev Device the screen will be created for.
- * \param library_paths Colon-separated list of filesystem paths that
- * will be used to look for the pipe driver
- * module that handles this device.
*/
struct pipe_screen *
-pipe_loader_create_screen(struct pipe_loader_device *dev,
- const char *library_paths);
+pipe_loader_create_screen(struct pipe_loader_device *dev);
/**
* Query the configuration parameters for the specified device.
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 1799df7e4c5..3b858e7425c 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -165,14 +165,13 @@ pipe_loader_drm_configuration(struct pipe_loader_device *dev,
}
static struct pipe_screen *
-pipe_loader_drm_create_screen(struct pipe_loader_device *dev,
- const char *library_paths)
+pipe_loader_drm_create_screen(struct pipe_loader_device *dev)
{
struct pipe_loader_drm_device *ddev = pipe_loader_drm_device(dev);
const struct drm_driver_descriptor *dd;
if (!ddev->lib)
- ddev->lib = pipe_loader_find_module(dev, library_paths);
+ ddev->lib = pipe_loader_find_module(&ddev->base, PIPE_SEARCH_DIR);
if (!ddev->lib)
return NULL;
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h b/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
index d3b025221c5..da2ca8c6e1f 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
@@ -31,8 +31,7 @@
#include "pipe_loader.h"
struct pipe_loader_ops {
- struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev,
- const char *library_paths);
+ struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev);
const struct drm_conf_ret *(*configuration)(struct pipe_loader_device *dev,
enum drm_conf conf);
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index 86039a35ef7..c79f7c9ee34 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -180,14 +180,13 @@ pipe_loader_sw_configuration(struct pipe_loader_device *dev,
}
static struct pipe_screen *
-pipe_loader_sw_create_screen(struct pipe_loader_device *dev,
- const char *library_paths)
+pipe_loader_sw_create_screen(struct pipe_loader_device *dev)
{
struct pipe_loader_sw_device *sdev = pipe_loader_sw_device(dev);
struct pipe_screen *(*init)(struct sw_winsys *);
if (!sdev->lib)
- sdev->lib = pipe_loader_find_module(dev, library_paths);
+ sdev->lib = pipe_loader_find_module(&sdev->base, PIPE_SEARCH_DIR);
if (!sdev->lib)
return NULL;