diff options
author | Gert Wollny <[email protected]> | 2019-04-10 13:54:14 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-06-20 08:50:38 +0200 |
commit | 30eb1fdc51d96d443a755138acc425da9e949466 (patch) | |
tree | 5f72b34b9ff2f3b47358b52ab911bf90be25381b /src/gallium/auxiliary/target-helpers | |
parent | cf800998af2b3d57beff972d7e154db6d0944b21 (diff) |
gallium/virgl: Add code path for virgl to read driconf
This works only for the drm variant of virgl and not for the vtest
variant.
v2: Rebase, replace the configuration query function by a pointer to
the configuration data.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Emil Velikov <[email protected]> (v1)
Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers')
4 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index 6bdd1a008db..6c5902d3c27 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -249,10 +249,14 @@ pipe_virgl_create_screen(int fd, const struct pipe_screen_config *config) { struct pipe_screen *screen; - screen = virgl_drm_screen_create(fd); + screen = virgl_drm_screen_create(fd, config); return screen ? debug_screen_wrap(screen) : NULL; } +const char *virgl_driconf_xml = + #include "virgl/virgl_driinfo.h" + ; + #else struct pipe_screen * @@ -262,6 +266,8 @@ pipe_virgl_create_screen(int fd, const struct pipe_screen_config *config) return NULL; } +const char *virgl_driconf_xml = NULL; + #endif #ifdef GALLIUM_VC4 diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index a3cb9279fd5..99018f0df88 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -7,6 +7,7 @@ struct pipe_screen_config; const char *iris_driconf_xml; const char *radeonsi_driconf_xml; const char *v3d_driconf_xml; +const char *virgl_driconf_xml; struct pipe_screen * pipe_i915_create_screen(int fd, const struct pipe_screen_config *config); diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h index 5bb77a5bde2..36146cf1e37 100644 --- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h @@ -41,7 +41,7 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) if (screen == NULL && strcmp(driver, "virpipe") == 0) { struct virgl_winsys *vws; vws = virgl_vtest_winsys_wrap(winsys); - screen = virgl_create_screen(vws); + screen = virgl_create_screen(vws, NULL); } #endif diff --git a/src/gallium/auxiliary/target-helpers/sw_helper.h b/src/gallium/auxiliary/target-helpers/sw_helper.h index 5e4e9f78af6..953412a3ff5 100644 --- a/src/gallium/auxiliary/target-helpers/sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/sw_helper.h @@ -43,7 +43,7 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) if (screen == NULL && strcmp(driver, "virpipe") == 0) { struct virgl_winsys *vws; vws = virgl_vtest_winsys_wrap(winsys); - screen = virgl_create_screen(vws); + screen = virgl_create_screen(vws, NULL); } #endif |