radv: Support v3 of VK_EXT_vertex_attribute_divisor.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 10 Sep 2018 18:34:00 +0000 (20:34 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 10 Sep 2018 19:26:17 +0000 (21:26 +0200)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
CC: 18.2 <mesa-stable@lists.freedesktop.org>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py

index 53f99a8cecdec45171cdf8c2652f8972a6218627..7917ed7ffe5c9c7a69592fd1559e2ebbf592181d 100644 (file)
@@ -821,6 +821,13 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->inheritedConditionalRendering = false;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: {
+                       VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT *features =
+                               (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT *)ext;
+                       features->vertexAttributeInstanceRateDivisor = VK_TRUE;
+                       features->vertexAttributeInstanceRateZeroDivisor = VK_TRUE;
+                       break;
+               }
                default:
                        break;
                }
index b5b9c137927ea2e794dab2f53262963fca5ca9ed..fa35aabd3bafd4559f9bdf252d6e021e3db72487 100644 (file)
@@ -105,7 +105,7 @@ EXTENSIONS = [
     Extension('VK_EXT_sampler_filter_minmax',             1, 'device->rad_info.chip_class >= CIK'),
     Extension('VK_EXT_shader_viewport_index_layer',       1, True),
     Extension('VK_EXT_shader_stencil_export',             1, True),
-    Extension('VK_EXT_vertex_attribute_divisor',          2, True),
+    Extension('VK_EXT_vertex_attribute_divisor',          3, True),
     Extension('VK_AMD_draw_indirect_count',               1, True),
     Extension('VK_AMD_gcn_shader',                        1, True),
     Extension('VK_AMD_rasterization_order',               1, 'device->has_out_of_order_rast'),