summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-08-17 14:30:32 -0500
committerTim Rowley <[email protected]>2016-08-17 17:08:55 -0500
commit0ff57446e3786243c6d752c91be2108595f2663e (patch)
treec2c4c830729736554c65663e9f50a8a065e0dbcd /src/gallium/drivers/swr/swr_state.cpp
parent6209dbf5a44c8fc3f4e5b0eeb16619a11d5657bf (diff)
swr: [rasterizer core] only use Viewport/Scissors during SwrDraw* operations
Add explicit rects for: - SwrClearRenderTarget - SwrDiscardRect - SwrInvalidateTiles - SwrStoreTiles Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index de41ddc704d..4c9a4327e29 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -575,6 +575,10 @@ swr_set_scissor_states(struct pipe_context *pipe,
struct swr_context *ctx = swr_context(pipe);
ctx->scissor = *scissor;
+ ctx->swr_scissor.xmin = scissor->minx;
+ ctx->swr_scissor.xmax = scissor->maxx;
+ ctx->swr_scissor.ymin = scissor->miny;
+ ctx->swr_scissor.ymax = scissor->maxy;
ctx->dirty |= SWR_NEW_SCISSOR;
}
@@ -930,10 +934,7 @@ swr_update_derived(struct pipe_context *pipe,
/* Scissor */
if (ctx->dirty & SWR_NEW_SCISSOR) {
- pipe_scissor_state *scissor = &ctx->scissor;
- BBOX bbox(scissor->miny, scissor->maxy,
- scissor->minx, scissor->maxx);
- SwrSetScissorRects(ctx->swrContext, 1, &bbox);
+ SwrSetScissorRects(ctx->swrContext, 1, &ctx->swr_scissor);
}
/* Viewport */