venus: misc qfb optimizations
What does this MR do and why?
venus: misc qfb optimizations
Summary:
- all but last commit are cleanups for clarity and robustness
- last commit optimizes qfb cmd from linear to constant overhead for most clients especially layerings
- Below is the common client pattern (app, angle, zink, etc):
- a few resets for queries to be used in this batch
- optional, depending on EXT_host_query_reset
- a few queries
- incremental
- can cross query pool boundary
- a few resets for queries to be used in this batch
- The HW drivers normally have faster shader path when there are too many
individual reset and copies. Without further resolving, this ends up
with linear overhead on the 2d engines. This change has largely
optimized that:
- angle: many copies => 1 copy (or 2)
- zink: many resets and copies => 1 reset and 1 copy (or 2)
- Below is the common client pattern (app, angle, zink, etc):
/cc @justonli