[PATCH vkd3d 6/6] vkd3d-compiler: Actually use "main" as the default entrypoint.
Matteo Bruni
mbruni at codeweavers.com
Tue Jan 26 13:26:37 CST 2021
Signed-off-by: Matteo Bruni <mbruni at 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)
--
2.26.2
More information about the wine-devel
mailing list