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