scripts: Add required depth/stencil resolve props
authorMike Schuchardt <mikes@lunarg.com>
Sun, 21 Jul 2019 21:18:44 +0000 (14:18 -0700)
committerMike Schuchardt <mikes@lunarg.com>
Mon, 22 Jul 2019 18:34:24 +0000 (11:34 -0700)
Spec mandates that at least VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR be
supported for supportedDepthResolveModes and
supportedStencilResolveModes

scripts/mock_icd_generator.py

index 48d9465..49fe261 100644 (file)
@@ -795,6 +795,13 @@ CUSTOM_C_INTERCEPTS = {
         VkPhysicalDevicePushDescriptorPropertiesKHR* write_props = (VkPhysicalDevicePushDescriptorPropertiesKHR*)push_descriptor_props;
         write_props->maxPushDescriptors = 256;
     }
+
+    const auto *depth_stencil_resolve_props = lvl_find_in_chain<VkPhysicalDeviceDepthStencilResolvePropertiesKHR>(pProperties->pNext);
+    if (depth_stencil_resolve_props) {
+        VkPhysicalDeviceDepthStencilResolvePropertiesKHR* write_props = (VkPhysicalDeviceDepthStencilResolvePropertiesKHR*)depth_stencil_resolve_props;
+        write_props->supportedDepthResolveModes = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR;
+        write_props->supportedStencilResolveModes = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR;
+    }
 ''',
 'vkGetPhysicalDeviceExternalSemaphoreProperties':'''
     // Hard code support for all handle types and features