anv: flush tile cache independent of format with HIZ-CCS flush
Cc: mesa-stable Fixes:ba87656079
("anv: implement undocumented tile cache flush requirements") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10420 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10530 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Mark Janes <markjanes@swizzler.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27440> (cherry picked from commit5178ad761c
)
This commit is contained in:

committed by
Eric Engestrom

parent
781ea0997b
commit
bf9b71ee0b
@@ -444,7 +444,7 @@
|
||||
"description": "anv: flush tile cache independent of format with HIZ-CCS flush",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ba87656079a7fb745c06e78641d2fa6ac4112b82",
|
||||
"notes": null
|
||||
|
@@ -400,22 +400,18 @@ transition_depth_buffer(struct anv_cmd_buffer *cmd_buffer,
|
||||
0, base_layer, layer_count, ISL_AUX_OP_AMBIGUATE);
|
||||
}
|
||||
|
||||
#if GFX_VER == 12
|
||||
/* Depth/Stencil writes by the render pipeline to D16 & S8 formats use a
|
||||
* different pairing bit for the compression cache line. This means that
|
||||
* there is potential for aliasing with the wrong cache if you use another
|
||||
* format OR a piece of HW that does not use the same pairing. To avoid
|
||||
* this, flush the tile cache as the compression data does not live in the
|
||||
* color/depth cache.
|
||||
/* Additional tile cache flush for MTL:
|
||||
*
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/10420
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/10530
|
||||
*/
|
||||
if (image->planes[depth_plane].aux_usage == ISL_AUX_USAGE_HIZ_CCS &&
|
||||
final_needs_depth && !initial_depth_valid &&
|
||||
anv_image_format_is_d16_or_s8(image)) {
|
||||
if (intel_device_info_is_mtl(cmd_buffer->device->info) &&
|
||||
image->planes[depth_plane].aux_usage == ISL_AUX_USAGE_HIZ_CCS &&
|
||||
final_needs_depth && !initial_depth_valid) {
|
||||
anv_add_pending_pipe_bits(cmd_buffer,
|
||||
ANV_PIPE_TILE_CACHE_FLUSH_BIT,
|
||||
"D16 or S8 HIZ-CCS flush");
|
||||
"HIZ-CCS flush");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Transitions a HiZ-enabled depth buffer from one layout to another. Unless
|
||||
@@ -472,17 +468,15 @@ transition_stencil_buffer(struct anv_cmd_buffer *cmd_buffer,
|
||||
}
|
||||
}
|
||||
|
||||
/* Depth/Stencil writes by the render pipeline to D16 & S8 formats use a
|
||||
* different pairing bit for the compression cache line. This means that
|
||||
* there is potential for aliasing with the wrong cache if you use another
|
||||
* format OR a piece of HW that does not use the same pairing. To avoid
|
||||
* this, flush the tile cache as the compression data does not live in the
|
||||
* color/depth cache.
|
||||
/* Additional tile cache flush for MTL:
|
||||
*
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/10420
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/10530
|
||||
*/
|
||||
if (anv_image_format_is_d16_or_s8(image)) {
|
||||
if (intel_device_info_is_mtl(cmd_buffer->device->info)) {
|
||||
anv_add_pending_pipe_bits(cmd_buffer,
|
||||
ANV_PIPE_TILE_CACHE_FLUSH_BIT,
|
||||
"D16 or S8 HIZ-CCS flush");
|
||||
"HIZ-CCS flush");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user