freedreno/a6xx: Add LRZ perf warn for ztest direction changes
Add a perf warning when LRZ invalidate happens due to depth test direction reversal. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
This commit is contained in:
@@ -186,6 +186,10 @@ compute_lrz_state(struct fd6_emit *emit) assert_dt
|
||||
*/
|
||||
if (zsa->base.depth_enabled && (rsc->lrz_direction != FD_LRZ_UNKNOWN) &&
|
||||
(rsc->lrz_direction != lrz.direction)) {
|
||||
if (!zsa->perf_warn_zdir && rsc->lrz_valid) {
|
||||
perf_debug_ctx(ctx, "Invalidating LRZ due to depth test direction change");
|
||||
zsa->perf_warn_zdir = true;
|
||||
}
|
||||
rsc->lrz_valid = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,9 +48,15 @@ struct fd6_zsa_stateobj {
|
||||
uint32_t rb_stencilwrmask;
|
||||
|
||||
struct fd6_lrz_state lrz;
|
||||
bool writes_zs; /* writes depth and/or stencil */
|
||||
bool invalidate_lrz;
|
||||
bool alpha_test;
|
||||
bool writes_zs : 1; /* writes depth and/or stencil */
|
||||
bool invalidate_lrz : 1;
|
||||
bool alpha_test : 1;
|
||||
|
||||
/* Track whether we've alread generated perf warns so that
|
||||
* we don't flood the user with LRZ disable warns which can
|
||||
* only be detected at draw time.
|
||||
*/
|
||||
bool perf_warn_zdir : 1;
|
||||
|
||||
struct fd_ringbuffer *stateobj[4];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user