mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
radv: Disable disabled color buffers in rbplus opts.
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit c0144e915a)
This commit is contained in:
parent
3a8ac0b54f
commit
1a0b75aa16
1 changed files with 8 additions and 1 deletions
|
|
@ -681,8 +681,11 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
unsigned sx_blend_opt_control = 0;
|
||||
|
||||
for (unsigned i = 0; i < subpass->color_count; ++i) {
|
||||
if (subpass->color_attachments[i].attachment == VK_ATTACHMENT_UNUSED)
|
||||
if (subpass->color_attachments[i].attachment == VK_ATTACHMENT_UNUSED) {
|
||||
sx_blend_opt_control |= S_02875C_MRT0_COLOR_OPT_DISABLE(1) << (i * 4);
|
||||
sx_blend_opt_control |= S_02875C_MRT0_ALPHA_OPT_DISABLE(1) << (i * 4);
|
||||
continue;
|
||||
}
|
||||
|
||||
int idx = subpass->color_attachments[i].attachment;
|
||||
struct radv_color_buffer_info *cb = &framebuffer->attachments[idx].cb;
|
||||
|
|
@ -796,6 +799,10 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
}
|
||||
}
|
||||
|
||||
for (unsigned i = subpass->color_count; i < 8; ++i) {
|
||||
sx_blend_opt_control |= S_02875C_MRT0_COLOR_OPT_DISABLE(1) << (i * 4);
|
||||
sx_blend_opt_control |= S_02875C_MRT0_ALPHA_OPT_DISABLE(1) << (i * 4);
|
||||
}
|
||||
radeon_set_context_reg_seq(cmd_buffer->cs, R_028754_SX_PS_DOWNCONVERT, 3);
|
||||
radeon_emit(cmd_buffer->cs, sx_ps_downconvert);
|
||||
radeon_emit(cmd_buffer->cs, sx_blend_opt_epsilon);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue