|
|
|
@ -91,6 +91,7 @@ struct vtest_server |
|
|
|
|
bool use_gles; |
|
|
|
|
|
|
|
|
|
bool venus; |
|
|
|
|
bool render_server; |
|
|
|
|
|
|
|
|
|
int ctx_flags; |
|
|
|
|
|
|
|
|
@ -163,6 +164,7 @@ while (__AFL_LOOP(1000)) { |
|
|
|
|
#define OPT_USE_GLES 'e' |
|
|
|
|
#define OPT_RENDERNODE 'r' |
|
|
|
|
#define OPT_VENUS 'v' |
|
|
|
|
#define OPT_RENDER_SERVER 'n' |
|
|
|
|
|
|
|
|
|
static void vtest_server_parse_args(int argc, char **argv) |
|
|
|
|
{ |
|
|
|
@ -177,6 +179,7 @@ static void vtest_server_parse_args(int argc, char **argv) |
|
|
|
|
{"use-gles", no_argument, NULL, OPT_USE_GLES}, |
|
|
|
|
{"rendernode", required_argument, NULL, OPT_RENDERNODE}, |
|
|
|
|
{"venus", no_argument, NULL, OPT_VENUS}, |
|
|
|
|
{"render-server", no_argument, NULL, OPT_RENDER_SERVER}, |
|
|
|
|
{0, 0, 0, 0} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -216,6 +219,11 @@ static void vtest_server_parse_args(int argc, char **argv) |
|
|
|
|
case OPT_VENUS: |
|
|
|
|
server.venus = true; |
|
|
|
|
break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef ENABLE_RENDER_SERVER |
|
|
|
|
case OPT_RENDER_SERVER: |
|
|
|
|
server.render_server = true; |
|
|
|
|
break; |
|
|
|
|
#endif |
|
|
|
|
default: |
|
|
|
|
printf("Usage: %s [--no-fork] [--no-loop-or-fork] [--multi-clients] " |
|
|
|
@ -223,6 +231,9 @@ static void vtest_server_parse_args(int argc, char **argv) |
|
|
|
|
"[--rendernode <dev>]" |
|
|
|
|
#ifdef ENABLE_VENUS |
|
|
|
|
" [--venus]" |
|
|
|
|
#endif |
|
|
|
|
#ifdef ENABLE_RENDER_SERVER |
|
|
|
|
" [--render-server]" |
|
|
|
|
#endif |
|
|
|
|
" [file]\n", argv[0]); |
|
|
|
|
exit(EXIT_FAILURE); |
|
|
|
@ -255,6 +266,9 @@ static void vtest_server_parse_args(int argc, char **argv) |
|
|
|
|
if (server.venus) { |
|
|
|
|
server.ctx_flags |= VIRGL_RENDERER_VENUS; |
|
|
|
|
} |
|
|
|
|
if (server.render_server) { |
|
|
|
|
server.ctx_flags |= VIRGL_RENDERER_RENDER_SERVER; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void vtest_server_getenv(void) |
|
|
|
|