[PATCH vkd3d 3/6] vkd3d-compiler: Require a source type with --print-target-types.

Henri Verbeet hverbeet at gmail.com
Wed Jan 27 08:19:57 CST 2021


On Tue, 26 Jan 2021 at 20:27, Matteo Bruni <mbruni at codeweavers.com> wrote:
>      if (options->print_target_types)
> +    {
> +        if (options->source_type == VKD3D_SHADER_SOURCE_NONE)
> +        {
> +            fprintf(stderr, "You need to specify a source type when using the --print-target-types option.\n");
> +            return false;
> +        }
>          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;
>
It looks like this was broken by
6d5fd68f1d9dc2bb4c74e41c12f5cba2e9b81e88 for --print-target-types, but
in 1.2 and before, if no explicit source type was specified, it would
default to VKD3D_SHADER_SOURCE_DXBC_TPF. It would seem best to retain
that behaviour. In practice, that would mean simply moving the
"print_target_types" return a couple of lines down, until after the
default source and target types are resolved.



More information about the wine-devel mailing list