vkd3d-shader/hlsl: Check the resource format for UAVs also in hlsl_types_are_equal().

Spotted by Henri Verbeet.
This commit is contained in:
Zebediah Figura 2024-02-21 17:40:02 -06:00 committed by Alexandre Julliard
parent 5474d91804
commit 87b1de94da
Notes: Alexandre Julliard 2024-02-22 23:04:07 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/664

View File

@ -887,7 +887,8 @@ bool hlsl_types_are_equal(const struct hlsl_type *t1, const struct hlsl_type *t2
{
if (t1->sampler_dim != t2->sampler_dim)
return false;
if (t1->base_type == HLSL_TYPE_TEXTURE && t1->sampler_dim != HLSL_SAMPLER_DIM_GENERIC
if ((t1->base_type == HLSL_TYPE_TEXTURE || t1->base_type == HLSL_TYPE_UAV)
&& t1->sampler_dim != HLSL_SAMPLER_DIM_GENERIC
&& !hlsl_types_are_equal(t1->e.resource.format, t2->e.resource.format))
return false;
if (t1->base_type == HLSL_TYPE_UAV && t1->e.resource.rasteriser_ordered != t2->e.resource.rasteriser_ordered)