diff options
author | Emil Velikov <[email protected]> | 2015-10-14 21:31:24 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-11-21 12:52:18 +0000 |
commit | ff9cd8a67cabe4a7bbfec941666a216617f18103 (patch) | |
tree | d691ed3371c4d23e965f950a80e86260165eef3c /src/gallium/auxiliary/pipe-loader | |
parent | 4e3c06a501cbba8cc463c3c244d6cb838e3be782 (diff) |
pipe-loader: directly use pipe_loader_sw_probe_null() at probe time
Due to the nature of the other sw winsys' we cannot use them during the
generic probe stage. As such there is little point in keeping the
abstraction layer.
Cc: Tom Stellard <[email protected]>
Cc: Francisco Jerez <[email protected]>
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/pipe_loader_sw.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c index 4b6e884cd9f..c61f2b8882c 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c @@ -46,10 +46,6 @@ struct pipe_loader_sw_device { static struct pipe_loader_ops pipe_loader_sw_ops; -static struct sw_winsys *(*backends[])() = { - null_sw_create -}; - static bool pipe_loader_sw_probe_init_common(struct pipe_loader_sw_device *sdev) { @@ -124,16 +120,11 @@ pipe_loader_sw_probe_null(struct pipe_loader_device **devs) int pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev) { - int i; - - for (i = 0; i < Elements(backends); i++) { - if (i < ndev) { - struct pipe_loader_sw_device *sdev = CALLOC_STRUCT(pipe_loader_sw_device); - /* TODO: handle CALLOC_STRUCT failure */ + int i = 1; - sdev->ws = backends[i](); - pipe_loader_sw_probe_init_common(sdev); - devs[i] = &sdev->base; + if (i < ndev) { + if (!pipe_loader_sw_probe_null(devs)) { + i--; } } |