- vb_data[2] = (struct blit_vb_data) {
- .pos = {
- rects[r].dst_x + rects[r].width,
- rects[r].dst_y,
- },
- .tex_coord = {
- rects[r].src_x + rects[r].width,
- rects[r].src_y,
- },
- };
-
-
- radv_cmd_buffer_upload_data(cmd_buffer, vb_size, 16, vb_data, &offset);
-
- struct radv_buffer vertex_buffer = {
- .device = device,
- .size = vb_size,
- .bo = cmd_buffer->upload.upload_bo,
- .offset = offset,
- };
-
- radv_CmdBindVertexBuffers(radv_cmd_buffer_to_handle(cmd_buffer), 0, 1,
- (VkBuffer[]) {
- radv_buffer_to_handle(&vertex_buffer),
- },
- (VkDeviceSize[]) {
- 0,
- });
-
-
- if (dst->aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT) {
- unsigned fs_key = radv_format_meta_fs_key(dst_temps.iview.vk_format);
-
- radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer),
- &(VkRenderPassBeginInfo) {
- .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = device->meta_state.blit2d.render_passes[fs_key],
- .framebuffer = dst_temps.fb,
- .renderArea = {
- .offset = { rects[r].dst_x, rects[r].dst_y, },
- .extent = { rects[r].width, rects[r].height },
- },
- .clearValueCount = 0,
- .pClearValues = NULL,
- }, VK_SUBPASS_CONTENTS_INLINE);
-
-
- bind_pipeline(cmd_buffer, src_type, fs_key);
- } else if (dst->aspect_mask == VK_IMAGE_ASPECT_DEPTH_BIT) {
- radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer),
- &(VkRenderPassBeginInfo) {
- .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = device->meta_state.blit2d.depth_only_rp,
- .framebuffer = dst_temps.fb,
- .renderArea = {
- .offset = { rects[r].dst_x, rects[r].dst_y, },
- .extent = { rects[r].width, rects[r].height },
- },
- .clearValueCount = 0,
- .pClearValues = NULL,
- }, VK_SUBPASS_CONTENTS_INLINE);
-
-
- bind_depth_pipeline(cmd_buffer, src_type);
-
- } else if (dst->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT) {
- radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer),
- &(VkRenderPassBeginInfo) {
- .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = device->meta_state.blit2d.stencil_only_rp,
- .framebuffer = dst_temps.fb,
- .renderArea = {
- .offset = { rects[r].dst_x, rects[r].dst_y, },
- .extent = { rects[r].width, rects[r].height },
- },
- .clearValueCount = 0,
- .pClearValues = NULL,
- }, VK_SUBPASS_CONTENTS_INLINE);
-
-
- bind_stencil_pipeline(cmd_buffer, src_type);
- }