From 40bdaa43af3414d25e43b477bf813b81827633b3 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Tue, 14 Oct 2025 14:09:29 +0200 Subject: [PATCH] vkd3d: Do not put immutable samplers in the push descriptor set. This was the original intention, but it didn't happen because of a bug: what we need to know at this point is whether the push descriptor set is being used in general (which is tracked by the corresponding Vulkan extension bit), not whether the descriptors we're currently processing are to be put in the push descriptor set (which is tracked by `push_descriptor'). Indeed, `push_descriptor' is always false when processing static samplers, precisely because we want to segregate them in different sets. This fixes a rendering bug in "The Dark Pictures Anthology: Man of Medan". Fixes: 07b7975d09e8dfbdfc5a9942b4f0c9d054a5cd11 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58589 --- libs/vkd3d/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index b6055a50a..4bd97fd59 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -843,7 +843,7 @@ static struct vk_binding_array *d3d12_root_signature_vk_binding_array_for_type( { if (!context->static_samplers_descriptor_set) { - if (!context->push_descriptor && context->root_descriptor_set) + if (!root_signature->device->vk_info.KHR_push_descriptor && context->root_descriptor_set) context->static_samplers_descriptor_set = context->root_descriptor_set; else /* The descriptor type is irrelevant here, it will never be used. */