Module: Mesa Branch: master Commit: e3b814d5e9e414839d5e4de3a76bb2899cbb7249 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3b814d5e9e414839d5e4de3a76bb2899cbb7249
Author: Mike Blumenkrantz <[email protected]> Date: Wed Sep 23 15:42:18 2020 -0400 zink: hook up driconf we need this Reviewed-by: Hoe Hao Cheng <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7009> --- src/gallium/auxiliary/target-helpers/drm_helper.h | 8 ++++++-- src/gallium/drivers/zink/driinfo_zink.h | 9 +++++++++ src/gallium/drivers/zink/zink_public.h | 3 ++- src/gallium/drivers/zink/zink_screen.c | 8 ++++---- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index c0cf2d341f6..ef872fc10b2 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -377,10 +377,14 @@ static 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); + screen = zink_drm_create_screen(fd, config); return screen ? debug_screen_wrap(screen) : NULL; } -DRM_DRIVER_DESCRIPTOR(zink, NULL, 0) + +const driOptionDescription zink_driconf[] = { + #include "zink/driinfo_zink.h" +}; +DRM_DRIVER_DESCRIPTOR(zink, zink_driconf, ARRAY_SIZE(zink_driconf)) #else DRM_DRIVER_DESCRIPTOR_STUB(zink) diff --git a/src/gallium/drivers/zink/driinfo_zink.h b/src/gallium/drivers/zink/driinfo_zink.h new file mode 100644 index 00000000000..e637ccd4512 --- /dev/null +++ b/src/gallium/drivers/zink/driinfo_zink.h @@ -0,0 +1,9 @@ +// zink specific driconf options + +DRI_CONF_SECTION_DEBUG + DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(false) +DRI_CONF_SECTION_END + +DRI_CONF_SECTION_PERFORMANCE + +DRI_CONF_SECTION_END diff --git a/src/gallium/drivers/zink/zink_public.h b/src/gallium/drivers/zink/zink_public.h index be772f51ee8..a5a4f6bca42 100644 --- a/src/gallium/drivers/zink/zink_public.h +++ b/src/gallium/drivers/zink/zink_public.h @@ -26,10 +26,11 @@ struct pipe_screen; struct sw_winsys; +struct pipe_screen_config; struct pipe_screen * zink_create_screen(struct sw_winsys *winsys); struct pipe_screen * -zink_drm_create_screen(int fd); +zink_drm_create_screen(int fd, const struct pipe_screen_config *config); #endif diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index c36d75baa48..44f84dce9df 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -795,7 +795,7 @@ load_device_extensions(struct zink_screen *screen) } static struct pipe_screen * -zink_internal_create_screen(struct sw_winsys *winsys, int fd) +zink_internal_create_screen(struct sw_winsys *winsys, int fd, const struct pipe_screen_config *config) { struct zink_screen *screen = CALLOC_STRUCT(zink_screen); if (!screen) @@ -876,11 +876,11 @@ fail: struct pipe_screen * zink_create_screen(struct sw_winsys *winsys) { - return zink_internal_create_screen(winsys, -1); + return zink_internal_create_screen(winsys, -1, NULL); } struct pipe_screen * -zink_drm_create_screen(int fd) +zink_drm_create_screen(int fd, const struct pipe_screen_config *config) { - return zink_internal_create_screen(NULL, fd); + return zink_internal_create_screen(NULL, fd, config); } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
