[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH v3 3/3] d3dcompiler: Store some builtin types in the hlsl_ctx structure.
From:       Matteo Bruni <matteo.mystral () gmail ! com>
Date:       2020-05-30 16:49:39
Message-ID: CABvNrtMJVkUWdEtQLevWtm2rGOP9thPy8qi51JRDJRpLku9YWg () mail ! gmail ! com
[Download RAW message or body]

On Sat, May 30, 2020 at 5:22 PM Zebediah Figura <zfigura@codeweavers.com> wrote:
> 
> 
> 
> On 5/29/20 4:32 PM, Matteo Bruni wrote:
> > On Fri, May 22, 2020 at 10:46 PM Zebediah Figura <z.figura12@gmail.com> wrote:
> > > 
> > > Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
> > > ---
> > > v3: remove some earlier variable names...
> > > 
> > > dlls/d3dcompiler_43/d3dcompiler_private.h |   8 ++
> > > dlls/d3dcompiler_43/hlsl.y                | 132 +++++++++++-----------
> > > 2 files changed, 76 insertions(+), 64 deletions(-)
> > > 
> > > diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
> > > index 058a627dc27..4d89c61ef44 100644
> > > --- a/dlls/d3dcompiler_43/hlsl.y
> > > +++ b/dlls/d3dcompiler_43/hlsl.y
> > > @@ -234,12 +243,23 @@ static void declare_predefined_types(struct hlsl_scope \
> > > *scope) sprintf(name, "%s", names[bt]);
> > > type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_SCALAR, bt, x, y);
> > > add_type_to_scope(scope, type);
> > > +                        hlsl_ctx.builtin_types.scalar[bt] = type;
> > > }
> > > }
> > > }
> > > }
> > > }
> > > 
> > > +    for (bt = 0; bt <= HLSL_SAMPLER_DIM_MAX; ++bt)
> > > +    {
> > > +        type = new_hlsl_type(d3dcompiler_strdup(sampler_names[bt]), \
> > > HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); +        type->sampler_dim = bt;
> > > +        hlsl_ctx.builtin_types.sampler[bt] = type;
> > > +    }
> > > +
> > > +    hlsl_ctx.builtin_types.Void = new_hlsl_type(d3dcompiler_strdup("void"), \
> > > HLSL_CLASS_OBJECT, HLSL_TYPE_VOID, 1, 1); +    add_type_to_scope(scope, \
> > > hlsl_ctx.builtin_types.Void); +
> > 
> > This is a sneaky tiny bugfix, right?
> > 
> 
> In that void wasn't added to the scope before? Maybe, except that "void"
> is uniquely a keyword for whatever reason, so I'm not sure what
> difference it'd make...
> 
> ...and I guess in that case there's no point adding it to the scope, is
> there?

Probably not. It might have been intentional, even.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic