diff --git a/docs/features.txt b/docs/features.txt index b0104467874..2dac489aa8c 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -445,7 +445,7 @@ Vulkan 1.1 -- all DONE: anv, lvp, radv, tu, vn Vulkan 1.2 -- all DONE: anv, vn - VK_KHR_8bit_storage DONE (anv/gen8+, lvp, radv, vn) + VK_KHR_8bit_storage DONE (anv/gen8+, lvp, radv, v3dv, vn) VK_KHR_buffer_device_address DONE (anv/gen8+, lvp, radv, tu, vn) VK_KHR_create_renderpass2 DONE (anv, lvp, radv, tu, v3dv, vn) VK_KHR_depth_stencil_resolve DONE (anv, lvp, radv, tu, vn) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 487cfd68892..00bcbf4d3bf 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -116,6 +116,7 @@ get_device_extensions(const struct v3dv_physical_device *device, struct vk_device_extension_table *ext) { *ext = (struct vk_device_extension_table) { + .KHR_8bit_storage = true, .KHR_16bit_storage = true, .KHR_bind_memory2 = true, .KHR_copy_commands2 = true, @@ -1082,6 +1083,12 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, { v3dv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); + VkPhysicalDeviceVulkan12Features vk12 = { + .storageBuffer8BitAccess = true, + .uniformAndStorageBuffer8BitAccess = true, + .storagePushConstant8 = true, + }; + VkPhysicalDeviceVulkan11Features vk11 = { .storageBuffer16BitAccess = true, .uniformAndStorageBuffer16BitAccess = true, @@ -1180,6 +1187,14 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, memcpy(features, &vk11, sizeof(VkPhysicalDeviceVulkan11Features)); break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: { + VkPhysicalDevice8BitStorageFeatures *features = (void *) ext; + features->storageBuffer8BitAccess = vk12.storageBuffer8BitAccess; + features->uniformAndStorageBuffer8BitAccess = + vk12.uniformAndStorageBuffer8BitAccess; + features->storagePushConstant8 = vk12.storagePushConstant8; + break; + } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: { VkPhysicalDevice16BitStorageFeatures *features = (void *) ext; features->storageBuffer16BitAccess = vk11.storageBuffer16BitAccess; diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index f39d0464328..50b6d84adb9 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -180,6 +180,7 @@ static const struct spirv_to_nir_options default_spirv_options = { .caps = { .device_group = true, .multiview = true, + .storage_8bit = true, .storage_16bit = true, .subgroup_basic = true, .variable_pointers = true,