diff options
author | Samuel Pitoiset <[email protected]> | 2018-04-11 21:34:43 +0200 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2018-04-12 21:49:32 +0200 |
commit | a989e999b41f2e6c48261c0a2b8aba8258dc97dc (patch) | |
tree | 6143fdcd33ecbba0ecfa1bf58b1a744bc35f22bc | |
parent | 1d44ea348ef5fd8d4fcd032fc3beafb16bda7294 (diff) |
radv: fix radv_layout_dcc_compressed() when image doesn't have DCC
num_dcc_levels means that DCC is supported, but this doesn't
mean that it's enabled by the driver. Instead, we should rely
on radv_image_has_dcc().
This fixes some multisample regressions since 0babc8e5d66
("radv: fix picking the method for resolve subpass") on Vega.
This is because the resolve method changed from HW to FS, but
those fails are totally unexpected, so there might some
differences between Polaris and Vega here.
Fixes: 44fcf587445 ("radv: Disable DCC for GENERAL layout and compute transfer dest.")
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
(cherry picked from commit 9eac49246cdc501530418e8bd2a3e6d47173332b)
[Juan A. Suarez: do not call radv_image_has_dcc(), as it is not defined]
Signed-off-by: Juan A. Suarez Romero <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 5ac0f72589d..e1128b093a8 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -1172,7 +1172,7 @@ bool radv_layout_dcc_compressed(const struct radv_image *image, (queue_mask & (1u << RADV_QUEUE_COMPUTE))) return false; - return image->surface.num_dcc_levels > 0 && layout != VK_IMAGE_LAYOUT_GENERAL; + return image->surface.dcc_size && layout != VK_IMAGE_LAYOUT_GENERAL; } |