turnip: Try harder to keep LRZ valid and fix a few edge cases
Refactored tu6_calculate_lrz_state and added comments.
-
If there is no depth write we could keep LRZ valid with any compare op, we just have to temporary disable LRZ for incompatible ops in such case.
-
Found that
VK_COMPARE_OP_EQUAL
is not compatible with LRZ, and since it doesn't change LRZ buffer - LRZ could be just temporary disabled. This fixes rendering of grass/trees in PUBG mobile on angle.
Closes: #6127 (closed)
I should test it better and eyeball a few more times.
Edited by Danylo Piliaiev