v3dv: implement VK_EXT_index_type_uint8

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>
This commit is contained in:
Iago Toral Quiroga 2021-06-17 12:12:46 +02:00 committed by Marge Bot
parent d9c53c50ad
commit cf2747e7ac
3 changed files with 12 additions and 1 deletions

View 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)

View 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;

View 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 =