v3dv: use the global RCL EZ disable if we don't have any EZ draws in the job
Until now we would only disable EZ globally if we had a depth or stencil load operation or if we had no draw calls at all, but even if we have draw calls if all of them disable EZ we should also us the global disable. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16794>
This commit is contained in:
@@ -1082,6 +1082,9 @@ struct v3dv_job {
|
||||
*/
|
||||
bool decided_global_ez_enable;
|
||||
|
||||
/* If the job emitted any draw calls with Early Z/S enabled */
|
||||
bool has_ez_draws;
|
||||
|
||||
/* If this job has been configured to use early Z/S clear */
|
||||
bool early_zs_clear;
|
||||
|
||||
|
||||
@@ -754,11 +754,8 @@ set_rcl_early_z_config(struct v3dv_job *job,
|
||||
bool *early_z_disable,
|
||||
uint32_t *early_z_test_and_update_direction)
|
||||
{
|
||||
/* If this is true then we have not emitted any draw calls in this job
|
||||
* and we don't get any benefits form early Z.
|
||||
*/
|
||||
if (!job->decided_global_ez_enable) {
|
||||
assert(job->draw_count == 0);
|
||||
/* Disable if none of the draw calls in this job enabled EZ */
|
||||
if (!job->has_ez_draws) {
|
||||
*early_z_disable = true;
|
||||
return;
|
||||
}
|
||||
@@ -1533,6 +1530,9 @@ job_update_ez_state(struct v3dv_job *job,
|
||||
job->ez_state = V3D_EZ_DISABLED;
|
||||
}
|
||||
|
||||
if (!disable_ez)
|
||||
job->has_ez_draws = true;
|
||||
|
||||
return !disable_ez;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user