diff options
author | Emil Velikov <[email protected]> | 2015-10-17 21:51:24 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-11-21 12:52:18 +0000 |
commit | d54ca54faa2a6dde3c4d2125fd41d10dfcf2f91e (patch) | |
tree | 31d1e226b627bddcfa21e0d9a27da26b903d89b3 /src/gallium/targets/pipe-loader/pipe_swrast.c | |
parent | f58a6f7be3efa6a13d7ac321f304de2703870def (diff) |
pipe-loader: rework the sw backend
Move the winsys into the pipe-target, similar to the hardware
pipe-driver.
v2:
- move int declaration outside of loop (Brian)
- fold the teardown into a goto + separate function.
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/targets/pipe-loader/pipe_swrast.c')
-rw-r--r-- | src/gallium/targets/pipe-loader/pipe_swrast.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/gallium/targets/pipe-loader/pipe_swrast.c b/src/gallium/targets/pipe-loader/pipe_swrast.c index f7f354acf3f..cf617f37e20 100644 --- a/src/gallium/targets/pipe-loader/pipe_swrast.c +++ b/src/gallium/targets/pipe-loader/pipe_swrast.c @@ -1,7 +1,11 @@ #include "target-helpers/inline_sw_helper.h" #include "target-helpers/inline_debug_helper.h" -#include "state_tracker/drm_driver.h" +#include "state_tracker/sw_driver.h" +#include "sw/dri/dri_sw_winsys.h" +#include "sw/kms-dri/kms_dri_sw_winsys.h" +#include "sw/null/null_sw_winsys.h" +#include "sw/wrapper/wrapper_sw_winsys.h" PUBLIC struct pipe_screen * swrast_create_screen(struct sw_winsys *ws); @@ -17,3 +21,31 @@ swrast_create_screen(struct sw_winsys *ws) return screen; } + +PUBLIC +struct sw_driver_descriptor swrast_driver_descriptor = { + .create_screen = swrast_create_screen, + .winsys = { +#ifdef HAVE_PIPE_LOADER_DRI + { + .name = "dri", + .create_winsys = dri_create_sw_winsys, + }, +#endif +#ifdef HAVE_PIPE_LOADER_KMS + { + .name = "kms_dri", + .create_winsys = kms_dri_create_winsys, + }, +#endif + { + .name = "null", + .create_winsys = null_sw_create, + }, + { + .name = "wrapped", + .create_winsys = wrapper_sw_winsys_wrap_pipe_screen, + }, + { 0 }, + } +}; |