From 9163f1a48e545dbdeb542b35440b2b47dc5763fa Mon Sep 17 00:00:00 2001 From: butilly Date: Wed, 28 Oct 2026 09:10:30 +0000 Subject: [PATCH 1/2] wrapper: lower Sinking Star Mali buffer requirements queries --- src/vulkan/wrapper/wrapper_device.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/vulkan/wrapper/wrapper_device.c b/src/vulkan/wrapper/wrapper_device.c index 2602532d383..865b6e95dad 100644 --- a/src/vulkan/wrapper/wrapper_device.c +++ b/src/vulkan/wrapper/wrapper_device.c @@ -2147,7 +2147,18 @@ wrapper_GetDeviceBufferMemoryRequirements(VkDevice _device, { VK_FROM_HANDLE(wrapper_device, device, _device); - if (device->dispatch_table.GetDeviceBufferMemoryRequirements) { + /* Order of the Sinking Star faults in the Mali driver's maintenance4 + * buffer query during D3D device initialization. Use the existing + * create/query/destroy lowering for this application, even when the + * driver exports the direct entry point. No memory is bound or allocated. + */ + const char *app_name = device->physical->instance->vk.app_info.app_name; + const bool mali_sinking_star = + device->physical->driver_properties.driverID == VK_DRIVER_ID_ARM_PROPRIETARY && + app_name && !strcmp(app_name, "sinking_star.exe"); + + if (device->dispatch_table.GetDeviceBufferMemoryRequirements && + !mali_sinking_star) { device->dispatch_table.GetDeviceBufferMemoryRequirements(device->dispatch_handle, pInfo, pMemoryRequirements); return; From 3b2e10329776146c454efe31cd4cb6049c82ddfb Mon Sep 17 00:00:00 2001 From: butilly Date: Wed, 28 Oct 2026 10:53:48 +0000 Subject: [PATCH 2/2] wrapper: preserve native Mali subgroup capabilities --- src/vulkan/wrapper/wrapper_physical_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vulkan/wrapper/wrapper_physical_device.c b/src/vulkan/wrapper/wrapper_physical_device.c index 3b1d7c34a11..40fa6b2cbd1 100644 --- a/src/vulkan/wrapper/wrapper_physical_device.c +++ b/src/vulkan/wrapper/wrapper_physical_device.c @@ -967,6 +967,10 @@ wrapper_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: { + /* Keep Mali's native subgroup capabilities. Clearing these masks + * prevents vkd3d from exposing WaveOps and shader model 6.0+. */ + if (pdevice->driver_properties.driverID == VK_DRIVER_ID_ARM_PROPRIETARY) + break; VkPhysicalDeviceVulkan11Properties *vk11_prop = (VkPhysicalDeviceVulkan11Properties *)prop; vk11_prop->subgroupSupportedOperations = 0; @@ -1033,6 +1037,10 @@ wrapper_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: { + /* Match the Vulkan 1.1 aggregate query: preserve the driver's + * supported operations and stages, without inventing capabilities. */ + if (pdevice->driver_properties.driverID == VK_DRIVER_ID_ARM_PROPRIETARY) + break; VkPhysicalDeviceSubgroupProperties *subgroup_prop = (VkPhysicalDeviceSubgroupProperties *)prop; subgroup_prop->supportedOperations = 0;