diff --git a/docs/features.txt b/docs/features.txt index 63b95215bf6..e09d4fa61ec 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -504,7 +504,7 @@ Vulkan 1.3 -- all DONE: anv, hk, lvp, nvk, radv, tu, vn, v3dv VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_subgroup_size_control DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn) VK_EXT_texel_buffer_alignment DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) - VK_EXT_texture_compression_astc_hdr DONE (vn) + VK_EXT_texture_compression_astc_hdr DONE (panvk, vn) VK_EXT_tooling_info DONE (anv, hasvk, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_ycbcr_2plane_444_formats DONE (anv, lvp, nvk, panvk/v10+, vn) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 0383f4b8129..5abfe268de3 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -38,3 +38,4 @@ VK_EXT_scalar_block_layout on radv/gfx6 VK_EXT_inline_uniform_block on panvk cl_khr_fp16 on asahi, freedreno, llvmpipe, panfrost, radeonsi and zink GL_ARB_shader_clock on panfrost/v6+ +VK_EXT_texture_compression_astc_hdr on panvk diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c index 4d7f68486df..44dfd5a1216 100644 --- a/src/panfrost/vulkan/panvk_physical_device.c +++ b/src/panfrost/vulkan/panvk_physical_device.c @@ -322,6 +322,7 @@ get_device_extensions(const struct panvk_physical_device *device, .EXT_shader_subgroup_vote = true, .EXT_subgroup_size_control = has_vk1_1, .EXT_texel_buffer_alignment = true, + .EXT_texture_compression_astc_hdr = true, .EXT_tooling_info = true, .EXT_vertex_attribute_divisor = true, .EXT_vertex_input_dynamic_state = true, @@ -360,6 +361,12 @@ has_texture_compression_astc_ldr(const struct panvk_physical_device *physical_de return has_compressed_formats(physical_device, BITFIELD_BIT(MALI_ASTC_2D_LDR)); } +static bool +has_texture_compression_astc_hdr(const struct panvk_physical_device *physical_device) +{ + return has_compressed_formats(physical_device, BITFIELD_BIT(MALI_ASTC_2D_HDR)); +} + static bool has_texture_compression_bc(const struct panvk_physical_device *physical_device) { @@ -495,7 +502,7 @@ get_features(const struct panvk_instance *instance, .subgroupSizeControl = true, .computeFullSubgroups = true, .synchronization2 = true, - .textureCompressionASTC_HDR = false, + .textureCompressionASTC_HDR = has_texture_compression_astc_hdr(device), .shaderZeroInitializeWorkgroupMemory = true, .dynamicRendering = true, .dynamicRenderingLocalRead = true, diff --git a/src/panfrost/vulkan/panvk_vX_buffer_view.c b/src/panfrost/vulkan/panvk_vX_buffer_view.c index cc71ba05bc4..143c5bcd4a7 100644 --- a/src/panfrost/vulkan/panvk_vX_buffer_view.c +++ b/src/panfrost/vulkan/panvk_vX_buffer_view.c @@ -57,6 +57,7 @@ panvk_per_arch(CreateBufferView)(VkDevice _device, if (buffer->vk.usage & tex_usage_mask) { struct pan_buffer_view bview = { .format = pfmt, + .astc.hdr = util_format_is_astc_hdr(pfmt), .width_el = view->vk.elements, .base = address, }; diff --git a/src/panfrost/vulkan/panvk_vX_image_view.c b/src/panfrost/vulkan/panvk_vX_image_view.c index c53473de227..aad27664c4d 100644 --- a/src/panfrost/vulkan/panvk_vX_image_view.c +++ b/src/panfrost/vulkan/panvk_vX_image_view.c @@ -315,6 +315,7 @@ panvk_per_arch(CreateImageView)(VkDevice _device, view->pview = (struct pan_image_view){ .format = vk_format_to_pipe_format(view->vk.view_format), + .astc.hdr = util_format_is_astc_hdr(view->vk.view_format), .dim = panvk_view_type_to_mali_tex_dim(view->vk.view_type), .nr_samples = image->vk.samples, .first_level = view->vk.base_mip_level,