summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xa/xa_context.c
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2014-04-08 16:48:50 -0400
committerThomas Hellstrom <thellstrom@vmware.com>2014-04-17 09:42:06 +0200
commita45ae814d1985bb9e72ba8f5cb73e070d22bd5b6 (patch)
tree907c37bb2a453670e5aeab335a543a82c0df2a59 /src/gallium/state_trackers/xa/xa_context.c
parent3c520132737623d53e5c8dec6d3496ab8dffda1f (diff)
downloadexternal_mesa3d-a45ae814d1985bb9e72ba8f5cb73e070d22bd5b6.zip
external_mesa3d-a45ae814d1985bb9e72ba8f5cb73e070d22bd5b6.tar.gz
external_mesa3d-a45ae814d1985bb9e72ba8f5cb73e070d22bd5b6.tar.bz2
st/xa: scissor to help tilers
Keep track of the maximal bounds of all the operations and set scissor accordingly. For tiling GPU's this can be a big win by reducing the memory bandwidth spent moving pixels from system memory to tile buffer and back. You could imagine being more sophisticated and splitting up disjoint operations. But this simplistic approach is good enough for the common cases. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'src/gallium/state_trackers/xa/xa_context.c')
-rw-r--r--src/gallium/state_trackers/xa/xa_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c
index ee32676..867999a 100644
--- a/src/gallium/state_trackers/xa/xa_context.c
+++ b/src/gallium/state_trackers/xa/xa_context.c
@@ -238,6 +238,8 @@ xa_copy(struct xa_context *ctx,
{
struct pipe_box src_box;
+ xa_scissor_update(ctx, dx, dy, dx + width, dy + height);
+
if (ctx->simple_copy) {
u_box_2d(sx, sy, width, height, &src_box);
ctx->pipe->resource_copy_region(ctx->pipe,
@@ -324,6 +326,7 @@ xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
XA_EXPORT void
xa_solid(struct xa_context *ctx, int x, int y, int width, int height)
{
+ xa_scissor_update(ctx, x, y, x + width, y + height);
renderer_solid(ctx, x, y, x + width, y + height, ctx->solid_color);
}