diff options
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_state.cpp | 12 |
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); |