summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-02-22 17:42:20 +0100
committerMarek Olšák <[email protected]>2015-02-24 21:21:04 +0100
commitfdf2c04737741c3bfaf2fc2167bcae4160dfeab3 (patch)
tree6037563d233c394ec98d00eb7d416931a0f34867 /src/gallium
parent0b1f31ab7fb323df14801dc3869c9de437c174d5 (diff)
radeonsi: small cleanup around current_rast_prim
- remove the last parameter of si_emit_rasterizer_prim_state - remove the last unused parameter of si_emit_draw_registers - use current_rast_prim in si_emit_draw_registers Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index cb147c36708..eb2d0154765 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -150,9 +150,10 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx,
}
/* rast_prim is the primitive type after GS. */
-static void si_emit_rasterizer_prim_state(struct si_context *sctx, unsigned rast_prim)
+static void si_emit_rasterizer_prim_state(struct si_context *sctx)
{
struct radeon_winsys_cs *cs = sctx->b.rings.gfx.cs;
+ unsigned rast_prim = sctx->current_rast_prim;
if (rast_prim == sctx->last_rast_prim)
return;
@@ -172,15 +173,11 @@ static void si_emit_rasterizer_prim_state(struct si_context *sctx, unsigned rast
}
static void si_emit_draw_registers(struct si_context *sctx,
- const struct pipe_draw_info *info,
- const struct pipe_index_buffer *ib)
+ const struct pipe_draw_info *info)
{
struct radeon_winsys_cs *cs = sctx->b.rings.gfx.cs;
unsigned prim = si_conv_pipe_prim(info->mode);
- unsigned gs_out_prim =
- si_conv_prim_to_gs_out(sctx->gs_shader ?
- sctx->gs_shader->gs_output_prim :
- info->mode);
+ unsigned gs_out_prim = si_conv_prim_to_gs_out(sctx->current_rast_prim);
unsigned ia_multi_vgt_param = si_get_ia_multi_vgt_param(sctx, info);
/* Draw state. */
@@ -598,8 +595,8 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
}
si_pm4_emit_dirty(sctx);
- si_emit_rasterizer_prim_state(sctx, sctx->current_rast_prim);
- si_emit_draw_registers(sctx, info, &ib);
+ si_emit_rasterizer_prim_state(sctx);
+ si_emit_draw_registers(sctx, info);
si_emit_draw_packets(sctx, info, &ib);
#if SI_TRACE_CS