#include "radv_meta.h"
#include "nir/nir_builder.h"
+#include "vk_format.h"
enum blit2d_dst_type {
/* We can bind this destination as a "normal" render target and render
for (unsigned r = 0; r < num_rects; ++r) {
VkFormat depth_format = 0;
- if (dst->aspect_mask != VK_IMAGE_ASPECT_COLOR_BIT)
- depth_format = dst->image->vk_format;
+ if (dst->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT)
+ depth_format = vk_format_stencil_only(dst->image->vk_format);
+ else if (dst->aspect_mask == VK_IMAGE_ASPECT_DEPTH_BIT)
+ depth_format = vk_format_depth_only(dst->image->vk_format);
struct blit2d_src_temps src_temps;
blit2d_bind_src(cmd_buffer, src_img, src_buf, &src_temps, src_type, depth_format);