aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2020-04-28 10:08:17 +0200
committerSamuel Pitoiset <[email protected]>2020-04-28 17:23:05 +0200
commit523e9603d3fba507be9fe9a70a24edfd0a41792b (patch)
treeae1338c4437bd291926149ec40b78499553ee417 /src/amd
parent81ac741f8929b90a16a0b4251f3e6da02dde6133 (diff)
radv: enable FMASK for color attachments only
The reason behind this is that FMASK requires CMASK and also that FMASK for non color attachments looks unnecessary. It's currently much easier to add this simple check because the driver tries to always enable DCC first and if we enable FMASK only if CMASK, we might loose some FMASK compressions. This helps fixing some new robustness2 tests which fails because only FMASK is enabled. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4783>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index f6b0ba0e09a..7bfd34041cd 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1331,7 +1331,8 @@ radv_image_can_enable_cmask(struct radv_image *image)
static inline bool
radv_image_can_enable_fmask(struct radv_image *image)
{
- return image->info.samples > 1 && vk_format_is_color(image->vk_format);
+ return image->info.samples > 1 &&
+ image->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
}
static inline bool