From 9d6be9530b95f7774657915b5c46dc390a736362 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Tue, 26 Jan 2021 20:26:36 +0100 Subject: [PATCH] vkd3d-compiler: Require a profile specification when compiling HLSL sources. Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- programs/vkd3d-compiler/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index f1e597a0..94cce202 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -496,6 +496,12 @@ static bool parse_command_line(int argc, char **argv, struct options *options) return false; } + 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 false; + } + if (optind < argc) options->filename = argv[argc - 1];