turnip: Don't disable LRZ for color write mask channels beyond the format's
aztec_ruins under ANGLE was getting LRZ writes disabled because 0xf out of
the 0x3 mask was enabled. The goal was to see if there are partial writes
being done, though. This caused a 2-3% performance regression.
Fixes: 85d0205db1 ("tu: Implement extendedDynamicState3ColorWriteMask")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19635>
This commit is contained in:
parent
062d4d83e1
commit
c9db71c8ba
1 changed files with 9 additions and 4 deletions
|
|
@ -697,11 +697,16 @@ tu6_calculate_lrz_state(struct tu_cmd_buffer *cmd,
|
|||
|
||||
VkFormat format = cmd->state.pass->attachments[a].format;
|
||||
unsigned mask = MASK(vk_format_get_nr_components(format));
|
||||
if ((cmd->state.rb_mrt_control[i] &
|
||||
uint32_t enabled_mask = (cmd->state.rb_mrt_control[i] &
|
||||
A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK) >>
|
||||
A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT != mask) {
|
||||
if (gras_lrz_cntl.lrz_write)
|
||||
perf_debug(cmd->device, "disabling lrz write due to dynamic color write mask");
|
||||
A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT;
|
||||
if ((enabled_mask & mask) != mask) {
|
||||
if (gras_lrz_cntl.lrz_write) {
|
||||
perf_debug(cmd->device,
|
||||
"disabling lrz write due to dynamic color write "
|
||||
"mask (%x/%x)",
|
||||
enabled_mask, mask);
|
||||
}
|
||||
gras_lrz_cntl.lrz_write = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue