mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
tu: Do not re-calculate static blend LRZ state
If blend LRZ state was already calculated from static info, re-calculating it with dynamic state would bring stale values and therefor result in a wrong calculations. This resulted in LRZ being disabled when it should have not in native VK titles. CC: mesa-stable Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
This commit is contained in:
parent
20cb4eeba6
commit
7dee7956f2
1 changed files with 4 additions and 6 deletions
|
|
@ -3785,9 +3785,8 @@ tu_emit_draw_state(struct tu_cmd_buffer *cmd)
|
|||
cmd->vk.dynamic_graphics_state.ms.alpha_to_coverage_enable,
|
||||
cmd->vk.dynamic_graphics_state.ms.alpha_to_one_enable,
|
||||
cmd->vk.dynamic_graphics_state.ms.sample_mask);
|
||||
if (EMIT_STATE(blend_lrz) ||
|
||||
((cmd->state.dirty & TU_CMD_DIRTY_SUBPASS) &&
|
||||
!cmd->state.pipeline_blend_lrz)) {
|
||||
if (!cmd->state.pipeline_blend_lrz &&
|
||||
(EMIT_STATE(blend_lrz) || (cmd->state.dirty & TU_CMD_DIRTY_SUBPASS))) {
|
||||
bool blend_reads_dest = tu6_calc_blend_lrz(&cmd->vk.dynamic_graphics_state.cb,
|
||||
&cmd->state.vk_rp);
|
||||
if (blend_reads_dest != cmd->state.blend_reads_dest) {
|
||||
|
|
@ -3795,9 +3794,8 @@ tu_emit_draw_state(struct tu_cmd_buffer *cmd)
|
|||
cmd->state.dirty |= TU_CMD_DIRTY_LRZ;
|
||||
}
|
||||
}
|
||||
if (EMIT_STATE(bandwidth) ||
|
||||
((cmd->state.dirty & TU_CMD_DIRTY_SUBPASS) &&
|
||||
!cmd->state.pipeline_bandwidth))
|
||||
if (!cmd->state.pipeline_bandwidth &&
|
||||
(EMIT_STATE(bandwidth) || (cmd->state.dirty & TU_CMD_DIRTY_SUBPASS)))
|
||||
tu_calc_bandwidth(&cmd->state.bandwidth, &cmd->vk.dynamic_graphics_state.cb,
|
||||
&cmd->state.vk_rp);
|
||||
DRAW_STATE(blend_constants, VK_DYNAMIC_STATE_BLEND_CONSTANTS,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue