mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 16:18:06 +02:00
tu: Fix RT count with remapped color attachments
The index of each RT is the remapped color attachment index, so we have
to use the remapped indices when telling the HW the number of RTs.
This fixes KHR-GLES3.framebuffer_blit.scissor_blit on ANGLE once we
enabled VK_EXT_multisampled_render_to_single_sampled, which switched
ANGLE to using dynamic rendering with
VK_KHR_dynamic_rendering_local_read.
Fixes: d50eef5b06 ("tu: Support color attachment remapping")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37990>
This commit is contained in:
parent
75da8229f9
commit
8d276e0d70
1 changed files with 4 additions and 2 deletions
|
|
@ -3157,8 +3157,6 @@ tu6_emit_blend(struct tu_cs *cs,
|
|||
|
||||
bool dual_src_blend = tu_blend_state_is_dual_src(cb);
|
||||
|
||||
tu_cs_emit_regs(cs, A6XX_SP_PS_MRT_CNTL(.mrt = num_rts));
|
||||
tu_cs_emit_regs(cs, A6XX_RB_PS_MRT_CNTL(.mrt = num_rts));
|
||||
tu_cs_emit_regs(cs, A6XX_SP_BLEND_CNTL(.enable_blend = blend_enable_mask,
|
||||
.unk8 = true,
|
||||
.dual_color_in_enable =
|
||||
|
|
@ -3180,10 +3178,12 @@ tu6_emit_blend(struct tu_cs *cs,
|
|||
.alpha_to_one = alpha_to_one_enable,
|
||||
.sample_mask = sample_mask));
|
||||
|
||||
unsigned num_remapped_rts = 0;
|
||||
for (unsigned i = 0; i < num_rts; i++) {
|
||||
if (cal->color_map[i] == MESA_VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
unsigned remapped_idx = cal->color_map[i];
|
||||
num_remapped_rts = MAX2(num_remapped_rts, remapped_idx + 1);
|
||||
const struct vk_color_blend_attachment_state *att = &cb->attachments[i];
|
||||
if ((cb->color_write_enables & (1u << i)) && i < cb->attachment_count) {
|
||||
const enum a3xx_rb_blend_opcode color_op = tu6_blend_op(att->color_blend_op);
|
||||
|
|
@ -3227,6 +3227,8 @@ tu6_emit_blend(struct tu_cs *cs,
|
|||
A6XX_RB_MRT_BLEND_CONTROL(remapped_idx,));
|
||||
}
|
||||
}
|
||||
tu_cs_emit_regs(cs, A6XX_SP_PS_MRT_CNTL(.mrt = num_remapped_rts));
|
||||
tu_cs_emit_regs(cs, A6XX_RB_PS_MRT_CNTL(.mrt = num_remapped_rts));
|
||||
}
|
||||
|
||||
static const enum mesa_vk_dynamic_graphics_state tu_blend_constants_state[] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue