Mesa (staging/21.3): lima: disasm: use last argument as a filename
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 1 00:23:45 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 8e8dee202a10b7550eebf1366f9e29c9a20e4cca
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e8dee202a10b7550eebf1366f9e29c9a20e4cca
Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date: Fri Nov 26 18:02:59 2021 -0800
lima: disasm: use last argument as a filename
Otherwise it fails to open a file.
Fixes: 9660427ab7b3 ("lima: Print usage if --help is any of the arguments.")
Reviewed-by: Andreas Baierl <ichgeh at imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13968>
(cherry picked from commit 711a4ccddbaa251cba5cbda36c684f5f642458e6)
---
.pick_status.json | 2 +-
src/gallium/drivers/lima/standalone/lima_disasm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 392baa6d330..4ab8f9b21cb 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -247,7 +247,7 @@
"description": "lima: disasm: use last argument as a filename",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "9660427ab7b3fd18a250189667b826086529160e"
},
diff --git a/src/gallium/drivers/lima/standalone/lima_disasm.c b/src/gallium/drivers/lima/standalone/lima_disasm.c
index f54bfc35991..9c8278cddd9 100644
--- a/src/gallium/drivers/lima/standalone/lima_disasm.c
+++ b/src/gallium/drivers/lima/standalone/lima_disasm.c
@@ -166,7 +166,7 @@ main(int argc, char **argv)
}
char *filename = NULL;
- filename = argv[n];
+ filename = argv[argc - 1];
uint32_t size = 0;
uint32_t *prog = extract_shader_binary(filename, &size, &is_frag);
More information about the mesa-commit
mailing list