mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
vulkan: mark RP attachments as invalid when no rendering create info
VkPipelineRenderingCreateInfo is only required in the fragment output interface lib. For pre-rasterization shaders and fragment shader state libs, only the view mask is used but it's optional. If the attachments info isn't marked invalid merging renderpass info during lib imports wouldn't work because it would assume that the first lib has attachment info (eg. the pre-rasterization lib). Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15241 Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40870>
This commit is contained in:
parent
4dfedcca45
commit
1950b6c1a7
1 changed files with 3 additions and 1 deletions
|
|
@ -1293,6 +1293,7 @@ vk_render_pass_state_init(struct vk_render_pass_state *rp,
|
|||
*rp = (struct vk_render_pass_state) {
|
||||
.depth_attachment_format = VK_FORMAT_UNDEFINED,
|
||||
.stencil_attachment_format = VK_FORMAT_UNDEFINED,
|
||||
.attachments = MESA_VK_RP_ATTACHMENT_INFO_INVALID,
|
||||
};
|
||||
|
||||
if (info->renderPass != VK_NULL_HANDLE && driver_rp != NULL) {
|
||||
|
|
@ -1328,7 +1329,6 @@ vk_render_pass_state_init(struct vk_render_pass_state *rp,
|
|||
*/
|
||||
if (info->renderPass == VK_NULL_HANDLE &&
|
||||
!(lib & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT)) {
|
||||
rp->attachments = MESA_VK_RP_ATTACHMENT_INFO_INVALID;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1362,6 +1362,8 @@ vk_render_pass_state_init(struct vk_render_pass_state *rp,
|
|||
rp->depth_stencil_attachment_samples = asc_info->depthStencilAttachmentSamples;
|
||||
}
|
||||
|
||||
rp->attachments = 0;
|
||||
|
||||
for (uint32_t i = 0; i < r_info->colorAttachmentCount; i++) {
|
||||
if (rp->color_attachment_formats[i] != VK_FORMAT_UNDEFINED)
|
||||
rp->attachments |= MESA_VK_RP_ATTACHMENT_COLOR_BIT(i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue