vkd3d-compiler: Properly forward argument validation failures.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani 2022-01-07 11:50:55 +01:00 committed by Alexandre Julliard
parent 758b984c41
commit 9375950450

View File

@ -686,13 +686,13 @@ int main(int argc, char **argv)
fprintf(stderr, "Target type '%s' is invalid for source type '%s'.\n",
get_target_type_info(options.target_type)->name,
get_source_type_info(options.source_type)->name);
return 0;
return 1;
}
if (!options.preprocess_only && options.source_type == VKD3D_SHADER_SOURCE_HLSL && !options.profile)
{
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return 0;
return 1;
}
if (!options.filename && get_source_type_info(options.source_type)->is_binary && isatty(fileno(input)))