diff options
author | Dave Airlie <[email protected]> | 2018-10-02 23:27:36 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-28 08:51:43 +0000 |
commit | 9fa7400564244bdd333066eb71285c3703b537f7 (patch) | |
tree | 42eeead155acf0e18a5fda823799f7e0ce72b62b /src/gallium/auxiliary/target-helpers | |
parent | 4249e4a598a3057af71e095e70b98cf710d325ad (diff) |
zink: add dri loader
export MESA_LOADER_DRIVER_OVERRIDE=zink should now work without using
swrast paths
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers')
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper.h | 22 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper_public.h | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index 6c5902d3c27..01b65d6c7f8 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -414,4 +414,26 @@ pipe_lima_create_screen(int fd, const struct pipe_screen_config *config) #endif +#ifdef GALLIUM_ZINK +#include "zink/zink_public.h" + +struct pipe_screen * +pipe_zink_create_screen(int fd, const struct pipe_screen_config *config) +{ + struct pipe_screen *screen; + screen = zink_drm_create_screen(fd); + return screen ? debug_screen_wrap(screen) : NULL; +} + +#else + +struct pipe_screen * +pipe_zink_create_screen(int fd, const struct pipe_screen_config *config) +{ + fprintf(stderr, "zink: driver missing\n"); + return NULL; +} + +#endif + #endif /* DRM_HELPER_H */ diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index 99018f0df88..82dfe9e2575 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -60,4 +60,8 @@ pipe_tegra_create_screen(int fd, const struct pipe_screen_config *config); struct pipe_screen * pipe_lima_create_screen(int fd, const struct pipe_screen_config *config); +struct pipe_screen * +pipe_zink_create_screen(int fd, const struct pipe_screen_config *config); + + #endif /* _DRM_HELPER_PUBLIC_H */ |