vulkan: Append subpass structures to VkRenderingInfo last
If we don't append subpass->self_dep_info last, other __vk_append_struct()
calls will update its pNext chain which lives in the subpass which
should be treated as immutable. This is easily fixable by just making
it the last thing we append to the chain.
Fixes: 7e11cdc77a
("vulkan/render_pass: Pass sample locations to barriers")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17748>
This commit is contained in:
parent
f7f232385f
commit
d2bd089b78
|
@ -1991,7 +1991,6 @@ begin_subpass(struct vk_command_buffer *cmd_buffer,
|
|||
|
||||
VkRenderingInfo rendering = {
|
||||
.sType = VK_STRUCTURE_TYPE_RENDERING_INFO,
|
||||
.pNext = &subpass->self_dep_info,
|
||||
.renderArea = cmd_buffer->render_area,
|
||||
.layerCount = pass->is_multiview ? 1 : framebuffer->layers,
|
||||
.viewMask = pass->is_multiview ? subpass->view_mask : 0,
|
||||
|
@ -2032,6 +2031,11 @@ begin_subpass(struct vk_command_buffer *cmd_buffer,
|
|||
__vk_append_struct(&rendering, &sample_locations_tmp);
|
||||
}
|
||||
|
||||
/* Append this one last because it lives in the subpass and we don't want
|
||||
* to be changed by appending other structures later.
|
||||
*/
|
||||
__vk_append_struct(&rendering, (void *)&subpass->self_dep_info);
|
||||
|
||||
disp->CmdBeginRendering(vk_command_buffer_to_handle(cmd_buffer),
|
||||
&rendering);
|
||||
|
||||
|
|
Loading…
Reference in New Issue