[PATCH vkd3d v2 3/5] vkd3d-shader/hlsl: Parse explicitly typed texture types.

Giovanni Mascellani gmascellani at codeweavers.com
Thu Oct 7 06:58:41 CDT 2021


Hi,

Il 06/10/21 16:45, Zebediah Figura ha scritto:
> @@ -344,9 +345,14 @@ bool hlsl_types_are_equal(const struct hlsl_type *t1, const struct hlsl_type *t2
>           return false;
>       if (t1->base_type != t2->base_type)
>           return false;
> -    if ((t1->base_type == HLSL_TYPE_SAMPLER || t1->base_type == HLSL_TYPE_TEXTURE)
> -            && t1->sampler_dim != t2->sampler_dim)
> -        return false;
> +    if (t1->base_type == HLSL_TYPE_SAMPLER || t1->base_type == HLSL_TYPE_TEXTURE)
> +    {
> +        if (t1->sampler_dim != t2->sampler_dim)
> +            return false;
> +        if (t1->base_type == HLSL_TYPE_TEXTURE && t1->sampler_dim != HLSL_SAMPLER_DIM_GENERIC
> +                && !hlsl_types_are_equal(t1->e.resource_format, t2->e.resource_format))
> +            return false;
> +    }
>       if ((t1->modifiers & HLSL_MODIFIER_ROW_MAJOR)
>               != (t2->modifiers & HLSL_MODIFIER_ROW_MAJOR))
>           return false;

Shouldn't compare_param_hlsl_types be changed in a similar way?

More in general, do we really need both hlsl_types_are_equal and 
compare_param_hlsl_types? Couldn't hlsl_types_are_equal just cast to 
bool the result on compare_param_hlsl_types?

Thanks, Giovanni.



More information about the wine-devel mailing list