target-helpers: If neither softpipe or llvmpipe is used just return the screen
authorJakob Bornecrantz <jakob@vmware.com>
Mon, 9 Jan 2012 12:36:20 +0000 (13:36 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Tue, 10 Jan 2012 14:53:18 +0000 (15:53 +0100)
So the targets can drop the sw_wrapper winsys when no sw driver is being used.

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by Brian Paul <brianp@vmware.com>

src/gallium/auxiliary/target-helpers/inline_wrapper_sw_helper.h

index e4effa713e9ff8f9f9291ea99ef494ed9c1b478c..0a2e215352bcf9265a84daa655d6813158ed22e4 100644 (file)
@@ -12,6 +12,7 @@
 static INLINE struct pipe_screen *
 sw_screen_wrap(struct pipe_screen *screen)
 {
+#if defined(GALLIUM_SOFTPIPE) || defined(GALLIUM_LLVMPIPE)
    struct sw_winsys *sws;
    struct pipe_screen *sw_screen = NULL;
    const char *driver;
@@ -34,6 +35,7 @@ sw_screen_wrap(struct pipe_screen *screen)
 err_winsys:
    return wrapper_sw_winsys_dewrap_pipe_screen(sws);
 err:
+#endif
    return screen;
 }