[Vk] Bind descriptor sets instead of push descriptors on MoltenVK

MoltenVK returns zero from OpArrayLength for storage buffers bound through
push descriptors, so every bounds-checked buffer load read zero and every
store was dropped. In Poppy Playtime this left UE's motion blur indirect
dispatch arguments unwritten; the GPU then ran a 4294967295x1612x1490
dispatch and hung, and the game aborted on the render thread timeout.
This commit is contained in:
kuba 2026-09-26 20:50:16 +02:00
parent 4d65ff6d51
commit 3e878a878f
1 changed files with 3 additions and 1 deletions

View File

@ -592,7 +592,9 @@ internal static unsafe partial class VulkanVideoPresenter
};
_vk.GetPhysicalDeviceProperties2(_physicalDevice, &properties2);
SetNativeSubgroupCapabilities(subgroup.SubgroupSize, subgroup.SupportedStages);
_maxPushDescriptors = pushDescriptorProperties.MaxPushDescriptors;
// MoltenVK reports a zero OpArrayLength for storage buffers bound through push
// descriptors, which turns every bounds-checked load into zero and drops every store.
_maxPushDescriptors = IsDeviceExtensionAvailable(PortabilitySubsetExtensionName) ? 0 : pushDescriptorProperties.MaxPushDescriptors;
_noAttachmentSampleCounts = properties.Limits.FramebufferNoAttachmentsSampleCounts;
_maxComputeWorkGroupCountX = properties.Limits.MaxComputeWorkGroupCount[0];
_maxComputeWorkGroupCountY = properties.Limits.MaxComputeWorkGroupCount[1];