mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
nvk: Reset rendering attachment locations in BeginCommandBuffer/Rendering
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
This commit is contained in:
parent
9ba70bb1ed
commit
b1abf771c7
1 changed files with 18 additions and 0 deletions
|
|
@ -647,6 +647,18 @@ nvk_cmd_buffer_begin_graphics(struct nvk_cmd_buffer *cmd,
|
|||
render->stencil_att.vk_format =
|
||||
inheritance_info->stencilAttachmentFormat;
|
||||
|
||||
const VkRenderingAttachmentLocationInfoKHR att_loc_info_default = {
|
||||
.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR,
|
||||
.colorAttachmentCount = inheritance_info->colorAttachmentCount,
|
||||
};
|
||||
const VkRenderingAttachmentLocationInfoKHR *att_loc_info =
|
||||
vk_get_command_buffer_rendering_attachment_location_info(
|
||||
cmd->vk.level, pBeginInfo);
|
||||
if (att_loc_info == NULL)
|
||||
att_loc_info = &att_loc_info_default;
|
||||
|
||||
vk_cmd_set_rendering_attachment_locations(&cmd->vk, att_loc_info);
|
||||
|
||||
nvk_cmd_buffer_dirty_render_pass(cmd);
|
||||
}
|
||||
}
|
||||
|
|
@ -784,6 +796,12 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
|
||||
render->all_linear = nvk_rendering_all_linear(render);
|
||||
|
||||
const VkRenderingAttachmentLocationInfoKHR ral_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR,
|
||||
.colorAttachmentCount = pRenderingInfo->colorAttachmentCount,
|
||||
};
|
||||
vk_cmd_set_rendering_attachment_locations(&cmd->vk, &ral_info);
|
||||
|
||||
nvk_cmd_buffer_dirty_render_pass(cmd);
|
||||
|
||||
/* Always emit at least one color attachment, even if it's just a dummy. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue