*/
#include "radv_meta.h"
+#include "radv_private.h"
#include "vk_format.h"
static VkFormat
radv_layout_dcc_compressed(cmd_buffer->device, image, region->imageSubresource.mipLevel,
layout, queue_mask);
if (compressed) {
+ radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_UNKNOWN_REASON);
+
radv_decompress_dcc(cmd_buffer, image,
&(VkImageSubresourceRange){
.aspectMask = region->imageSubresource.aspectMask,
.layerCount = region->imageSubresource.layerCount,
});
img_bsurf.disable_compression = true;
+
+ radv_describe_barrier_end(cmd_buffer);
}
img_bsurf.format = vk_format_for_size(vk_format_get_blocksize(img_bsurf.format));
}
bool compressed = radv_layout_dcc_compressed(device, image, region->imageSubresource.mipLevel,
layout, queue_mask);
if (compressed) {
+ radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_UNKNOWN_REASON);
+
radv_decompress_dcc(cmd_buffer, image,
&(VkImageSubresourceRange){
.aspectMask = region->imageSubresource.aspectMask,
.layerCount = region->imageSubresource.layerCount,
});
img_info.disable_compression = true;
+
+ radv_describe_barrier_end(cmd_buffer);
}
img_info.format = vk_format_for_size(vk_format_get_blocksize(img_info.format));
}
region->extent.width != dst_image->vk.extent.width ||
region->extent.height != dst_image->vk.extent.height ||
region->extent.depth != dst_image->vk.extent.depth)) {
- u_foreach_bit(i, region->dstSubresource.aspectMask) {
+ radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_UNKNOWN_REASON);
+
+ u_foreach_bit (i, region->dstSubresource.aspectMask) {
unsigned aspect_mask = 1u << i;
radv_expand_depth_stencil(cmd_buffer, dst_image,
&(VkImageSubresourceRange){
.levelCount = 1,
.baseArrayLayer = region->dstSubresource.baseArrayLayer,
.layerCount = region->dstSubresource.layerCount,
- }, NULL);
+ },
+ NULL);
}
+
+ radv_describe_barrier_end(cmd_buffer);
}
}
} else if (!dst_compressed) {
b_dst.format = b_src.format;
} else {
+ radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_UNKNOWN_REASON);
+
radv_decompress_dcc(cmd_buffer, dst_image,
&(VkImageSubresourceRange){
.aspectMask = dst_aspects[a],
});
b_dst.format = b_src.format;
b_dst.disable_compression = true;
+
+ radv_describe_barrier_end(cmd_buffer);
}
/**
if (radv_layout_is_htile_compressed(cmd_buffer->device, dst_image, dst_image_layout,
queue_mask)) {
+ radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_UNKNOWN_REASON);
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_CS_PARTIAL_FLUSH | RADV_CMD_FLAG_INV_VCACHE;
uint32_t htile_value = radv_get_htile_initial_value(cmd_buffer->device, dst_image);
cmd_buffer->state.flush_bits |= radv_clear_htile(cmd_buffer, dst_image, &range, htile_value);
+
+ radv_describe_barrier_end(cmd_buffer);
}
}
sample_locs_info->sampleLocationsCount);
}
+ /* Implicit transitions only happens if traditional render passes are used.
+ * Some meta shaders invoked during barrier handling could call CmdBeginRendering, and we need to
+ * take care to not call radv_describe_barrier_start recursively.
+ */
+ if (cmd_buffer->vk.render_pass)
+ radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_EXTERNAL_RENDER_PASS_SYNC);
uint32_t color_samples = 0, ds_samples = 0;
struct radv_attachment color_att[MAX_RTS];
for (uint32_t i = 0; i < pRenderingInfo->colorAttachmentCount; i++) {
&sample_locations);
}
}
+ if (cmd_buffer->vk.render_pass)
+ radv_describe_barrier_end(cmd_buffer);
const VkRenderingFragmentShadingRateAttachmentInfoKHR *fsr_info =
vk_find_struct_const(pRenderingInfo->pNext,