mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 14:26:00 +00:00
feat(vkbridge): report VK_EXT_robustness2 on drivers without it (Mali r44)
DXVK refuses to start without robustness2. GameNative's wrapper reports it on Mali r44 (robustBufferAccess2, robustImageAccess2, nullDescriptor) without enforcing it, and DXVK games run. Same here, as VKB_EMU_ROBUSTNESS2: the client advertises the extension and features, the server strips the feature struct and keeps robustBufferAccess on (VKBRIDGE_EMU_ROBUSTNESS2=0 disables). The host Mali imitation now hides robustness2 too; DXVK checker 10/10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1U9H1evGNjHRQ3wRUdv5V
This commit is contained in:
1 parent
0f078c439a
commit
ce34349ffb
5 files changed
+31
-5
No files matched your search
@@ -23,6 +23,7 @@ const VkExtensionProperties *vkb_emu_extensions(vkb_physdev *pd, uint32_t *n)
|
||||
list[c++] = (VkExtensionProperties){"VK_KHR_vertex_attribute_divisor", 1};
|
||||
}
|
||||
if (EMU(pd, VKB_EMU_DEPTH_CLIP)) list[c++] = (VkExtensionProperties){"VK_EXT_depth_clip_enable", 1};
|
||||
if (EMU(pd, VKB_EMU_ROBUSTNESS2)) list[c++] = (VkExtensionProperties){"VK_EXT_robustness2", 1};
|
||||
*n = c;
|
||||
return list;
|
||||
}
|
||||
@@ -35,6 +36,11 @@ void vkb_emu_patch_limits(vkb_physdev *pd, VkPhysicalDeviceProperties *p)
|
||||
|
||||
void vkb_emu_patch_properties_chain(vkb_physdev *pd, VkBaseOutStructure *b)
|
||||
{
|
||||
if (EMU(pd, VKB_EMU_ROBUSTNESS2) && b->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT) {
|
||||
VkPhysicalDeviceRobustness2PropertiesEXT *r = (void *)b;
|
||||
r->robustStorageBufferAccessSizeAlignment = 4;
|
||||
r->robustUniformBufferAccessSizeAlignment = 256;
|
||||
}
|
||||
if (EMU(pd, VKB_EMU_DIVISOR)) {
|
||||
if (b->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT)
|
||||
((VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)b)->maxVertexAttribDivisor = UINT32_MAX;
|
||||
@@ -79,6 +85,12 @@ void vkb_emu_patch_features_chain(vkb_physdev *pd, VkBaseOutStructure *b)
|
||||
if (EMU(pd, VKB_EMU_DEPTH_CLIP)) d3->extendedDynamicState3DepthClampEnable = VK_FALSE;
|
||||
}
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT:
|
||||
if (EMU(pd, VKB_EMU_ROBUSTNESS2)) {
|
||||
VkPhysicalDeviceRobustness2FeaturesEXT *r = (void *)b;
|
||||
r->robustBufferAccess2 = r->robustImageAccess2 = r->nullDescriptor = VK_TRUE;
|
||||
}
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT:
|
||||
set_feature(pd, VKB_EMU_DEPTH_CLIP, &((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)b)->depthClipEnable);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user