diff options
author | Eric Anholt <[email protected]> | 2018-03-23 16:18:02 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-03-26 17:46:19 -0700 |
commit | 1bf466270d416643e8fcacd6b790e53660303059 (patch) | |
tree | 3ae25f7ebdd170df7afd3aa1ac4d2e82022673ce /src/gallium/drivers/vc5/vc5_rcl.c | |
parent | 262208eb3c2c53a1fd807bc76b12088f6ce2c56d (diff) |
broadcom/vc5: Fix EZ disabling and allow using GT/GE direction as well.
Once we've disabled EZ for some draws, we need to not use EZ on future
draws. Implementing that made implementing the GT/GE direction trivial.
Fixes KHR-GLES3.shaders.fragdepth.compare.no_write on V3D 4.1 simulation.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_rcl.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_rcl.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c index a5efa32e215..8ff1515f883 100644 --- a/src/gallium/drivers/vc5/vc5_rcl.c +++ b/src/gallium/drivers/vc5/vc5_rcl.c @@ -481,7 +481,21 @@ v3dX(emit_rcl)(struct vc5_job *job) /* XXX: Early D/S clear */ - config.early_z_disable = !job->uses_early_z; + switch (job->first_ez_state) { + case VC5_EZ_UNDECIDED: + case VC5_EZ_LT_LE: + config.early_z_disable = false; + config.early_z_test_and_update_direction = + EARLY_Z_DIRECTION_LT_LE; + break; + case VC5_EZ_GT_GE: + config.early_z_disable = false; + config.early_z_test_and_update_direction = + EARLY_Z_DIRECTION_GT_GE; + break; + case VC5_EZ_DISABLED: + config.early_z_disable = true; + } config.image_width_pixels = job->draw_width; config.image_height_pixels = job->draw_height; |