Lines Matching defs:att
186 const VkAttachmentDescription2* att = info->pAttachments;
219 uint32_t stencil_layout = vk_format_has_stencil(att[a].format) ?
220 vk_att_ref_stencil_layout(&subpass->pInputAttachments[j], att) :
222 uint32_t stencil_initial_layout = vk_att_desc_stencil_layout(&att[a], false);
224 if ((att[a].initialLayout != subpass->pInputAttachments[j].layout ||
235 if (att[a].initialLayout != subpass->pColorAttachments[j].layout &&
244 uint32_t stencil_layout = vk_att_ref_stencil_layout(subpass->pDepthStencilAttachment, att);
245 uint32_t stencil_initial_layout = vk_att_desc_stencil_layout(&att[a], false);
247 if ((att[a].initialLayout != subpass->pDepthStencilAttachment->layout ||
260 if (att[a].initialLayout != subpass->pResolveAttachments[j].layout &&
273 uint32_t stencil_layout = vk_att_ref_stencil_layout(ds_resolve->pDepthStencilResolveAttachment, att);
274 uint32_t stencil_initial_layout = vk_att_desc_stencil_layout(&att[a], false);
276 if ((att[a].initialLayout != subpass->pDepthStencilAttachment->layout ||
311 uint32_t stencil_layout = vk_format_has_stencil(att[a].format) ?
312 vk_att_ref_stencil_layout(&subpass->pInputAttachments[j], att) :
314 uint32_t stencil_final_layout = vk_att_desc_stencil_layout(&att[a], true);
316 if ((att[a].finalLayout != subpass->pInputAttachments[j].layout ||
327 if (att[a].finalLayout != subpass->pColorAttachments[j].layout &&
336 uint32_t stencil_layout = vk_att_ref_stencil_layout(subpass->pDepthStencilAttachment, att);
337 uint32_t stencil_final_layout = vk_att_desc_stencil_layout(&att[a], true);
339 if ((att[a].finalLayout != subpass->pDepthStencilAttachment->layout ||
352 if (att[a].finalLayout != subpass->pResolveAttachments[j].layout &&
365 uint32_t stencil_layout = vk_att_ref_stencil_layout(ds_resolve->pDepthStencilResolveAttachment, att);
366 uint32_t stencil_final_layout = vk_att_desc_stencil_layout(&att[a], true);
368 if ((att[a].finalLayout != subpass->pDepthStencilAttachment->layout ||
397 if (layout_undefined(att[i].initialLayout)) {
398 if (vk_format_is_depth_or_stencil(att[i].format)) {
517 struct tu_render_pass_attachment *att = &pass->attachments[i];
519 att->cond_load_allowed =
520 (att->load || att->load_stencil) && !att->clear_mask && !att->will_be_resolved;
521 att->cond_store_allowed =
522 (att->store || att->store_stencil) && !att->clear_mask;
555 struct tu_render_pass_attachment *att = &pass->attachments[i];
556 bool cpp1 = (att->cpp == 1);
557 if (att->gmem) {
558 cpp_total += att->cpp;
561 if (att->format == VK_FORMAT_D32_SFLOAT_S8_UINT) {
562 cpp1 = (att->samples == 1);
563 cpp_total += att->samples;
599 struct tu_render_pass_attachment *att = &pass->attachments[i];
600 if (!att->gmem)
603 att->gmem_offset[layout] = offset;
605 uint32_t align = MAX2(1, att->cpp >> block_align_shift);
607 MAX2((gmem_blocks * att->cpp / cpp_total) & ~(align - 1), align);
613 cpp_total -= att->cpp;
615 pixels = MIN2(pixels, nblocks * gmem_align / att->cpp);
618 if (att->format == VK_FORMAT_D32_SFLOAT_S8_UINT) {
619 att->gmem_offset_stencil[layout] = offset;
622 uint32_t nblocks = gmem_blocks * att->samples / cpp_total;
627 cpp_total -= att->samples;
629 pixels = MIN2(pixels, nblocks * gmem_align / att->samples);
643 const struct tu_render_pass_attachment *att = &pass->attachments[i];
646 if (att->load)
647 pass->gmem_bandwidth_per_pixel += att->cpp;
650 if (att->store)
651 pass->gmem_bandwidth_per_pixel += att->cpp;
654 if (att->clear_mask)
655 pass->sysmem_bandwidth_per_pixel += att->cpp;
658 if (att->will_be_resolved) {
660 att->cpp + att->cpp / att->samples;
667 struct tu_render_pass_attachment *att,
681 att->clear_mask =
683 att->load = (load_op == VK_ATTACHMENT_LOAD_OP_LOAD);
684 att->store = (store_op == VK_ATTACHMENT_STORE_OP_STORE);
690 switch (att->format) {
692 if (att->clear_mask)
693 att->clear_mask = VK_IMAGE_ASPECT_DEPTH_BIT;
695 att->clear_mask |= VK_IMAGE_ASPECT_STENCIL_BIT;
697 att->load = true;
699 att->store = true;
702 att->clear_mask = stencil_clear ? VK_IMAGE_ASPECT_COLOR_BIT : 0;
703 att->load = stencil_load;
704 att->store = stencil_store;
707 if (att->clear_mask)
708 att->clear_mask = VK_IMAGE_ASPECT_DEPTH_BIT;
710 att->clear_mask |= VK_IMAGE_ASPECT_STENCIL_BIT;
712 att->load_stencil = true;
714 att->store_stencil = true;
775 struct tu_render_pass_attachment *att = &pass->attachments[i];
777 att->format = pCreateInfo->pAttachments[i].format;
778 att->samples = pCreateInfo->pAttachments[i].samples;
780 * att->samples will be used as the cpp for the stencil image
782 if (att->format == VK_FORMAT_D32_SFLOAT_S8_UINT)
783 att->cpp = 4 * att->samples;
785 att->cpp = vk_format_get_blocksize(att->format) * att->samples;
787 att->gmem = false;
792 attachment_set_ops(device, att, loadOp, stencilLoadOp,
916 struct tu_render_pass_attachment *att = &pass->attachments[i];
917 if (!att->gmem) {
918 att->clear_mask = 0;
919 att->load = false;
960 tu_setup_dynamic_attachment(struct tu_render_pass_attachment *att,
963 att->format = view->vk.format;
964 att->samples = view->image->layout->nr_samples;
967 * att->samples will be used as the cpp for the stencil image
969 if (att->format == VK_FORMAT_D32_SFLOAT_S8_UINT)
970 att->cpp = 4 * att->samples;
972 att->cpp = vk_format_get_blocksize(att->format) * att->samples;
1000 struct tu_render_pass_attachment *att = &pass->attachments[a];
1010 tu_setup_dynamic_attachment(att, view);
1011 att->gmem = true;
1012 att->clear_views = info->viewMask;
1013 attachment_set_ops(device, att, att_info->loadOp, 0,
1031 att->will_be_resolved = true;
1034 att->will_be_resolved = false;
1048 struct tu_render_pass_attachment *att = &pass->attachments[a];
1049 tu_setup_dynamic_attachment(att, view);
1050 att->gmem = true;
1051 att->clear_views = info->viewMask;
1054 attachment_set_ops(device, att,
1075 att->will_be_resolved = true;
1078 att->will_be_resolved = false;
1120 struct tu_render_pass_attachment *att = &pass->attachments[a];
1128 att->format = format;
1129 att->samples = info->rasterizationSamples;
1136 att->cond_load_allowed = att->cond_store_allowed = true;
1141 struct tu_render_pass_attachment *att = &pass->attachments[a];
1142 att->format = info->depthAttachmentFormat != VK_FORMAT_UNDEFINED ?
1144 att->samples = info->rasterizationSamples;
1146 att->cond_load_allowed = att->cond_store_allowed = true;