panvk: Support VK_EXT_astc_decode_mode
The Panfrost hardware already supports controlling ASTC decode precision via the Decode Wide plane descriptor field. Wire up the Vulkan extension by parsing VkImageViewASTCDecodeModeEXT from the image view pNext chain and setting astc.narrow when the application requests VK_FORMAT_R8G8B8A8_UNORM decode mode. The extension is limited to v9+ since the ASTC plane descriptors with Decode Wide/HDR fields only exist from Valhall onwards. decodeModeSharedExponent is not supported. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39799>
This commit is contained in:
parent
604d3ed7d2
commit
a16d36304e
4 changed files with 12 additions and 0 deletions
|
|
@ -597,6 +597,7 @@ Khronos extensions that are not part of any Vulkan version:
|
|||
VK_KHR_swapchain_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_acquire_xlib_display DONE (anv, hk, lvp, nvk, panvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_attachment_feedback_loop_dynamic_state DONE (anv, lvp, radv, tu, vn)
|
||||
VK_EXT_astc_decode_mode DONE (panvk)
|
||||
VK_EXT_attachment_feedback_loop_layout DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_blend_operation_advanced DONE (hk, lvp, vn)
|
||||
VK_EXT_border_color_swizzle DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv/gfx10+, tu, v3dv, vn)
|
||||
|
|
|
|||
|
|
@ -13,3 +13,4 @@ VK_KHR_pipeline_executable_properties on pvr
|
|||
VK_EXT_zero_initialize_device_memory on panvk
|
||||
GL_EXT_shader_image_load_store on panfrost
|
||||
VK_KHR_swapchain_mutable_format on panvk
|
||||
VK_EXT_astc_decode_mode on panvk
|
||||
|
|
|
|||
|
|
@ -343,9 +343,14 @@ panvk_per_arch(CreateImageView)(VkDevice _device,
|
|||
}
|
||||
|
||||
enum pipe_format pfmt = vk_format_to_pipe_format(view->vk.view_format);
|
||||
const VkImageViewASTCDecodeModeEXT *astc_decode =
|
||||
vk_find_struct_const(pCreateInfo->pNext, IMAGE_VIEW_ASTC_DECODE_MODE_EXT);
|
||||
|
||||
view->pview = (struct pan_image_view){
|
||||
.format = pfmt,
|
||||
.astc.hdr = util_format_is_astc_hdr(pfmt),
|
||||
.astc.narrow = astc_decode &&
|
||||
astc_decode->decodeMode == VK_FORMAT_R8G8B8A8_UNORM,
|
||||
.dim = panvk_view_type_to_mali_tex_dim(view->vk.view_type),
|
||||
.nr_samples = image->vk.samples,
|
||||
.first_level = view->vk.base_mip_level,
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ panvk_per_arch(get_physical_device_extensions)(
|
|||
.EXT_shader_subgroup_vote = true,
|
||||
.EXT_subgroup_size_control = has_vk1_1,
|
||||
.EXT_texel_buffer_alignment = true,
|
||||
.EXT_astc_decode_mode = PAN_ARCH >= 9,
|
||||
.EXT_texture_compression_astc_hdr = true,
|
||||
.EXT_tooling_info = true,
|
||||
.EXT_vertex_attribute_divisor = true,
|
||||
|
|
@ -397,6 +398,10 @@ panvk_per_arch(get_physical_device_features)(
|
|||
.synchronization2 = true,
|
||||
.textureCompressionASTC_HDR = has_texture_compression_astc_hdr(device),
|
||||
.shaderZeroInitializeWorkgroupMemory = true,
|
||||
|
||||
/* VK_EXT_astc_decode_mode */
|
||||
.decodeModeSharedExponent = false,
|
||||
|
||||
.dynamicRendering = true,
|
||||
.shaderIntegerDotProduct = true,
|
||||
.maintenance4 = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue