[PATCH v3 3/3] d3dcompiler: Store some builtin types in the hlsl_ctx structure.
Matteo Bruni
matteo.mystral at gmail.com
Fri May 29 16:32:29 CDT 2020
On Fri, May 22, 2020 at 10:46 PM Zebediah Figura <z.figura12 at gmail.com> wrote:
>
> Signed-off-by: Zebediah Figura <zfigura at 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?
More information about the wine-devel
mailing list