Commit 42e7a373 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

vtest: add VTEST_USE_GLX environment variable

Allows to select the glx backend with vtest.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 209557f4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment