diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
commit | 051645c92924bf915d82bf219f2ed67309b5577a (patch) | |
tree | 4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/auxiliary/target-helpers | |
parent | 2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff) |
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/target-helpers')
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h | 116 | ||||
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper_public.h | 29 |
2 files changed, 97 insertions, 48 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h b/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h index 90820d3fe..0027ede23 100644 --- a/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -10,7 +10,7 @@ #include "i915/i915_public.h" struct pipe_screen * -pipe_i915_create_screen(int fd) +pipe_i915_create_screen(int fd, unsigned flags) { struct i915_winsys *iws; struct pipe_screen *screen; @@ -26,7 +26,7 @@ pipe_i915_create_screen(int fd) #else struct pipe_screen * -pipe_i915_create_screen(int fd) +pipe_i915_create_screen(int fd, unsigned flags) { fprintf(stderr, "i915g: driver missing\n"); return NULL; @@ -34,53 +34,47 @@ pipe_i915_create_screen(int fd) #endif -#ifdef GALLIUM_ILO -#include "intel/drm/intel_drm_public.h" -#include "ilo/ilo_public.h" +#ifdef GALLIUM_NOUVEAU +#include "nouveau/drm/nouveau_drm_public.h" struct pipe_screen * -pipe_ilo_create_screen(int fd) +pipe_nouveau_create_screen(int fd, unsigned flags) { - struct intel_winsys *iws; struct pipe_screen *screen; - iws = intel_winsys_create_for_fd(fd); - if (!iws) - return NULL; - - screen = ilo_screen_create(iws); + screen = nouveau_drm_screen_create(fd); return screen ? debug_screen_wrap(screen) : NULL; } #else struct pipe_screen * -pipe_ilo_create_screen(int fd) +pipe_nouveau_create_screen(int fd, unsigned flags) { - fprintf(stderr, "ilo: driver missing\n"); + fprintf(stderr, "nouveau: driver missing\n"); return NULL; } #endif -#ifdef GALLIUM_NOUVEAU -#include "nouveau/drm/nouveau_drm_public.h" +#ifdef GALLIUM_PL111 +#include "pl111/drm/pl111_drm_public.h" struct pipe_screen * -pipe_nouveau_create_screen(int fd) +pipe_pl111_create_screen(int fd, unsigned flags) { struct pipe_screen *screen; - screen = nouveau_drm_screen_create(fd); + screen = pl111_drm_screen_create(fd); return screen ? debug_screen_wrap(screen) : NULL; } #else struct pipe_screen * -pipe_nouveau_create_screen(int fd) +pipe_pl111_create_screen(int fd, unsigned flags) { - fprintf(stderr, "nouveau: driver missing\n"); + fprintf(stderr, "pl111: driver missing\n"); return NULL; } @@ -92,18 +86,18 @@ pipe_nouveau_create_screen(int fd) #include "r300/r300_public.h" struct pipe_screen * -pipe_r300_create_screen(int fd) +pipe_r300_create_screen(int fd, unsigned flags) { struct radeon_winsys *rw; - rw = radeon_drm_winsys_create(fd, r300_screen_create); + rw = radeon_drm_winsys_create(fd, flags, r300_screen_create); return rw ? debug_screen_wrap(rw->screen) : NULL; } #else struct pipe_screen * -pipe_r300_create_screen(int fd) +pipe_r300_create_screen(int fd, unsigned flags) { fprintf(stderr, "r300: driver missing\n"); return NULL; @@ -117,18 +111,18 @@ pipe_r300_create_screen(int fd) #include "r600/r600_public.h" struct pipe_screen * -pipe_r600_create_screen(int fd) +pipe_r600_create_screen(int fd, unsigned flags) { struct radeon_winsys *rw; - rw = radeon_drm_winsys_create(fd, r600_screen_create); + rw = radeon_drm_winsys_create(fd, flags, r600_screen_create); return rw ? debug_screen_wrap(rw->screen) : NULL; } #else struct pipe_screen * -pipe_r600_create_screen(int fd) +pipe_r600_create_screen(int fd, unsigned flags) { fprintf(stderr, "r600: driver missing\n"); return NULL; @@ -143,15 +137,15 @@ pipe_r600_create_screen(int fd) #include "radeonsi/si_public.h" struct pipe_screen * -pipe_radeonsi_create_screen(int fd) +pipe_radeonsi_create_screen(int fd, unsigned flags) { struct radeon_winsys *rw; /* First, try amdgpu. */ - rw = amdgpu_winsys_create(fd, radeonsi_screen_create); + rw = amdgpu_winsys_create(fd, flags, radeonsi_screen_create); if (!rw) - rw = radeon_drm_winsys_create(fd, radeonsi_screen_create); + rw = radeon_drm_winsys_create(fd, flags, radeonsi_screen_create); return rw ? debug_screen_wrap(rw->screen) : NULL; } @@ -159,7 +153,7 @@ pipe_radeonsi_create_screen(int fd) #else struct pipe_screen * -pipe_radeonsi_create_screen(int fd) +pipe_radeonsi_create_screen(int fd, unsigned flags) { fprintf(stderr, "radeonsi: driver missing\n"); return NULL; @@ -172,7 +166,7 @@ pipe_radeonsi_create_screen(int fd) #include "svga/svga_public.h" struct pipe_screen * -pipe_vmwgfx_create_screen(int fd) +pipe_vmwgfx_create_screen(int fd, unsigned flags) { struct svga_winsys_screen *sws; struct pipe_screen *screen; @@ -188,7 +182,7 @@ pipe_vmwgfx_create_screen(int fd) #else struct pipe_screen * -pipe_vmwgfx_create_screen(int fd) +pipe_vmwgfx_create_screen(int fd, unsigned flags) { fprintf(stderr, "svga: driver missing\n"); return NULL; @@ -200,7 +194,7 @@ pipe_vmwgfx_create_screen(int fd) #include "freedreno/drm/freedreno_drm_public.h" struct pipe_screen * -pipe_freedreno_create_screen(int fd) +pipe_freedreno_create_screen(int fd, unsigned flags) { struct pipe_screen *screen; @@ -211,7 +205,7 @@ pipe_freedreno_create_screen(int fd) #else struct pipe_screen * -pipe_freedreno_create_screen(int fd) +pipe_freedreno_create_screen(int fd, unsigned flags) { fprintf(stderr, "freedreno: driver missing\n"); return NULL; @@ -224,7 +218,7 @@ pipe_freedreno_create_screen(int fd) #include "virgl/virgl_public.h" struct pipe_screen * -pipe_virgl_create_screen(int fd) +pipe_virgl_create_screen(int fd, unsigned flags) { struct pipe_screen *screen; @@ -235,7 +229,7 @@ pipe_virgl_create_screen(int fd) #else struct pipe_screen * -pipe_virgl_create_screen(int fd) +pipe_virgl_create_screen(int fd, unsigned flags) { fprintf(stderr, "virgl: driver missing\n"); return NULL; @@ -247,7 +241,7 @@ pipe_virgl_create_screen(int fd) #include "vc4/drm/vc4_drm_public.h" struct pipe_screen * -pipe_vc4_create_screen(int fd) +pipe_vc4_create_screen(int fd, unsigned flags) { struct pipe_screen *screen; @@ -258,7 +252,7 @@ pipe_vc4_create_screen(int fd) #else struct pipe_screen * -pipe_vc4_create_screen(int fd) +pipe_vc4_create_screen(int fd, unsigned flags) { fprintf(stderr, "vc4: driver missing\n"); return NULL; @@ -266,5 +260,51 @@ pipe_vc4_create_screen(int fd) #endif +#ifdef GALLIUM_ETNAVIV +#include "etnaviv/drm/etnaviv_drm_public.h" + +struct pipe_screen * +pipe_etna_create_screen(int fd, unsigned flags) +{ + struct pipe_screen *screen; + + screen = etna_drm_screen_create(fd); + return screen ? debug_screen_wrap(screen) : NULL; +} + +#else + +struct pipe_screen * +pipe_etna_create_screen(int fd, unsigned flags) +{ + fprintf(stderr, "etnaviv: driver missing\n"); + return NULL; +} + +#endif + +#ifdef GALLIUM_IMX +#include "imx/drm/imx_drm_public.h" + +struct pipe_screen * +pipe_imx_drm_create_screen(int fd, unsigned flags) +{ + struct pipe_screen *screen; + + screen = imx_drm_screen_create(fd); + return screen ? debug_screen_wrap(screen) : NULL; +} + +#else + +struct pipe_screen * +pipe_imx_drm_create_screen(int fd, unsigned flags) +{ + fprintf(stderr, "imx-drm: driver missing\n"); + return NULL; +} + +#endif + #endif /* DRM_HELPER_H */ diff --git a/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper_public.h index d1f9382a6..d4adc880d 100644 --- a/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/lib/mesa/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -5,33 +5,42 @@ struct pipe_screen; struct pipe_screen * -pipe_i915_create_screen(int fd); +pipe_i915_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_ilo_create_screen(int fd); +pipe_ilo_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_nouveau_create_screen(int fd); +pipe_nouveau_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_r300_create_screen(int fd); +pipe_r300_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_r600_create_screen(int fd); +pipe_r600_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_radeonsi_create_screen(int fd); +pipe_radeonsi_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_vmwgfx_create_screen(int fd); +pipe_vmwgfx_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_freedreno_create_screen(int fd); +pipe_freedreno_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_virgl_create_screen(int fd); +pipe_virgl_create_screen(int fd, unsigned flags); struct pipe_screen * -pipe_vc4_create_screen(int fd); +pipe_vc4_create_screen(int fd, unsigned flags); + +struct pipe_screen * +pipe_pl111_create_screen(int fd, unsigned flags); + +struct pipe_screen * +pipe_etna_create_screen(int fd, unsigned flags); + +struct pipe_screen * +pipe_imx_drm_create_screen(int fd, unsigned flags); #endif /* _DRM_HELPER_PUBLIC_H */ |