Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- programs/vkd3d-compiler/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 0928568..ff83872 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -502,10 +502,16 @@ 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) + if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL) { - fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n"); - return false; + if (!options->profile) + { + fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n"); + return false; + } + + if (!options->entry_point) + options->entry_point = "main"; }
if (optind < argc)