diff options
author | Kenneth Graunke <[email protected]> | 2013-02-25 23:31:10 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-03-01 22:09:04 -0800 |
commit | 614944b8975ce9827b26b92f42ad8b48493eb7f0 (patch) | |
tree | 602b27f409fb81861dcaaba4c419d2ecdd948ffb /src/mesa/drivers/dri/i965/brw_queryobj.c | |
parent | 981a22b62bc7f8e50ba8bcb0a7f329c25bd53c8d (diff) |
i965: Turn if (query->bo) into an assertion.
The code a few lines above calls brw_emit_query_begin() if !query->bo,
and that creates query->bo. So it should always be non-NULL.
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_queryobj.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_queryobj.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c index 0881ab93893..0cdfa6e486b 100644 --- a/src/mesa/drivers/dri/i965/brw_queryobj.c +++ b/src/mesa/drivers/dri/i965/brw_queryobj.c @@ -404,12 +404,12 @@ brw_end_query(struct gl_context *ctx, struct gl_query_object *q) brw_emit_query_begin(brw); } - if (query->bo) { - brw_emit_query_end(brw); + assert(query->bo); - drm_intel_bo_unreference(brw->query.bo); - brw->query.bo = NULL; - } + brw_emit_query_end(brw); + + drm_intel_bo_unreference(brw->query.bo); + brw->query.bo = NULL; brw->query.obj = NULL; |