gallium: Add pipe loader for device enumeration and driver multiplexing.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 25 Apr 2012 20:16:00 +0000 (22:16 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 May 2012 10:39:43 +0000 (12:39 +0200)
commite1364530622a26f11c79694429cf84418a0b7ef7
tree9de616021c489130ea64751659cb0622ebd991d3
parent2faf01c8403514dda15ab8b1a2309d5529dd06ba
gallium: Add pipe loader for device enumeration and driver multiplexing.

The goal is to have a uniform interface to create winsys and
pipe_screen instances for any driver, exposing the device enumeration
capabilities that might be supported by the operating system (for now
there's a "drm" back-end using udev and a "sw" back-end that always
returns the same built-in devices).

The typical use case of this library will be:
>
> struct pipe_loader_device devs[n];
> struct pipe_screen *screen;
>
> pipe_loader_probe(&devs, n);
>[pick some device from the array...]
>
> screen = pipe_loader_create_screen(dev, library_search_path);
>[do something with screen...]
>
> screen->destroy(screen);
> pipe_loader_release(&devs, N);
>

A part of the code was taken from targets/gbm/pipe_loader.c, which
will be removed and replaced with calls into this library by a future
commit.
configs/autoconf.in
configure.ac
src/gallium/auxiliary/Makefile
src/gallium/auxiliary/Makefile.sources
src/gallium/auxiliary/pipe-loader/Makefile.am [new file with mode: 0644]
src/gallium/auxiliary/pipe-loader/pipe_loader.c [new file with mode: 0644]
src/gallium/auxiliary/pipe-loader/pipe_loader.h [new file with mode: 0644]
src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c [new file with mode: 0644]
src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h [new file with mode: 0644]
src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c [new file with mode: 0644]