[PATCH vkd3d 2/6] vkd3d-shader: Exclude descriptor arrays from combined sampler searches.

Conor McCarthy cmccarthy at codeweavers.com
Tue Jul 27 08:39:58 CDT 2021


Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
---
 libs/vkd3d-shader/spirv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 23d1fcc7..584f7c1a 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -2457,7 +2457,10 @@ static bool vkd3d_dxbc_compiler_has_combined_sampler(const struct vkd3d_dxbc_com
     if (!shader_interface->combined_sampler_count)
         return false;
 
-    if (resource && resource->reg.reg.type == VKD3DSPR_UAV)
+    if (resource && (resource->reg.reg.type == VKD3DSPR_UAV || resource->range.last != resource->range.first))
+        return false;
+
+    if (sampler && sampler->range.first != sampler->range.last)
         return false;
 
     for (i = 0; i < shader_interface->combined_sampler_count; ++i)
-- 
2.32.0




More information about the wine-devel mailing list