mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
tu: Prevent GPU hang with occlusion query + certain depth state
This state combination wedges something in GPU causing hang.
Forcing A6XX_LATE_Z prevents it. Prop driver does the same.
CC: mesa-stable
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37765>
(cherry picked from commit 02138d96fd)
This commit is contained in:
parent
7bd263c9ce
commit
7e6440ca6f
2 changed files with 13 additions and 1 deletions
|
|
@ -3104,7 +3104,7 @@
|
|||
"description": "tu: Prevent GPU hang with occlusion query + certain depth state",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -6362,6 +6362,18 @@ tu6_build_depth_plane_z_mode(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
|
|||
cmd->state.occlusion_query_may_be_running)
|
||||
zmode = A6XX_EARLY_Z_LATE_Z;
|
||||
|
||||
VkCompareOp compare_op =
|
||||
cmd->vk.dynamic_graphics_state.ds.depth.compare_op;
|
||||
/* This state combination wedges something in GPU causing hang.
|
||||
* Forcing A6XX_LATE_Z prevents it. Prop driver does the same.
|
||||
*/
|
||||
if (zmode == A6XX_EARLY_Z_LATE_Z && !depth_write &&
|
||||
cmd->state.occlusion_query_may_be_running &&
|
||||
(compare_op == VK_COMPARE_OP_ALWAYS ||
|
||||
compare_op == VK_COMPARE_OP_NEVER)) {
|
||||
zmode = A6XX_LATE_Z;
|
||||
}
|
||||
|
||||
if (zmode == A6XX_EARLY_Z_LATE_Z &&
|
||||
(cmd->state.stencil_written_on_depth_fail || fs->fs.per_samp ||
|
||||
!vk_format_has_depth(depth_format) || !ds_test_enable)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue