X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ffreedreno%2Ffreedreno_context.h;h=41f67a87d3c7aa2baed48728524bd9aaa4d32316;hb=8cdc6c1e4b632cea6934836ca4962a555a1172c6;hp=1a60f978597a1e642539890808fb58c08ecedfb3;hpb=cbae9f34e9c80635a99a6cb2b0371bb67c5d7e62;p=mesa.git diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 1a60f978597..41f67a87d3c 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -66,6 +66,7 @@ struct fd_constbuf_stateobj { struct fd_shaderbuf_stateobj { struct pipe_shader_buffer sb[PIPE_MAX_SHADER_BUFFERS]; uint32_t enabled_mask; + uint32_t writable_mask; }; struct fd_shaderimg_stateobj { @@ -159,12 +160,20 @@ enum fd_dirty_shader_state { struct fd_context { struct pipe_context base; + /* We currently need to serialize emitting GMEM batches, because of + * VSC state access in the context. + * + * In practice this lock should not be contended, since pipe_context + * use should be single threaded. But it is needed to protect the + * case, with batch reordering where a ctxB batch triggers flushing + * a ctxA batch + */ + mtx_t gmem_lock; + struct fd_device *dev; struct fd_screen *screen; struct fd_pipe *pipe; - struct util_queue flush_queue; - struct blitter_context *blitter; void *clear_rs_state; struct primconvert_context *primconvert; @@ -193,6 +202,11 @@ struct fd_context { struct list_head acc_active_queries; /*@}*/ + /* Whether we need to walk the acc_active_queries next fd_set_stage() to + * update active queries (even if stage doesn't change). + */ + bool update_active_queries; + /* table with PIPE_PRIM_MAX entries mapping PIPE_PRIM_x to * DI_PT_x value to use for draw initiator. There are some * slight differences between generation: @@ -259,14 +273,6 @@ struct fd_context { */ struct pipe_scissor_state disabled_scissor; - /* Current gmem/tiling configuration.. gets updated on render_tiles() - * if out of date with current maximal-scissor/cpp: - * - * (NOTE: this is kind of related to the batch, but moving it there - * means we'd always have to recalc tiles ever batch) - */ - struct fd_gmem_stateobj gmem; - /* Per vsc pipe bo's (a2xx-a5xx): */ struct fd_bo *vsc_pipe_bo[32]; @@ -468,9 +474,8 @@ fd_batch_set_stage(struct fd_batch *batch, enum fd_render_stage stage) * don't enable queries which should be paused during internal * blits: */ - if ((batch->stage == FD_STAGE_BLIT) && - (stage != FD_STAGE_NULL)) - return; + if (batch->stage == FD_STAGE_BLIT && stage != FD_STAGE_NULL) + stage = FD_STAGE_BLIT; if (ctx->query_set_stage) ctx->query_set_stage(batch, stage);