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