diff --git a/src/nouveau/vulkan/nvk_cmd_draw.c b/src/nouveau/vulkan/nvk_cmd_draw.c index 7dfe2627d08..ac254200580 100644 --- a/src/nouveau/vulkan/nvk_cmd_draw.c +++ b/src/nouveau/vulkan/nvk_cmd_draw.c @@ -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. */