[PATCH vkd3d 6/6] vkd3d-compiler: Actually use "main" as the default entrypoint.

Henri Verbeet hverbeet at gmail.com
Wed Jan 27 08:20:24 CST 2021


On Tue, 26 Jan 2021 at 20:27, Matteo Bruni <mbruni at codeweavers.com> wrote:
> -    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";
Perhaps it's worth being explicit about this in vkd3d-compiler, but
strictly speaking this is superfluous. The "entry_point" fields in
both struct vkd3d_shader_hlsl_source_info and struct
vkd3d_shader_spirv_target_info are specified to be "main" if NULL.



More information about the wine-devel mailing list