radv: Remove the skipping of framebuffer emission if we don't have a framebuffer.
This was plain broken. The solution is to not require any framebuffer changes. Silently skipping results in broken behavior. e.g: (secondary cmdbuffer with no framebuffer) ClearAttachment 2 translated into bind attachment 2 as attachment 0 (skipped) clear attachment 0 restore original bindings (skipped) which results in clearing attachment 0, not what we wanted. It is a small wonder CTS doesn't find it until VK_KHR_dynamic_rendering. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13699>
This commit is contained in:

committed by
Marge Bot

parent
728590403e
commit
5632359959
@@ -2466,10 +2466,6 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer)
|
||||
struct radv_framebuffer *framebuffer = cmd_buffer->state.framebuffer;
|
||||
const struct radv_subpass *subpass = cmd_buffer->state.subpass;
|
||||
|
||||
/* this may happen for inherited secondary recording */
|
||||
if (!framebuffer)
|
||||
return;
|
||||
|
||||
for (i = 0; i < 8; ++i) {
|
||||
if (i >= subpass->color_count ||
|
||||
subpass->color_attachments[i].attachment == VK_ATTACHMENT_UNUSED) {
|
||||
@@ -4405,7 +4401,9 @@ radv_BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBegi
|
||||
cmd_buffer->state.inherited_pipeline_statistics =
|
||||
pBeginInfo->pInheritanceInfo->pipelineStatistics;
|
||||
|
||||
radv_cmd_buffer_set_subpass(cmd_buffer, subpass);
|
||||
cmd_buffer->state.subpass = subpass;
|
||||
if (cmd_buffer->state.framebuffer)
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_FRAMEBUFFER;
|
||||
}
|
||||
|
||||
if (unlikely(cmd_buffer->device->trace_bo))
|
||||
|
Reference in New Issue
Block a user