summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/swr_draw.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_draw.cpp32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp
index 0f6a8c6d88c..a46aef924ab 100644
--- a/src/gallium/drivers/swr/swr_draw.cpp
+++ b/src/gallium/drivers/swr/swr_draw.cpp
@@ -258,37 +258,13 @@ swr_store_render_target(struct pipe_context *pipe,
/* Only proceed if there's a valid surface to store to */
if (renderTarget->pBaseAddress) {
- /* Set viewport to full renderTarget width/height and disable scissor
- * before StoreTiles */
- boolean change_viewport =
- (ctx->derived.vp.x != 0.0f || ctx->derived.vp.y != 0.0f
- || ctx->derived.vp.width != renderTarget->width
- || ctx->derived.vp.height != renderTarget->height);
- if (change_viewport) {
- SWR_VIEWPORT vp = {0};
- vp.width = renderTarget->width;
- vp.height = renderTarget->height;
- SwrSetViewports(ctx->swrContext, 1, &vp, NULL);
- }
-
- boolean scissor_enable = ctx->derived.rastState.scissorEnable;
- if (scissor_enable) {
- ctx->derived.rastState.scissorEnable = FALSE;
- SwrSetRastState(ctx->swrContext, &ctx->derived.rastState);
- }
-
swr_update_draw_context(ctx);
+ SWR_RECT full_rect =
+ {0, 0, (int32_t)renderTarget->width, (int32_t)renderTarget->height};
SwrStoreTiles(ctx->swrContext,
(enum SWR_RENDERTARGET_ATTACHMENT)attachment,
- post_tile_state);
-
- /* Restore viewport and scissor enable */
- if (change_viewport)
- SwrSetViewports(ctx->swrContext, 1, &ctx->derived.vp, &ctx->derived.vpm);
- if (scissor_enable) {
- ctx->derived.rastState.scissorEnable = scissor_enable;
- SwrSetRastState(ctx->swrContext, &ctx->derived.rastState);
- }
+ post_tile_state,
+ full_rect);
}
}