diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_rcl.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 9f52342d2dd..25be07c2437 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -308,6 +308,11 @@ struct v3d_job { */ bool needs_flush; + /* Set if any shader has dirtied cachelines in the TMU that need to be + * flushed before job end. + */ + bool tmu_dirty_rcl; + /** * Set if a packet enabling TF has been emitted in the job (V3D 4.x). */ diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c index 17b30465c9d..45115c0b0cc 100644 --- a/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/src/gallium/drivers/v3d/v3dx_rcl.c @@ -786,5 +786,20 @@ v3dX(emit_rcl)(struct v3d_job *job) } } + if (job->tmu_dirty_rcl) { + cl_emit(&job->rcl, L1_CACHE_FLUSH_CONTROL, flush) { + flush.tmu_config_cache_clear = 0xf; + flush.tmu_data_cache_clear = 0xf; + flush.uniforms_cache_clear = 0xf; + flush.instruction_cache_clear = 0xf; + } + + cl_emit(&job->rcl, L2T_CACHE_FLUSH_CONTROL, flush) { + flush.l2t_flush_mode = L2T_FLUSH_MODE_CLEAN; + flush.l2t_flush_start = cl_address(NULL, 0); + flush.l2t_flush_end = cl_address(NULL, ~0); + } + } + cl_emit(&job->rcl, END_OF_RENDERING, end); } |