zink: hook up driconf

we need this

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7009>
This commit is contained in:
Mike Blumenkrantz 2020-09-23 15:42:18 -04:00
parent f984654da8
commit e3b814d5e9
4 changed files with 21 additions and 7 deletions

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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);
}