summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-06-20 09:17:35 +0200
committerSamuel Pitoiset <[email protected]>2019-06-20 11:03:57 +0200
commit450bce522a2d33b2ab051d975eb063e16acc33a0 (patch)
tree9c853526a2f18cdae7e12e66485abbe8a8e4b8ee /src/amd/vulkan
parentfa903ba799f16a74d74876baaf45daf808f71d59 (diff)
radv: add fast clears support for mipmapped color images with DCC
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_meta_clear.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index dea0cae6d96..b8ca5c2c9b2 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -1364,10 +1364,20 @@ radv_clear_dcc(struct radv_cmd_buffer *cmd_buffer,
struct radv_image *image,
const VkImageSubresourceRange *range, uint32_t value)
{
+ uint32_t level_count = radv_get_levelCount(image, range);
+ uint32_t flush_bits = 0;
+
/* Mark the image as being compressed. */
radv_update_dcc_metadata(cmd_buffer, image, range, true);
- return radv_dcc_clear_level(cmd_buffer, image, 0, value);
+ for (uint32_t l = 0; l < level_count; l++) {
+ uint32_t level = range->baseMipLevel + l;
+
+ flush_bits |= radv_dcc_clear_level(cmd_buffer, image,
+ level, value);
+ }
+
+ return flush_bits;
}
uint32_t