示例#1
0
static void
fd_context_next_rb(struct pipe_context *pctx)
{
	struct fd_context *ctx = fd_context(pctx);
	struct fd_ringbuffer *ring;

	fd_ringmarker_del(ctx->draw_start);
	fd_ringmarker_del(ctx->draw_end);

	ring = next_rb(ctx);

	ctx->draw_start = fd_ringmarker_new(ring);
	ctx->draw_end = fd_ringmarker_new(ring);

	fd_ringbuffer_set_parent(ring, NULL);
	ctx->ring = ring;

	fd_ringmarker_del(ctx->binning_start);
	fd_ringmarker_del(ctx->binning_end);

	ring = next_rb(ctx);

	ctx->binning_start = fd_ringmarker_new(ring);
	ctx->binning_end = fd_ringmarker_new(ring);

	fd_ringbuffer_set_parent(ring, ctx->ring);
	ctx->binning_ring = ring;
}
void
fd_context_destroy(struct pipe_context *pctx)
{
	struct fd_context *ctx = fd_context(pctx);

	DBG("");

	if (ctx->blitter)
		util_blitter_destroy(ctx->blitter);

	fd_ringmarker_del(ctx->draw_start);
	fd_ringmarker_del(ctx->draw_end);
	fd_ringbuffer_del(ctx->ring);

	FREE(ctx);
}
示例#3
0
void
fd_context_destroy(struct pipe_context *pctx)
{
	struct fd_context *ctx = fd_context(pctx);
	unsigned i;

	DBG("");

	fd_prog_fini(pctx);
	fd_hw_query_fini(pctx);

	util_dynarray_fini(&ctx->draw_patches);

	if (ctx->blitter)
		util_blitter_destroy(ctx->blitter);

	if (ctx->primconvert)
		util_primconvert_destroy(ctx->primconvert);

	util_slab_destroy(&ctx->transfer_pool);

	fd_ringmarker_del(ctx->draw_start);
	fd_ringmarker_del(ctx->draw_end);
	fd_ringmarker_del(ctx->binning_start);
	fd_ringmarker_del(ctx->binning_end);

	for (i = 0; i < ARRAY_SIZE(ctx->rings); i++)
		fd_ringbuffer_del(ctx->rings[i]);

	for (i = 0; i < ARRAY_SIZE(ctx->pipe); i++) {
		struct fd_vsc_pipe *pipe = &ctx->pipe[i];
		if (!pipe->bo)
			break;
		fd_bo_del(pipe->bo);
	}

	fd_device_del(ctx->dev);

	FREE(ctx);
}