vtest: add venus renderer support

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Chia-I Wu 4 years ago
parent 360b73d2b2
commit 37830779eb
  1. 21
      vtest/vtest_server.c

@ -21,6 +21,11 @@
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
* *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include <stdbool.h> #include <stdbool.h>
@ -85,6 +90,8 @@ struct vtest_server
bool use_egl_surfaceless; bool use_egl_surfaceless;
bool use_gles; bool use_gles;
bool venus;
int ctx_flags; int ctx_flags;
struct list_head new_clients; struct list_head new_clients;
@ -155,6 +162,7 @@ while (__AFL_LOOP(1000)) {
#define OPT_USE_EGL_SURFACELESS 's' #define OPT_USE_EGL_SURFACELESS 's'
#define OPT_USE_GLES 'e' #define OPT_USE_GLES 'e'
#define OPT_RENDERNODE 'r' #define OPT_RENDERNODE 'r'
#define OPT_VENUS 'v'
static void vtest_server_parse_args(int argc, char **argv) static void vtest_server_parse_args(int argc, char **argv)
{ {
@ -168,6 +176,7 @@ static void vtest_server_parse_args(int argc, char **argv)
{"use-egl-surfaceless", no_argument, NULL, OPT_USE_EGL_SURFACELESS}, {"use-egl-surfaceless", no_argument, NULL, OPT_USE_EGL_SURFACELESS},
{"use-gles", no_argument, NULL, OPT_USE_GLES}, {"use-gles", no_argument, NULL, OPT_USE_GLES},
{"rendernode", required_argument, NULL, OPT_RENDERNODE}, {"rendernode", required_argument, NULL, OPT_RENDERNODE},
{"venus", no_argument, NULL, OPT_VENUS},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
@ -203,10 +212,18 @@ static void vtest_server_parse_args(int argc, char **argv)
case OPT_RENDERNODE: case OPT_RENDERNODE:
server.render_device = optarg; server.render_device = optarg;
break; break;
#ifdef ENABLE_VENUS
case OPT_VENUS:
server.venus = true;
break;
#endif
default: default:
printf("Usage: %s [--no-fork] [--no-loop-or-fork] [--multi-clients] " printf("Usage: %s [--no-fork] [--no-loop-or-fork] [--multi-clients] "
"[--use-glx] [--use-egl-surfaceless] [--use-gles] " "[--use-glx] [--use-egl-surfaceless] [--use-gles] "
"[--rendernode <dev>]" "[--rendernode <dev>]"
#ifdef ENABLE_VENUS
" [--venus]"
#endif
" [file]\n", argv[0]); " [file]\n", argv[0]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
break; break;
@ -234,6 +251,10 @@ static void vtest_server_parse_args(int argc, char **argv)
if (server.use_gles) if (server.use_gles)
server.ctx_flags |= VIRGL_RENDERER_USE_GLES; server.ctx_flags |= VIRGL_RENDERER_USE_GLES;
} }
if (server.venus) {
server.ctx_flags |= VIRGL_RENDERER_VENUS;
}
} }
static void vtest_server_getenv(void) static void vtest_server_getenv(void)

Loading…
Cancel
Save