[Mesa-dev] [PATCH 4/5] i965/query: Use brw_bo_map to handle stall warnings.
Ben Widawsky
ben at bwidawsk.net
Sat Dec 13 20:28:53 PST 2014
On Fri, Dec 12, 2014 at 11:15:41PM -0800, Kenneth Graunke wrote:
> This is less code and also measures the duration of the stall for us.
>
> Our old code predates the existance of brw_bo_map().
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Eero Tamminen <eero.t.tamminen at intel.com>
> ---
> src/mesa/drivers/dri/i965/gen6_queryobj.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
> index 9d2e5c4..0d51390 100644
> --- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
> +++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
> @@ -121,13 +121,7 @@ gen6_queryobj_get_results(struct gl_context *ctx,
> if (query->bo == NULL)
> return;
>
> - if (unlikely(brw->perf_debug)) {
> - if (drm_intel_bo_busy(query->bo)) {
> - perf_debug("Stalling on the GPU waiting for a query object.\n");
> - }
> - }
> -
> - drm_intel_bo_map(query->bo, false);
> + brw_bo_map(brw, query->bo, false, "query object");
> uint64_t *results = query->bo->virtual;
> switch (query->Base.Target) {
> case GL_TIME_ELAPSED:
2-4 are also
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
Need a bit more time to review 5
More information about the mesa-dev
mailing list