Lines Matching refs:pass
37 * for the binning pass). This is always allowed because the vertex stage
42 * until the draw pass for the last bin is complete, then repeat for each
71 tu_render_pass_add_subpass_dep(struct tu_render_pass *pass,
78 * vkCmdPipelineBarrier() inside the render pass and the driver should only
79 * do the barrier when called, not when starting the render pass.
101 perf_debug((struct tu_device *)pass->base.device, "Disabling gmem rendering due to invalid subpass dependency");
102 for (int i = 0; i < ARRAY_SIZE(pass->gmem_pixels); i++)
103 pass->gmem_pixels[i] = 0;
108 dst_barrier = &pass->end_barrier;
110 dst_barrier = &pass->subpasses[dst].start_barrier;
183 tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
189 bool att_used[pass->attachment_count];
284 tu_render_pass_add_subpass_dep(pass, &(VkSubpassDependency2) {
376 tu_render_pass_add_subpass_dep(pass, &(VkSubpassDependency2) {
399 pass->subpasses[0].start_barrier.incoherent_ccu_depth = true;
401 pass->subpasses[0].start_barrier.incoherent_ccu_color = true;
418 tu_render_pass_patch_input_gmem(struct tu_render_pass *pass)
420 bool written[pass->attachment_count];
424 for (unsigned i = 0; i < pass->subpass_count; i++) {
425 struct tu_subpass *subpass = &pass->subpasses[i];
477 tu_render_pass_check_feedback_loop(struct tu_render_pass *pass)
479 for (unsigned i = 0; i < pass->subpass_count; i++) {
480 struct tu_subpass *subpass = &pass->subpasses[i];
514 tu_render_pass_cond_config(struct tu_render_pass *pass)
516 for (uint32_t i = 0; i < pass->attachment_count; i++) {
517 struct tu_render_pass_attachment *att = &pass->attachments[i];
527 tu_render_pass_gmem_config(struct tu_render_pass *pass,
534 * Multiview is all-or-nothing for a render pass - that is, either all
540 if (pass->subpasses[0].multiview_mask) {
542 pass->gmem_pixels[layout] = 0;
554 for (uint32_t i = 0; i < pass->attachment_count; i++) {
555 struct tu_render_pass_attachment *att = &pass->attachments[i];
577 pass->tile_align_w = tile_align_w;
584 pass->gmem_pixels[layout] = 1024 * 1024;
598 for (i = 0; i < pass->attachment_count; i++) {
599 struct tu_render_pass_attachment *att = &pass->attachments[i];
634 if (i == pass->attachment_count)
635 pass->gmem_pixels[layout] = pixels;
640 tu_render_pass_bandwidth_config(struct tu_render_pass *pass)
642 for (uint32_t i = 0; i < pass->attachment_count; i++) {
643 const struct tu_render_pass_attachment *att = &pass->attachments[i];
647 pass->gmem_bandwidth_per_pixel += att->cpp;
651 pass->gmem_bandwidth_per_pixel += att->cpp;
655 pass->sysmem_bandwidth_per_pixel += att->cpp;
659 pass->sysmem_bandwidth_per_pixel +=
733 tu_subpass_use_attachment(struct tu_render_pass *pass, int i, uint32_t a, const VkRenderPassCreateInfo2 *pCreateInfo)
735 struct tu_subpass *subpass = &pass->subpasses[i];
737 pass->attachments[a].gmem = true;
739 pass->attachments[a].clear_views |= subpass->multiview_mask;
754 struct tu_render_pass *pass;
760 size = sizeof(*pass);
761 size += pCreateInfo->subpassCount * sizeof(pass->subpasses[0]);
763 size += pCreateInfo->attachmentCount * sizeof(pass->attachments[0]);
765 pass = vk_object_zalloc(&device->vk, pAllocator, size,
767 if (pass == NULL)
770 pass->attachment_count = pCreateInfo->attachmentCount;
771 pass->subpass_count = pCreateInfo->subpassCount;
772 pass->attachments = (void *) pass + attachments_offset;
775 struct tu_render_pass_attachment *att = &pass->attachments[i];
810 pass->subpass_attachments = vk_alloc2(
814 if (pass->subpass_attachments == NULL) {
815 vk_object_free(&device->vk, pAllocator, pass);
819 pass->subpass_attachments = NULL;
821 p = pass->subpass_attachments;
826 struct tu_subpass *subpass = &pass->subpasses[i];
867 tu_subpass_use_attachment(pass, i, a, pCreateInfo);
869 if (vk_format_is_srgb(pass->attachments[a].format))
885 pass->attachments[src_a].will_be_resolved =
899 pass->attachments[src_a].will_be_resolved = a != VK_ATTACHMENT_UNUSED;
907 tu_subpass_use_attachment(pass, i, a, pCreateInfo);
910 tu_render_pass_patch_input_gmem(pass);
912 tu_render_pass_check_feedback_loop(pass);
915 for (uint32_t i = 0; i < pass->attachment_count; i++) {
916 struct tu_render_pass_attachment *att = &pass->attachments[i];
923 tu_render_pass_cond_config(pass);
924 tu_render_pass_gmem_config(pass, device->physical_device);
925 tu_render_pass_bandwidth_config(pass);
928 tu_render_pass_add_subpass_dep(pass, &pCreateInfo->pDependencies[i]);
931 tu_render_pass_add_implicit_deps(pass, pCreateInfo);
933 *pRenderPass = tu_render_pass_to_handle(pass);
950 TU_FROM_HANDLE(tu_render_pass, pass, _pass);
955 vk_free2(&device->vk.alloc, pAllocator, pass->subpass_attachments);
956 vk_object_free(&device->vk, pAllocator, pass);
980 struct tu_render_pass *pass = &cmd_buffer->dynamic_pass;
983 pass->subpass_count = 1;
984 pass->attachments = cmd_buffer->dynamic_rp_attachments;
1000 struct tu_render_pass_attachment *att = &pass->attachments[a];
1023 struct tu_render_pass_attachment *resolve_att = &pass->attachments[a];
1048 struct tu_render_pass_attachment *att = &pass->attachments[a];
1064 struct tu_render_pass_attachment *resolve_att = &pass->attachments[a];
1087 pass->attachment_count = a;
1089 tu_render_pass_cond_config(pass);
1090 tu_render_pass_gmem_config(pass, device->physical_device);
1091 tu_render_pass_bandwidth_config(pass);
1098 struct tu_render_pass *pass = &cmd_buffer->dynamic_pass;
1101 pass->subpass_count = 1;
1102 pass->attachments = cmd_buffer->dynamic_rp_attachments;
1120 struct tu_render_pass_attachment *att = &pass->attachments[a];
1141 struct tu_render_pass_attachment *att = &pass->attachments[a];