CLI: Fix silly regression with handling of -V.
This commit is contained in:
parent
0e5078dc0c
commit
ce18d1b8a5
3
main.cpp
3
main.cpp
@ -94,7 +94,7 @@ struct CLIParser
|
||||
const char *next = *argv++;
|
||||
argc--;
|
||||
|
||||
if ((next[0] != '-' || next[1] != '-') && cbs.default_handler)
|
||||
if (*next != '-' && cbs.default_handler)
|
||||
{
|
||||
cbs.default_handler(next);
|
||||
}
|
||||
@ -1572,6 +1572,7 @@ static int main_inner(int argc, char *argv[])
|
||||
cbs.add("--emit-line-directives", [&args](CLIParser &) { args.emit_line_directives = true; });
|
||||
|
||||
cbs.default_handler = [&args](const char *value) { args.input = value; };
|
||||
cbs.add("-", [&args](CLIParser &) { args.input = "-"; });
|
||||
cbs.error_handler = [] { print_help(); };
|
||||
|
||||
CLIParser parser{ move(cbs), argc - 1, argv + 1 };
|
||||
|
@ -545,7 +545,7 @@ def cross_compile(shader, vulkan, spirv, invalid_spirv, eliminate, is_legacy, fl
|
||||
glsl_path = None
|
||||
|
||||
if (vulkan or spirv) and (not is_legacy):
|
||||
subprocess.check_call([spirv_cross_path, '--entry', 'main', '--vulkan-semantics', '--output', vulkan_glsl_path, spirv_path] + extra_args)
|
||||
subprocess.check_call([spirv_cross_path, '--entry', 'main', '-V', '--output', vulkan_glsl_path, spirv_path] + extra_args)
|
||||
validate_shader(vulkan_glsl_path, True, paths)
|
||||
# SPIR-V shaders might just want to validate Vulkan GLSL output, we don't always care about the output.
|
||||
if not vulkan:
|
||||
|
Loading…
Reference in New Issue
Block a user