freedreno: add fd_context_batch() accessor
[mesa.git] / src / gallium / drivers / freedreno / freedreno_draw.c
index 3bcda342fb83655fae551492240799f6a87d3cb9..78bdc375e35ca1be76675b07cf5f03b69bd9d063 100644 (file)
@@ -62,7 +62,7 @@ static void
 fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
 {
        struct fd_context *ctx = fd_context(pctx);
-       struct fd_batch *batch = ctx->batch;
+       struct fd_batch *batch = fd_context_batch(ctx);
        struct pipe_framebuffer_state *pfb = &batch->framebuffer;
        struct pipe_scissor_state *scissor = fd_context_get_scissor(ctx);
        unsigned i, prims, buffers = 0, restore_buffers = 0;
@@ -346,7 +346,7 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
                const union pipe_color_union *color, double depth, unsigned stencil)
 {
        struct fd_context *ctx = fd_context(pctx);
-       struct fd_batch *batch = ctx->batch;
+       struct fd_batch *batch = fd_context_batch(ctx);
        struct pipe_framebuffer_state *pfb = &batch->framebuffer;
        struct pipe_scissor_state *scissor = fd_context_get_scissor(ctx);
        unsigned cleared_buffers;