Module: Mesa Branch: staging/20.1 Commit: d7ae273cbfa93ad02914fcf2b776cf862498485a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7ae273cbfa93ad02914fcf2b776cf862498485a
Author: Bas Nieuwenhuizen <[email protected]> Date: Sun Jul 5 18:57:35 2020 +0200 radv: Always enable PERFECT_ZPASS_COUNTS. We have an issue with early depth testing and discard, where non-perfect counts count the tile if the early depth test succeeds. We could spend a lot of effort to set this conditionally based on the presence of the two conditions, but in the presence of inherited queries let's try this first. Changing PERFECT_ZPASS_COUNTS since I'm pretty sure this has a lower performance impact than always using late depth testing. CC: <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3218 Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5757> (cherry picked from commit ad913a18b14f25b4f6995cb8a8b0c55c747029d8) --- .pick_status.json | 2 +- src/amd/vulkan/radv_cmd_buffer.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 5437ff345c7..9337f4a631b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -121,7 +121,7 @@ "description": "radv: Always enable PERFECT_ZPASS_COUNTS.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b0ef1e9a08e..1b8aef3eadb 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2176,8 +2176,11 @@ void radv_set_db_count_control(struct radv_cmd_buffer *cmd_buffer) bool gfx10_perfect = cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10 && has_perfect_queries; if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX7) { + /* Always enable PERFECT_ZPASS_COUNTS due to issues with partially + * covered tiles, discards, and early depth testing. For more details, + * see https://gitlab.freedesktop.org/mesa/mesa/-/issues/3218 */ db_count_control = - S_028004_PERFECT_ZPASS_COUNTS(has_perfect_queries) | + S_028004_PERFECT_ZPASS_COUNTS(1) | S_028004_DISABLE_CONSERVATIVE_ZPASS_COUNTS(gfx10_perfect) | S_028004_SAMPLE_RATE(sample_rate) | S_028004_ZPASS_ENABLE(1) | _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
