v3dv: implement VK_EXT_index_type_uint8
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 17 Jun 2021 10:12:46 +0000 (12:12 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 17 Jun 2021 12:26:44 +0000 (12:26 +0000)
Relevant CTS tests:
dEQP-VK.pipeline.input_assembly.*.index_type_uint8.*

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11444>

docs/features.txt
src/broadcom/vulkan/v3dv_cmd_buffer.c
src/broadcom/vulkan/v3dv_device.c

index e99a995..a8bcbe6 100644 (file)
@@ -527,7 +527,7 @@ Khronos extensions that are not part of any Vulkan version:
   VK_EXT_global_priority                                DONE (anv, radv)
   VK_EXT_image_drm_format_modifier                      DONE (anv, radv/gfx9+, tu)
   VK_EXT_image_robustness                               DONE (anv, radv)
-  VK_EXT_index_type_uint8                               DONE (anv, lvp, radv/gfx8+, tu)
+  VK_EXT_index_type_uint8                               DONE (anv, lvp, radv/gfx8+, v3dv, tu)
   VK_EXT_inline_uniform_block                           DONE (anv, radv)
   VK_EXT_line_rasterization                             DONE (anv, radv)
   VK_EXT_memory_budget                                  DONE (anv, radv, tu)
index f30d145..fa250ca 100644 (file)
@@ -4671,6 +4671,9 @@ static uint32_t
 get_index_size(VkIndexType index_type)
 {
    switch (index_type) {
+   case VK_INDEX_TYPE_UINT8_EXT:
+      return 1;
+      break;
    case VK_INDEX_TYPE_UINT16:
       return 2;
       break;
index 47025b2..e04f326 100644 (file)
@@ -133,6 +133,7 @@ get_device_extensions(const struct v3dv_physical_device *device,
 #endif
       .KHR_variable_pointers               = true,
       .EXT_external_memory_dma_buf         = true,
+      .EXT_index_type_uint8                = true,
       .EXT_private_data                    = true,
    };
 }
@@ -1043,6 +1044,13 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: {
+         VkPhysicalDeviceIndexTypeUint8FeaturesEXT *features =
+            (VkPhysicalDeviceIndexTypeUint8FeaturesEXT *)ext;
+         features->indexTypeUint8 = true;
+         break;
+      }
+
       /* Vulkan 1.1 */
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: {
          VkPhysicalDeviceVulkan11Features *features =