Mesa (master): glsl/standalone: point which arguments are mandatory
Alejandro Pinheiro
apinheiro at kemper.freedesktop.org
Fri Jan 5 07:57:38 UTC 2018
Module: Mesa
Branch: master
Commit: 937b210551ef7c243976f0c0240395827a72ef8b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=937b210551ef7c243976f0c0240395827a72ef8b
Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date: Thu Jan 4 16:38:00 2018 +0100
glsl/standalone: point which arguments are mandatory
Every now and then I execute the standalone compiler, get the
non-version error, and need to remember what I'm doing wrong
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/compiler/glsl/main.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/compiler/glsl/main.cpp b/src/compiler/glsl/main.cpp
index 123e41f9dc..e082bd6975 100644
--- a/src/compiler/glsl/main.cpp
+++ b/src/compiler/glsl/main.cpp
@@ -62,7 +62,10 @@ usage_fail(const char *name)
"Possible options are:\n";
printf(header, name);
for (const struct option *o = compiler_opts; o->name != 0; ++o) {
- printf(" --%s\n", o->name);
+ printf(" --%s", o->name);
+ if (o->has_arg == required_argument)
+ printf(" (mandatory)");
+ printf("\n");
}
exit(EXIT_FAILURE);
}
More information about the mesa-commit
mailing list