mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-compiler: Set default source type before handling --print-target-types.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b523122ef3
commit
5399f6fcc6
@ -480,14 +480,14 @@ 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)
|
if (options->source_type == VKD3D_SHADER_SOURCE_NONE)
|
||||||
options->source_type = options->preprocess_only ? VKD3D_SHADER_SOURCE_HLSL : VKD3D_SHADER_SOURCE_DXBC_TPF;
|
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)
|
if (options->target_type == VKD3D_SHADER_TARGET_NONE && !options->preprocess_only)
|
||||||
options->target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
|
options->target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
|
||||||
|
|
||||||
|
if (options->print_target_types)
|
||||||
|
return true;
|
||||||
|
|
||||||
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…
Reference in New Issue
Block a user