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

Matteo Bruni matteo.mystral at gmail.com
Wed Jan 27 08:33:43 CST 2021


On Wed, Jan 27, 2021 at 3:20 PM Henri Verbeet <hverbeet at gmail.com> wrote:
>
> 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.

Pretty sure it crashed for me without this hunk. I'll have another
look and fix it properly, if necessary.



More information about the wine-devel mailing list