From 87b1de94dad7e23575c187b473458d25c236ec91 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 21 Feb 2024 17:40:02 -0600 Subject: [PATCH] vkd3d-shader/hlsl: Check the resource format for UAVs also in hlsl_types_are_equal(). Spotted by Henri Verbeet. --- libs/vkd3d-shader/hlsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 2f26b40a..978c414d 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -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)