summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-06-09 18:37:27 -0500
committerTim Rowley <[email protected]>2017-06-16 16:20:16 -0500
commita6237e4b7fa4c14766b15fb3c638dce1e4b12ad9 (patch)
treed5c41a7ac7268409fe098918314f56c10b339ae9 /src/gallium/drivers/swr/swr_state.cpp
parent9b448da60ffb5aa807d9145bbac0fdbd580acea9 (diff)
swr/rast: Fix read-back of viewport array index
Binner/clipper read viewport array index from the vertex header as needed. Move viewport state to BACKEND_STATE. Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 19d961f05ae..c87393c57f1 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1755,12 +1755,12 @@ swr_update_derived(struct pipe_context *pipe,
(ctx->rasterizer->flatshade ? ctx->fs->flatConstantMask : 0);
backendState.pointSpriteTexCoordMask = ctx->fs->pointSpriteMask;
- if (ctx->gs)
- backendState.readRenderTargetArrayIndex =
- ctx->gs->info.base.writes_layer;
- else
- backendState.readRenderTargetArrayIndex =
- ctx->vs->info.base.writes_layer;
+ struct tgsi_shader_info *pLastFE =
+ ctx->gs ?
+ &ctx->gs->info.base :
+ &ctx->vs->info.base;
+ backendState.readRenderTargetArrayIndex = pLastFE->writes_layer;
+ backendState.readViewportArrayIndex = pLastFE->writes_viewport_index;
SwrSetBackendState(ctx->swrContext, &backendState);