vtest: add VTEST_USE_GLX environment variable

Allows to select the glx backend with vtest.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent 209557f455
commit 42e7a37342
  1. 7
      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;

Loading…
Cancel
Save