diff options
author | Rob Clark <[email protected]> | 2013-03-06 10:45:58 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2013-03-25 13:05:44 -0400 |
commit | 732b0b5ebc5a30b6e87f67aabfb0e25d3e662d41 (patch) | |
tree | 9990fab014019ba0108fea776cd14aeab3aac8d7 /src/gallium/drivers/freedreno/freedreno_vbo.c | |
parent | 8a4750fe5e3fb5368edecbc7a0f835aada32d49e (diff) |
freedreno: track maximal scissor bounds
Optimize out parts of the render target that are scissored out by taking
into account maximal scissor bounds in fd_gmem_render_tiles().
This is a big win on things like gnome-shell which frequently do partial
screen updates.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_vbo.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_vbo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_vbo.c b/src/gallium/drivers/freedreno/freedreno_vbo.c index fc33539e213..e992b8cf452 100644 --- a/src/gallium/drivers/freedreno/freedreno_vbo.c +++ b/src/gallium/drivers/freedreno/freedreno_vbo.c @@ -141,7 +141,7 @@ static void fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) { struct fd_context *ctx = fd_context(pctx); - struct pipe_framebuffer_state *fb = &ctx->framebuffer.base; + struct pipe_framebuffer_state *fb = &ctx->framebuffer; struct fd_ringbuffer *ring = ctx->ring; struct fd_bo *idx_bo = NULL; enum pc_di_index_size idx_type = INDEX_SIZE_IGN; @@ -149,6 +149,12 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) uint32_t idx_size, idx_offset; unsigned buffers; + /* if we supported transform feedback, we'd have to disable this: */ + if (((ctx->scissor.maxx - ctx->scissor.minx) * + (ctx->scissor.maxy - ctx->scissor.miny)) == 0) { + return; + } + ctx->needs_flush = true; if (info->indexed) { |