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