[Mesa-dev] [PATCH shader-db 2/4] run: add -o option to override loaded driver
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Feb 16 12:29:49 UTC 2017
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
run.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/run.c b/run.c
index d2ec8c6..62c19c8 100644
--- a/run.c
+++ b/run.c
@@ -307,7 +307,7 @@ const struct platform platforms[] = {
void print_usage(const char *prog_name)
{
fprintf(stderr,
- "Usage: %s [-d <device>] [-j <max_threads>] [-p <platform>] <directories and *.shader_test files>\n"
+ "Usage: %s [-d <device>] [-j <max_threads>] [-o <driver>] [-p <platform>] <directories and *.shader_test files>\n"
"Other options: \n"
" -1 Disable multi-threading\n",
prog_name);
@@ -335,7 +335,7 @@ main(int argc, char **argv)
max_threads = omp_get_max_threads();
- while((opt = getopt(argc, argv, "1d:j:p:")) != -1) {
+ while((opt = getopt(argc, argv, "1d:j:o:p:")) != -1) {
switch(opt) {
case 'd': {
char *endptr;
@@ -347,6 +347,10 @@ main(int argc, char **argv)
}
break;
}
+ case 'o':
+ printf("### Overriding driver for %s ###\n", optarg);
+ setenv("MESA_LOADER_DRIVER_OVERRIDE", optarg, 1);
+ break;
case 'p': {
const struct platform *platform = NULL;
for (unsigned i = 0; i < ARRAY_SIZE(platforms); i++) {
--
2.11.0
More information about the mesa-dev
mailing list