mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
radv: Allow DCC for images with modifiers that are read-only.
If we avoid writing anything or decompressing this should be fine, and allows gamescope to work without nodcc for radeonsi. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817>
This commit is contained in:
parent
b5ecf0748a
commit
d248c91162
1 changed files with 6 additions and 3 deletions
|
|
@ -1128,8 +1128,8 @@ void radv_GetPhysicalDeviceFormatProperties(
|
|||
}
|
||||
|
||||
static const struct ac_modifier_options radv_modifier_options = {
|
||||
.dcc = false,
|
||||
.dcc_retile = false,
|
||||
.dcc = true,
|
||||
.dcc_retile = true,
|
||||
};
|
||||
|
||||
static VkFormatFeatureFlags
|
||||
|
|
@ -1151,7 +1151,10 @@ radv_get_modifier_flags(struct radv_physical_device *dev,
|
|||
return 0;
|
||||
|
||||
if (ac_modifier_has_dcc(modifier)) {
|
||||
features &= ~VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
|
||||
features &= ~(VK_FORMAT_FEATURE_TRANSFER_DST_BIT |
|
||||
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
|
||||
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT |
|
||||
VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT);
|
||||
|
||||
if (dev->instance->debug_flags & (RADV_DEBUG_NO_DCC | RADV_DEBUG_NO_DISPLAY_DCC))
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue