radv: do not decompress levels without DCC with the compute path
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jun 2019 08:30:44 +0000 (10:30 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jun 2019 09:24:41 +0000 (11:24 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_fast_clear.c

index 6e5fee552b0c0e6a8495eace9bcc2513be18b5d9..cb7b43d546c9be5789775359fff6c037a5909f31 100644 (file)
@@ -801,6 +801,11 @@ radv_decompress_dcc_compute(struct radv_cmd_buffer *cmd_buffer,
                             device->meta_state.fast_clear_flush.dcc_decompress_compute_pipeline);
 
        for (uint32_t l = 0; l < radv_get_levelCount(image, subresourceRange); l++) {
+
+               /* Do not decompress levels without DCC. */
+               if (!radv_dcc_enabled(image, subresourceRange->baseMipLevel + l))
+                       continue;
+
                radv_image_view_init(&iview, cmd_buffer->device,
                                     &(VkImageViewCreateInfo) {
                                             .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,