mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-compiler: Default to HLSL as a source format when preprocessing.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
10ab0ff124
commit
6d5fd68f1d
@ -397,8 +397,8 @@ static bool parse_command_line(int argc, char **argv, struct options *options)
|
|||||||
};
|
};
|
||||||
|
|
||||||
memset(options, 0, sizeof(*options));
|
memset(options, 0, sizeof(*options));
|
||||||
options->source_type = VKD3D_SHADER_SOURCE_DXBC_TPF;
|
options->source_type = VKD3D_SHADER_SOURCE_NONE;
|
||||||
options->target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
|
options->target_type = VKD3D_SHADER_TARGET_NONE;
|
||||||
options->formatting = VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT
|
options->formatting = VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT
|
||||||
| VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER;
|
| 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)
|
if (options->print_target_types)
|
||||||
return true;
|
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))
|
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",
|
fprintf(stderr, "Target type '%s' is invalid for source type '%s'.\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user