diff options
author | Dave Airlie <airlied@gmail.com> | 2021-06-01 13:14:51 +1000 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2021-06-14 06:34:05 +1000 |
commit | f3630548f1da904ec6c63b43ece7e68afdb8867e (patch) | |
tree | 05cfc909591aba9d8bf4bdeb9ba32ce8db2c58f4 /src/gallium/auxiliary | |
parent | 8da92b5c0a358e30be557cae3303a4027b24db1c (diff) |
crocus: initial gallium driver for Intel gfx 4-7
This is a gallium driver for the Intel gfx 4-7 GPUs.
It was initially cloned from the iris driver by Ilia Mirkin,
then I ported over large reams of code from i965 until it worked.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11146>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper.h | 20 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper_public.h | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c index 8147c3ca346..ca5bf121a88 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c @@ -70,6 +70,7 @@ static const struct pipe_loader_ops pipe_loader_drm_ops; static const struct drm_driver_descriptor *driver_descriptors[] = { &i915_driver_descriptor, &iris_driver_descriptor, + &crocus_driver_descriptor, &nouveau_driver_descriptor, &r300_driver_descriptor, &r600_driver_descriptor, diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index 6bab07a40e7..ff4621e1a88 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -112,6 +112,26 @@ DRM_DRIVER_DESCRIPTOR(iris, iris_driconf, ARRAY_SIZE(iris_driconf)) DRM_DRIVER_DESCRIPTOR_STUB(iris) #endif +#ifdef GALLIUM_CROCUS +#include "crocus/drm/crocus_drm_public.h" + +static struct pipe_screen * +pipe_crocus_create_screen(int fd, const struct pipe_screen_config *config) +{ + struct pipe_screen *screen; + + screen = crocus_drm_screen_create(fd, config); + return screen ? debug_screen_wrap(screen) : NULL; +} + +const driOptionDescription crocus_driconf[] = { + #include "crocus/driinfo_crocus.h" +}; +DRM_DRIVER_DESCRIPTOR(crocus, crocus_driconf, ARRAY_SIZE(crocus_driconf)) +#else +DRM_DRIVER_DESCRIPTOR_STUB(crocus) +#endif + #ifdef GALLIUM_NOUVEAU #include "nouveau/drm/nouveau_drm_public.h" diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index 5fd3084dfdb..478e72b8525 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -6,6 +6,7 @@ struct pipe_screen_config; extern const struct drm_driver_descriptor i915_driver_descriptor; extern const struct drm_driver_descriptor iris_driver_descriptor; +extern const struct drm_driver_descriptor crocus_driver_descriptor; extern const struct drm_driver_descriptor nouveau_driver_descriptor; extern const struct drm_driver_descriptor r300_driver_descriptor; extern const struct drm_driver_descriptor r600_driver_descriptor; |