mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
ac/surface: Add ac_modifier_supports_dcc_image_stores helper
Helper function to check if a modifier supports DCC image stores. Signed-off-by: Joshua Ashton <joshua@froggi.es> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862>
This commit is contained in:
parent
fd08758bb1
commit
92ade3df05
2 changed files with 9 additions and 0 deletions
|
|
@ -105,6 +105,14 @@ bool ac_modifier_has_dcc_retile(uint64_t modifier)
|
|||
return IS_AMD_FMT_MOD(modifier) && AMD_FMT_MOD_GET(DCC_RETILE, modifier);
|
||||
}
|
||||
|
||||
bool ac_modifier_supports_dcc_image_stores(uint64_t modifier)
|
||||
{
|
||||
return ac_modifier_has_dcc(modifier) &&
|
||||
!AMD_FMT_MOD_GET(DCC_INDEPENDENT_64B, modifier) &&
|
||||
AMD_FMT_MOD_GET(DCC_INDEPENDENT_128B, modifier) &&
|
||||
AMD_FMT_MOD_GET(DCC_MAX_COMPRESSED_BLOCK, modifier) == AMD_FMT_MOD_DCC_BLOCK_128B;
|
||||
}
|
||||
|
||||
static
|
||||
AddrSwizzleMode ac_modifier_gfx9_swizzle_mode(uint64_t modifier)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -454,6 +454,7 @@ bool ac_get_supported_modifiers(const struct radeon_info *info,
|
|||
uint64_t *mods);
|
||||
bool ac_modifier_has_dcc(uint64_t modifier);
|
||||
bool ac_modifier_has_dcc_retile(uint64_t modifier);
|
||||
bool ac_modifier_supports_dcc_image_stores(uint64_t modifier);
|
||||
|
||||
unsigned ac_surface_get_nplanes(const struct radeon_surf *surf);
|
||||
uint64_t ac_surface_get_plane_offset(enum chip_class chip_class,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue