diff options
author | Tim Rowley <[email protected]> | 2017-06-09 12:57:39 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-06-16 16:20:16 -0500 |
commit | 08a466aec0b1baf54a7ca7b0d7d43bb267e01841 (patch) | |
tree | 7583f904921769685bcc816e1c37e04644f23160 /src/gallium/drivers/swr/swr_state.cpp | |
parent | 17cdd1e7964d87c2918469a5f961500ad2b00581 (diff) |
swr/rast: Fix read-back of render target array index
The last FE stage can emit render target array index. Currently we only
check to see if GS is emitting it. Moved the state to BACKEND_STATE and
plumbed the driver to set it.
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.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index abdcef7b2f3..19d961f05ae 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -1755,6 +1755,13 @@ 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; + SwrSetBackendState(ctx->swrContext, &backendState); /* Ensure that any in-progress attachment change StoreTiles finish */ |