From 42e7a373429ba4397a700bc567723646fcb237b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 10 Jun 2016 19:25:01 +0200 Subject: [PATCH] vtest: add VTEST_USE_GLX environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows to select the glx backend with vtest. Signed-off-by: Marc-André Lureau --- vtest/vtest_renderer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c index 91c6c35..3b8fe1a 100644 --- a/vtest/vtest_renderer.c +++ b/vtest/vtest_renderer.c @@ -113,13 +113,16 @@ int vtest_create_renderer(int in_fd, int out_fd, uint32_t length) { char *vtestname; int ret; + int ctx = VIRGL_RENDERER_USE_EGL; renderer.in_fd = in_fd; renderer.out_fd = out_fd; + if (getenv("VTEST_USE_GLX")) + ctx = VIRGL_RENDERER_USE_GLX; + ret = virgl_renderer_init(&renderer, - VIRGL_RENDERER_USE_EGL | - VIRGL_RENDERER_THREAD_SYNC, &vtest_cbs); + ctx | VIRGL_RENDERER_THREAD_SYNC, &vtest_cbs); if (ret) { fprintf(stderr, "failed to initialise renderer.\n"); return -1;