From b06f121fcc18e0567b0ef40ee95ebd2804343612 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 17 Mar 2021 11:23:26 +1000 Subject: [PATCH] lavapipe: enable 8/16-bit storage extensions Acked-by: Adam Jackson Reviewed-by: Roland Scheidegger Part-of: --- docs/features.txt | 4 ++-- src/gallium/frontends/lavapipe/lvp_device.c | 10 ++++++++++ src/gallium/frontends/lavapipe/lvp_pipeline.c | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/features.txt b/docs/features.txt index 2cbd9cf118c..6d629bc802a 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -421,7 +421,7 @@ Vulkan 1.0 -- all DONE: anv, lvp, radv, tu, v3dv Vulkan 1.1 -- all DONE: anv, radv - VK_KHR_16bit_storage DONE (anv/gen8+, radv) + VK_KHR_16bit_storage DONE (anv/gen8+, lvp, radv) VK_KHR_bind_memory2 DONE (anv, lvp, radv, tu) VK_KHR_dedicated_allocation DONE (anv, lvp, radv, tu) VK_KHR_descriptor_update_template DONE (anv, lvp, radv) @@ -447,7 +447,7 @@ Vulkan 1.1 -- all DONE: anv, radv Vulkan 1.2 -- all DONE: anv - VK_KHR_8bit_storage DONE (anv/gen8+, radv) + VK_KHR_8bit_storage DONE (anv/gen8+, lvp, radv) VK_KHR_buffer_device_address DONE (anv/gen8+, lvp, radv) VK_KHR_create_renderpass2 DONE (anv, lvp, radv, tu) VK_KHR_depth_stencil_resolve DONE (anv, radv, tu) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index b65d706518a..34b5ef89f25 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -88,6 +88,8 @@ static const struct vk_instance_extension_table lvp_instance_extensions_supporte }; static const struct vk_device_extension_table lvp_device_extensions_supported = { + .KHR_8bit_storage = true, + .KHR_16bit_storage = true, .KHR_bind_memory2 = true, .KHR_buffer_device_address = true, .KHR_create_renderpass2 = true, @@ -444,6 +446,14 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2( features->variablePointersStorageBuffer = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: { + VkPhysicalDevice8BitStorageFeaturesKHR *features = + (VkPhysicalDevice8BitStorageFeaturesKHR *)ext; + features->storageBuffer8BitAccess = true; + features->uniformAndStorageBuffer8BitAccess = true; + features->storagePushConstant8 = true; + break; + } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: { VkPhysicalDevice16BitStorageFeatures *features = (VkPhysicalDevice16BitStorageFeatures*)ext; diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 13967752140..92efd232cf5 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -459,6 +459,7 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline, .image_write_without_format = true, .storage_image_ms = true, .geometry_streams = true, + .storage_8bit = true, .storage_16bit = true, .variable_pointers = true, .stencil_export = true,