Module: Mesa
Branch: master
Commit: 937b210551ef7c243976f0c0240395827a72ef8b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=937b210551ef7c243976f0c0240395827a72ef8b

Author: Alejandro PiƱeiro <apinhe...@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.roman...@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);
 }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to