radv: add support for VK_KHR_depth_stencil_resolve
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 20 May 2019 09:46:33 +0000 (11:46 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 21 Jun 2019 12:50:38 +0000 (14:50 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py

index 4d43f25aee029ab0a7e3af8b1eb2b4b3329efb4b..26b31cff9f14d369c5d209ebf4421a22c8772987 100644 (file)
@@ -1383,6 +1383,27 @@ void radv_GetPhysicalDeviceProperties2(
                        properties->variableSampleLocations = VK_FALSE;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR: {
+                       VkPhysicalDeviceDepthStencilResolvePropertiesKHR *properties =
+                               (VkPhysicalDeviceDepthStencilResolvePropertiesKHR *)ext;
+
+                       /* We support all of the depth resolve modes */
+                       properties->supportedDepthResolveModes =
+                               VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR |
+                               VK_RESOLVE_MODE_AVERAGE_BIT_KHR |
+                               VK_RESOLVE_MODE_MIN_BIT_KHR |
+                               VK_RESOLVE_MODE_MAX_BIT_KHR;
+
+                       /* Average doesn't make sense for stencil so we don't support that */
+                       properties->supportedStencilResolveModes =
+                               VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR |
+                               VK_RESOLVE_MODE_MIN_BIT_KHR |
+                               VK_RESOLVE_MODE_MAX_BIT_KHR;
+
+                       properties->independentResolveNone = VK_TRUE;
+                       properties->independentResolve = VK_TRUE;
+                       break;
+               }
                default:
                        break;
                }
index 0a3c0759cca865216b3dfe903eb42398bc0fe956..b676cb8b8e2de5791659347d606ae2eadf7440e9 100644 (file)
@@ -55,6 +55,7 @@ EXTENSIONS = [
     Extension('VK_KHR_bind_memory2',                      1, True),
     Extension('VK_KHR_create_renderpass2',                1, True),
     Extension('VK_KHR_dedicated_allocation',              1, True),
+    Extension('VK_KHR_depth_stencil_resolve',             1, True),
     Extension('VK_KHR_descriptor_update_template',        1, True),
     Extension('VK_KHR_device_group',                      1, True),
     Extension('VK_KHR_device_group_creation',             1, True),