From 6cc76a12dfcd6e9935262656eede7e97a22e11c1 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 6 Jun 2011 22:23:59 +0200 Subject: [PATCH] r600g : fix incorrect size computation in r600_query_result --- src/gallium/winsys/r600/drm/r600_hw_context.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c index a3c8945..b2f7406 100644 --- a/src/gallium/winsys/r600/drm/r600_hw_context.c +++ b/src/gallium/winsys/r600/drm/r600_hw_context.c @@ -1546,7 +1546,8 @@ static boolean r600_query_result(struct r600_context *ctx, struct r600_query *qu if (!results) return FALSE; - size = query->num_results * (query->type == PIPE_QUERY_OCCLUSION_COUNTER ? ctx->max_db : 1); + /* query->num_results contains how many dword were written by hw */ + size = query->num_results; for (i = 0; i < size; i += 4) { start = (u64)results[i] | (u64)results[i + 1] << 32; end = (u64)results[i + 2] | (u64)results[i + 3] << 32; -- 1.7.5.1