diff options
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c index b1b1ca61f7b..3d332645231 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c @@ -31,6 +31,7 @@ #include "util/u_dl.h" #include "sw/dri/dri_sw_winsys.h" #include "sw/null/null_sw_winsys.h" +#include "sw/wrapper/wrapper_sw_winsys.h" #ifdef HAVE_PIPE_LOADER_XLIB /* Explicitly wrap the header to ease build without X11 headers */ #include "sw/xlib/xlib_sw_winsys.h" @@ -140,6 +141,28 @@ pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev) return i; } +boolean +pipe_loader_sw_probe_wrapped(struct pipe_loader_device **dev, + struct pipe_screen *screen) +{ + struct pipe_loader_sw_device *sdev = CALLOC_STRUCT(pipe_loader_sw_device); + + if (!sdev) + return false; + + sdev->base.type = PIPE_LOADER_DEVICE_SOFTWARE; + sdev->base.driver_name = "swrast"; + sdev->base.ops = &pipe_loader_sw_ops; + sdev->ws = wrapper_sw_winsys_wrap_pipe_screen(screen); + + if (!sdev->ws) { + FREE(sdev); + return false; + } + *dev = &sdev->base; + return true; +} + static void pipe_loader_sw_release(struct pipe_loader_device **dev) { |