mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 05:40:33 +01:00
radv: re-emit RB+ state with PS epilogs only when the col format changes
RB+ was re-emitted every time a new PS epilog was requested even if the non-compacted color format was equal. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
This commit is contained in:
parent
c1307184d2
commit
7ebff681db
1 changed files with 8 additions and 6 deletions
|
|
@ -9220,17 +9220,19 @@ radv_emit_all_graphics_states(struct radv_cmd_buffer *cmd_buffer, const struct r
|
|||
return;
|
||||
}
|
||||
|
||||
cmd_buffer->state.col_format_non_compacted = ps_epilog->spi_shader_col_format;
|
||||
uint32_t col_format_non_compacted = ps_epilog->spi_shader_col_format;
|
||||
|
||||
assert(cmd_buffer->state.custom_blend_mode == 0);
|
||||
|
||||
bool need_null_export_workaround =
|
||||
radv_needs_null_export_workaround(device, cmd_buffer->state.shaders[MESA_SHADER_FRAGMENT], 0);
|
||||
if (radv_needs_null_export_workaround(device, cmd_buffer->state.shaders[MESA_SHADER_FRAGMENT], 0) &&
|
||||
!col_format_non_compacted)
|
||||
col_format_non_compacted = V_028714_SPI_SHADER_32_R;
|
||||
|
||||
if (need_null_export_workaround && !cmd_buffer->state.col_format_non_compacted)
|
||||
cmd_buffer->state.col_format_non_compacted = V_028714_SPI_SHADER_32_R;
|
||||
if (device->physical_device->rad_info.rbplus_allowed)
|
||||
if (device->physical_device->rad_info.rbplus_allowed &&
|
||||
cmd_buffer->state.col_format_non_compacted != col_format_non_compacted) {
|
||||
cmd_buffer->state.col_format_non_compacted = col_format_non_compacted;
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_RBPLUS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue