Skip to content

freedreno: Batch sub-passes

Rob Clark requested to merge robclark/mesa:fd/subpass into main

The idea is to, if we encounter a mid-batch clear, split out a new sub-pass rather than falling back to u_blitter for the clear. Some games do a near-end-of-pass depth clear before drawing on-screen controls with depth write disabled, instead of disabling depth test. (Some one should let them know that it is possible to disable depth test, but wtvr.. from what I've seen games can't be trusted to operate a gpu properly.) I've seen other cases (minetest, for ex) which do multiple depth clears and then draw more thighs with depth write enabled. We could emit mid-batch clears with CP_COND_EXEC to skip the gmem vs sysmem clear depending on whether we choose gmem or sysmem.. but using sub-passes lets us re-create the lrz buffer so we can do the post-clear draws with lrz enabled.

The 3d vs "fast" clear (2d or CP_EVENT_WRITE:BLIT) isn't a big difference, but on games that don't do much else it adds up.. worth +30% or so on 3dpoolball..

Merge request reports

Loading