mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
radv: don't crash if we have no framebuffer
Recording secondaries with no framebuffer attachment may make this happen, though this might not be the complete solution. (esp if someone does meta stuff in there, would we have to save things, not sure). Fixes:f4e499ec79("radv: add initial non-conformant radv vulkan driver") Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit4a091b0788)
This commit is contained in:
parent
22c1e2e966
commit
b29987ace4
1 changed files with 4 additions and 0 deletions
|
|
@ -1213,6 +1213,10 @@ 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) {
|
||||
radeon_set_context_reg(cmd_buffer->cs, R_028C70_CB_COLOR0_INFO + i * 0x3C,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue