summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-12-07 01:36:21 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2015-12-12 19:39:02 +0000
commit5913a8c9ecf05ad7ee38cb1fe0358048731cc78c (patch)
treefa5d0ad27547c16efb3921606f222690683bf650
parent3c9e76fc24189e1af3c43e913610a78d280bbbd9 (diff)
r600g: fix outputing to non-0 buffers for stream 0.
This fixes: arb_transform_feedback3-ext_interleaved_two_bufs_gs arb_transform_feedback3-ext_interleaved_two_bufs_gs_max transform-feedback-builtins If we are only emitting one ring, then emit all output buffers on it. Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit e97ac006d77ccbc87a56e46e2f75da6511c9b9e5) [Emil Velikov: squash trivial conflicts] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Conflicts: src/gallium/drivers/r600/r600_shader.c
-rw-r--r--src/gallium/drivers/r600/r600_shader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index c3bc5eca455..4c68a4a2b79 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1498,7 +1498,7 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
*last_exp_pos = NULL, *last_exp_param = NULL;
int i, j, next_clip_pos = 61, next_param = 0;
int ring;
-
+ bool only_ring_0 = true;
cshader = calloc(1, sizeof(struct r600_pipe_shader));
if (!cshader)
return 0;
@@ -1570,6 +1570,8 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
for (i = 0; i < so->num_outputs; i++) {
if (so->output[i].stream == ring) {
enabled = true;
+ if (ring > 0)
+ only_ring_0 = false;
break;
}
}
@@ -1604,7 +1606,7 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
cf_jump = ctx.bc->cf_last;
if (enabled)
- emit_streamout(&ctx, so, ring, &cshader->shader.ring_item_sizes[ring]);
+ emit_streamout(&ctx, so, only_ring_0 ? -1 : ring, &cshader->shader.ring_item_sizes[ring]);
cshader->shader.ring_item_sizes[ring] = ocnt * 16;
}