X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ffreedreno%2Ffreedreno_context.h;h=80f2462fdd97952baf1cc53e4356b153fc3b297e;hb=b3b1fa5e2bc4a7df3c68bb0b234d4bcf68ffaa84;hp=d10de1a850462190a7be26cff3574e615459a7a4;hpb=91f9bb99c5e0db38a1ac26dd9e6a967312f5e8b0;p=mesa.git diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index d10de1a8504..80f2462fdd9 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -159,6 +159,16 @@ 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;