mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
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:
parent
20adc7449c
commit
b0e842bd9f
2 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue