[PATCH vkd3d 12/12] vkd3d-shader/hlsl: Remove redundant component count validation from struct_var_initializer().
Giovanni Mascellani
gmascellani at codeweavers.com
Tue Apr 19 05:50:28 CDT 2022
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Il 18/04/22 08:34, Giovanni Mascellani ha scritto:
> From: Francisco Casas <fcasas at codeweavers.com>
>
> Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
> ---
> libs/vkd3d-shader/hlsl.y | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
> index 5b57a7bd..10625b7e 100644
> --- a/libs/vkd3d-shader/hlsl.y
> +++ b/libs/vkd3d-shader/hlsl.y
> @@ -1676,14 +1676,6 @@ static void struct_var_initializer(struct hlsl_ctx *ctx, struct hlsl_ir_var *var
> struct hlsl_struct_field *field;
> unsigned int i = 0;
>
> - if (initializer_size(initializer) != hlsl_type_component_count(type))
> - {
> - hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
> - "Expected %u components in initializer, but got %u.",
> - hlsl_type_component_count(type), initializer_size(initializer));
> - return;
> - }
> -
> LIST_FOR_EACH_ENTRY(field, type->e.elements, struct hlsl_struct_field, entry)
> {
> struct hlsl_ir_node *node = initializer->args[i];
More information about the wine-devel
mailing list