Skip to content
Snippets Groups Projects
Commit 6d5fd68f authored by Elizabeth Figura's avatar Elizabeth Figura Committed by Alexandre Julliard
Browse files

vkd3d-compiler: Default to HLSL as a source format when preprocessing.

parent 10ab0ff1
No related branches found
No related tags found
No related merge requests found
......@@ -397,8 +397,8 @@ static bool parse_command_line(int argc, char **argv, struct options *options)
};
memset(options, 0, sizeof(*options));
options->source_type = VKD3D_SHADER_SOURCE_DXBC_TPF;
options->target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
options->source_type = VKD3D_SHADER_SOURCE_NONE;
options->target_type = VKD3D_SHADER_TARGET_NONE;
options->formatting = VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT
| VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER;
......@@ -483,6 +483,11 @@ static bool parse_command_line(int argc, char **argv, struct options *options)
if (options->print_target_types)
return true;
if (options->source_type == VKD3D_SHADER_SOURCE_NONE)
options->source_type = options->preprocess_only ? VKD3D_SHADER_SOURCE_HLSL : VKD3D_SHADER_SOURCE_DXBC_TPF;
if (options->target_type == VKD3D_SHADER_TARGET_NONE && !options->preprocess_only)
options->target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
if (!options->preprocess_only && !validate_target_type(options->source_type, options->target_type))
{
fprintf(stderr, "Target type '%s' is invalid for source type '%s'.\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment