summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2013-06-01 14:16:30 -0400
committerRob Clark <[email protected]>2013-06-08 13:15:51 -0400
commite9edbf0a688c68ef0896e5d4278f411f6b6f8398 (patch)
treebd6ce7e7ae737c5fdefac62aa3c10b3be3029125 /src/gallium/drivers/freedreno/a2xx
parent4af1dcbb7d5431ae75cc39568c99d7a20231f081 (diff)
freedreno: better scissor fix
Actually respect rasterizer state. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_emit.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
index 8a40f9ab7ab..b03390ec436 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
@@ -238,17 +238,19 @@ fd2_emit_state(struct fd_context *ctx, uint32_t dirty)
}
if (dirty & FD_DIRTY_SCISSOR) {
+ struct pipe_scissor_state *scissor = fd_context_get_scissor(ctx);
+
OUT_PKT3(ring, CP_SET_CONSTANT, 3);
OUT_RING(ring, CP_REG(REG_A2XX_PA_SC_WINDOW_SCISSOR_TL));
- OUT_RING(ring, xy2d(ctx->scissor.minx, /* PA_SC_WINDOW_SCISSOR_TL */
- ctx->scissor.miny));
- OUT_RING(ring, xy2d(ctx->scissor.maxx, /* PA_SC_WINDOW_SCISSOR_BR */
- ctx->scissor.maxy));
-
- ctx->max_scissor.minx = MIN2(ctx->max_scissor.minx, ctx->scissor.minx);
- ctx->max_scissor.miny = MIN2(ctx->max_scissor.miny, ctx->scissor.miny);
- ctx->max_scissor.maxx = MAX2(ctx->max_scissor.maxx, ctx->scissor.maxx);
- ctx->max_scissor.maxy = MAX2(ctx->max_scissor.maxy, ctx->scissor.maxy);
+ OUT_RING(ring, xy2d(scissor->minx, /* PA_SC_WINDOW_SCISSOR_TL */
+ scissor->miny));
+ OUT_RING(ring, xy2d(scissor->maxx, /* PA_SC_WINDOW_SCISSOR_BR */
+ scissor->maxy));
+
+ ctx->max_scissor.minx = MIN2(ctx->max_scissor.minx, scissor->minx);
+ ctx->max_scissor.miny = MIN2(ctx->max_scissor.miny, scissor->miny);
+ ctx->max_scissor.maxx = MAX2(ctx->max_scissor.maxx, scissor->maxx);
+ ctx->max_scissor.maxy = MAX2(ctx->max_scissor.maxy, scissor->maxy);
}
if (dirty & FD_DIRTY_VIEWPORT) {