Lines Matching refs:sctx
167 static void si_add_fence_dependency(struct si_context *sctx, struct pipe_fence_handle *fence) in si_add_fence_dependency() argument
169 struct radeon_winsys *ws = sctx->ws; in si_add_fence_dependency()
171 if (sctx->sdma_cs) in si_add_fence_dependency()
172 ws->cs_add_fence_dependency(sctx->sdma_cs, fence, 0); in si_add_fence_dependency()
173 ws->cs_add_fence_dependency(sctx->gfx_cs, fence, 0); in si_add_fence_dependency()
176 static void si_add_syncobj_signal(struct si_context *sctx, struct pipe_fence_handle *fence) in si_add_syncobj_signal() argument
178 sctx->ws->cs_add_syncobj_signal(sctx->gfx_cs, fence); in si_add_syncobj_signal()
269 struct si_context *sctx; in si_fence_finish() local
273 sctx = (struct si_context *)(ctx ? ctx : NULL); in si_fence_finish()
325 if (sctx && sfence->gfx_unflushed.ctx == sctx && in si_fence_finish()
326 sfence->gfx_unflushed.ib_index == sctx->num_gfx_cs_flushes) { in si_fence_finish()
349 si_flush_gfx_cs(sctx, (timeout ? 0 : PIPE_FLUSH_ASYNC) | RADEON_FLUSH_START_NEXT_GFX_IB_NOW, in si_fence_finish()
465 struct si_context *sctx = (struct si_context *)ctx; in si_flush_from_st() local
466 struct radeon_winsys *ws = sctx->ws; in si_flush_from_st()
480 si_fine_fence_set(sctx, &fine, flags); in si_flush_from_st()
484 if (sctx->sdma_cs) in si_flush_from_st()
485 si_flush_dma_cs(sctx, rflags, fence ? &sdma_fence : NULL); in si_flush_from_st()
487 if (!radeon_emitted(sctx->gfx_cs, sctx->initial_gfx_cs_size)) { in si_flush_from_st()
489 ws->fence_reference(&gfx_fence, sctx->last_gfx_fence); in si_flush_from_st()
491 ws->cs_sync_flush(sctx->gfx_cs); in si_flush_from_st()
500 gfx_fence = sctx->ws->cs_get_next_fence(sctx->gfx_cs); in si_flush_from_st()
503 si_flush_gfx_cs(sctx, rflags, fence ? &gfx_fence : NULL); in si_flush_from_st()
531 multi_fence->gfx_unflushed.ctx = sctx; in si_flush_from_st()
532 multi_fence->gfx_unflushed.ib_index = sctx->num_gfx_cs_flushes; in si_flush_from_st()
546 if (sctx->sdma_cs) in si_flush_from_st()
547 ws->cs_sync_flush(sctx->sdma_cs); in si_flush_from_st()
548 ws->cs_sync_flush(sctx->gfx_cs); in si_flush_from_st()
554 struct si_context *sctx = (struct si_context *)ctx; in si_fence_server_signal() local
561 si_add_syncobj_signal(sctx, sfence->sdma); in si_fence_server_signal()
563 si_add_syncobj_signal(sctx, sfence->gfx); in si_fence_server_signal()
578 sctx->initial_gfx_cs_size = 0; in si_fence_server_signal()
584 struct si_context *sctx = (struct si_context *)ctx; in si_fence_server_sync() local
590 if (sfence->gfx_unflushed.ctx && sfence->gfx_unflushed.ctx == sctx) in si_fence_server_sync()
604 si_add_fence_dependency(sctx, sfence->sdma); in si_fence_server_sync()
606 si_add_fence_dependency(sctx, sfence->gfx); in si_fence_server_sync()