mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
panvk: add EXT_texture_compression_astc_hdr support
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34828>
This commit is contained in:
parent
a271b9a9a3
commit
ad6e1afe74
5 changed files with 12 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue