r600g: emit streamout from dma copy shader

This enables streamout with GS in the mix, from the
VS dma shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Dave Airlie 2013-12-19 05:17:00 +00:00
parent 20adc7449c
commit b0e842bd9f
2 changed files with 8 additions and 2 deletions

View file

@ -1095,7 +1095,8 @@ out_err:
}
static int generate_gs_copy_shader(struct r600_context *rctx,
struct r600_pipe_shader *gs)
struct r600_pipe_shader *gs,
struct pipe_stream_output_info *so)
{
struct r600_shader_ctx ctx = {};
struct r600_shader *gs_shader = &gs->shader;
@ -1179,6 +1180,7 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
}
/* XXX handle clipvertex, streamout? */
emit_streamout(&ctx, so);
/* export vertex data */
/* XXX factor out common code with r600_shader_from_tgsi ? */
@ -1961,7 +1963,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
}
if (ctx.type == TGSI_PROCESSOR_GEOMETRY) {
if ((r = generate_gs_copy_shader(rctx, pipeshader)))
if ((r = generate_gs_copy_shader(rctx, pipeshader, &so)))
return r;
}

View file

@ -826,6 +826,10 @@ static void r600_bind_gs_state(struct pipe_context *ctx, void *state)
struct r600_context *rctx = (struct r600_context *)ctx;
rctx->gs_shader = (struct r600_pipe_shader_selector *)state;
if (!state)
return;
rctx->b.streamout.stride_in_dw = rctx->gs_shader->so.stride;
}
static void r600_delete_shader_selector(struct pipe_context *ctx,