Mesa (main): v3dv: implement VK_EXT_index_type_uint8
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 17 12:41:02 UTC 2021
Module: Mesa
Branch: main
Commit: cf2747e7ace0a62e18e7f0910af1ab1d4f5e1019
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf2747e7ace0a62e18e7f0910af1ab1d4f5e1019
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Jun 17 12:12:46 2021 +0200
v3dv: implement VK_EXT_index_type_uint8
Relevant CTS tests:
dEQP-VK.pipeline.input_assembly.*.index_type_uint8.*
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11444>
---
docs/features.txt | 2 +-
src/broadcom/vulkan/v3dv_cmd_buffer.c | 3 +++
src/broadcom/vulkan/v3dv_device.c | 8 ++++++++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/docs/features.txt b/docs/features.txt
index e99a9955a1b..a8bcbe6d559 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -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)
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c
index f30d1458fb5..fa250ca2224 100644
--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c
+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c
@@ -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;
diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c
index 47025b2e916..e04f326c1bc 100644
--- a/src/broadcom/vulkan/v3dv_device.c
+++ b/src/broadcom/vulkan/v3dv_device.c
@@ -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 =
More information about the mesa-commit
mailing list