summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2013-12-20 20:48:18 -0500
committerRob Clark <[email protected]>2013-12-26 12:06:29 -0500
commitbe01d7a905d827c3c0c222cab2430c6d4575429a (patch)
treefc714be776c88076f061280b60137c1322af103b /src/gallium/drivers/freedreno/freedreno_context.c
parent64fe0670664bc6f2c75cc1630aa07cef1898b8b5 (diff)
freedreno: prepare for hw binning
Actually assign VSC_PIPE's properly, which will be needed for tiling. And introduce fd_tile for per-tile state (including the assignment of tile to VSC_PIPE). This gives us the proper pipe setup that we'll need for hw binning pass, and also cleans things up a bit by not having to pass so many parameters around. And will also make it easier to introduce different tiling patterns (since we may no longer render tiles in a simple left-to-right top-to-bottom pattern). Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index ddb8a0b78fb..c959ccfcc89 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -117,6 +117,7 @@ void
fd_context_destroy(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
+ unsigned i;
DBG("");
@@ -130,6 +131,13 @@ fd_context_destroy(struct pipe_context *pctx)
fd_ringmarker_del(ctx->draw_end);
fd_ringbuffer_del(ctx->ring);
+ 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);
+ }
+
FREE(ctx);
}