[Mesa-dev] [PATCH 9/9] i965: Pack simple pipelined query objects into the same buffer

Kenneth Graunke kenneth at whitecape.org
Wed Jun 14 23:19:35 UTC 2017


On Friday, June 9, 2017 6:01:40 AM PDT Chris Wilson wrote:
> Reuse the same query object buffer for multiple queries within the same
> batch.
> 
> A task for the future is propagating the GL_NO_MEMORY errors.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Matt Turner <mattst88 at gmail.com>
> ---
>  src/mesa/drivers/dri/i965/brw_context.c   |  3 +++
>  src/mesa/drivers/dri/i965/brw_context.h   | 10 ++++---
>  src/mesa/drivers/dri/i965/brw_queryobj.c  | 16 +++++------
>  src/mesa/drivers/dri/i965/gen6_queryobj.c | 44 ++++++++++++++++++++++++++-----
>  4 files changed, 55 insertions(+), 18 deletions(-)

The benefit is saving memory, right?

The downside seems to be increased WaitQuery() latencies:

- Start Query A
- End Query A
- Start Query B
- Batch Flush
- End Query B
- WaitQuery for A

The query BO also contains B, and both batches refer to it, so it seems
like WaitQuery() would wait for two batches to complete instead of one.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170614/fe08ff3f/attachment.sig>


More information about the mesa-dev mailing list