diff options
author | Rob Clark <robclark@freedesktop.org> | 2014-10-21 11:28:53 -0400 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-10-29 17:46:36 +0000 |
commit | eaff221c9cea778689166c8645b947a764c0268b (patch) | |
tree | 1f28f262667b31c5437bf65f737f76a0aa10c9bd /src | |
parent | a95a93b557b9646840864e39b01e2f0598470cb5 (diff) |
freedreno: mark scissor state dirty when enable bit changes
We don't have a scissor enable bit in hw, so when a raster state change
results in scissor enable bit changing, we need to also mark scissor
state as dirty.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
(cherry picked from commit 3eb8289aa4cb599e9297ee1a1b5cfbae35ee562a)
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index 27869295622..6293f439125 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -237,8 +237,18 @@ static void fd_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso) { struct fd_context *ctx = fd_context(pctx); + struct pipe_scissor_state *old_scissor = fd_context_get_scissor(ctx); + ctx->rasterizer = hwcso; ctx->dirty |= FD_DIRTY_RASTERIZER; + + /* if scissor enable bit changed we need to mark scissor + * state as dirty as well: + * NOTE: we can do a shallow compare, since we only care + * if it changed to/from &ctx->disable_scissor + */ + if (old_scissor != fd_context_get_scissor(ctx)) + ctx->dirty |= FD_DIRTY_SCISSOR; } static void |