summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-11-30 15:07:34 +1000
committerDave Airlie <airlied@redhat.com>2015-12-04 04:03:58 +0000
commit8b3732fb8df707552d4b593c32232e91d75e6225 (patch)
tree53519a43fb7ca0c44137926ab0fda01755c089a8
parent00ad5f9be439353c35f0918695587b0f87c91b73 (diff)
r600: bind geometry shader ring to the correct place
When tess/gs are enabled, the geom shader ring needs to bind to the tess eval not the vertex shader. Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 9d0adfcb2a4..48130d7a9cd 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -1354,13 +1354,20 @@ static void update_gs_block_state(struct r600_context *rctx, unsigned enable)
if (enable) {
r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_GEOMETRY,
R600_GS_RING_CONST_BUFFER, &rctx->gs_rings.esgs_ring);
- r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_VERTEX,
- R600_GS_RING_CONST_BUFFER, &rctx->gs_rings.gsvs_ring);
+ if (rctx->tes_shader) {
+ r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_TESS_EVAL,
+ R600_GS_RING_CONST_BUFFER, &rctx->gs_rings.gsvs_ring);
+ } else {
+ r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_VERTEX,
+ R600_GS_RING_CONST_BUFFER, &rctx->gs_rings.gsvs_ring);
+ }
} else {
r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_GEOMETRY,
R600_GS_RING_CONST_BUFFER, NULL);
r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_VERTEX,
R600_GS_RING_CONST_BUFFER, NULL);
+ r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_TESS_EVAL,
+ R600_GS_RING_CONST_BUFFER, NULL);
}
}
}