freedreno: add fd_context_batch() accessor
[mesa.git] / src / gallium / drivers / freedreno / freedreno_query_hw.c
index 86a46faa7308c58ea4c98f6095f3baa6bae3f947..a321db3e9375633db348a6069385b63313e47b82 100644 (file)
@@ -137,7 +137,7 @@ fd_hw_destroy_query(struct fd_context *ctx, struct fd_query *q)
 static boolean
 fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
 {
-       struct fd_batch *batch = ctx->batch;
+       struct fd_batch *batch = fd_context_batch(ctx);
        struct fd_hw_query *hq = fd_hw_query(q);
 
        DBG("%p: active=%d", q, q->active);
@@ -158,7 +158,7 @@ fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
 static void
 fd_hw_end_query(struct fd_context *ctx, struct fd_query *q)
 {
-       struct fd_batch *batch = ctx->batch;
+       struct fd_batch *batch = fd_context_batch(ctx);
        struct fd_hw_query *hq = fd_hw_query(q);
 
        DBG("%p: active=%d", q, q->active);