pvr: Enable PBE_FILTERABLE_F16

Signed-off-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
Ashish Chauhan 2024-09-27 10:54:20 +01:00 committed by Marge Bot
parent 116e1ecdec
commit 82fad3f258
3 changed files with 8 additions and 4 deletions

View file

@ -1151,7 +1151,8 @@ unsupported:
};
}
bool pvr_format_is_pbe_downscalable(VkFormat vk_format)
bool pvr_format_is_pbe_downscalable(const struct pvr_device_info *dev_info,
VkFormat vk_format)
{
if (vk_format_is_int(vk_format)) {
/* PBE downscale behavior for integer formats does not match Vulkan
@ -1164,7 +1165,8 @@ bool pvr_format_is_pbe_downscalable(VkFormat vk_format)
switch (pvr_get_pbe_packmode(vk_format)) {
default:
return true;
case ROGUE_PBESTATE_PACKMODE_F16:
return PVR_HAS_FEATURE(dev_info, pbe_filterable_f16);
case ROGUE_PBESTATE_PACKMODE_U16U16U16U16:
case ROGUE_PBESTATE_PACKMODE_S16S16S16S16:
case ROGUE_PBESTATE_PACKMODE_U32U32U32U32:

View file

@ -245,7 +245,8 @@ uint32_t pvr_get_tex_format_aspect(VkFormat vk_format,
uint32_t pvr_get_pbe_packmode(VkFormat vk_format);
uint32_t pvr_get_pbe_accum_format(VkFormat vk_format);
uint32_t pvr_get_pbe_accum_format_size_in_bytes(VkFormat vk_format);
bool pvr_format_is_pbe_downscalable(VkFormat vk_format);
bool pvr_format_is_pbe_downscalable(const struct pvr_device_info *dev_info,
VkFormat vk_format);
void pvr_get_hw_clear_color(VkFormat vk_format,
VkClearColorValue value,

View file

@ -493,7 +493,8 @@ VkResult pvr_CreateRenderPass2(VkDevice _device,
attachment->sample_count = desc->samples;
attachment->initial_layout = desc->initialLayout;
attachment->is_pbe_downscalable =
pvr_format_is_pbe_downscalable(attachment->vk_format);
pvr_format_is_pbe_downscalable(&device->pdevice->dev_info,
attachment->vk_format);
attachment->index = i;
if (attachment->sample_count > pass->max_sample_count)