| 460 | } |
| 461 | |
| 462 | void PostProcessingRenderPass::prepare_draw(vkb::core::CommandBufferC &command_buffer, vkb::rendering::RenderTargetC &fallback_render_target) |
| 463 | { |
| 464 | // Collect all input, output, and sampled-from attachments from all subpasses (steps) |
| 465 | AttachmentSet input_attachments, output_attachments; |
| 466 | SampledAttachmentSet sampled_attachments; |
| 467 | |
| 468 | for (auto &step_ptr : pipeline.get_subpasses()) |
| 469 | { |
| 470 | auto &step = *dynamic_cast<PostProcessingSubpass *>(step_ptr.get()); |
| 471 | |
| 472 | for (auto &it : step.get_input_attachments()) |
| 473 | { |
| 474 | input_attachments.insert(it.second); |
| 475 | } |
| 476 | |
| 477 | for (auto &it : step.get_sampled_images()) |
| 478 | { |
| 479 | if (const uint32_t *sampled_attachment = it.second.get_target_attachment()) |
| 480 | { |
| 481 | auto *image_rt = it.second.get_render_target(); |
| 482 | auto packed_sampled_attachment = *sampled_attachment; |
| 483 | |
| 484 | // pack sampled attachment |
| 485 | if (it.second.is_depth_resolve()) |
| 486 | { |
| 487 | packed_sampled_attachment |= DEPTH_RESOLVE_BITMASK; |
| 488 | } |
| 489 | |
| 490 | sampled_attachments.insert({image_rt, packed_sampled_attachment}); |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | for (uint32_t it : step.get_output_attachments()) |
| 495 | { |
| 496 | output_attachments.insert(it); |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | transition_attachments(input_attachments, sampled_attachments, output_attachments, |
| 501 | command_buffer, fallback_render_target); |
| 502 | update_load_stores(input_attachments, sampled_attachments, output_attachments, |
| 503 | fallback_render_target); |
| 504 | } |
| 505 | |
| 506 | void PostProcessingRenderPass::draw(vkb::core::CommandBufferC &command_buffer, vkb::rendering::RenderTargetC &default_render_target) |
| 507 | { |
nothing calls this directly
no test coverage detected