diff options
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_streamout.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_streamout.c b/src/gallium/drivers/radeonsi/si_state_streamout.c index 42a83d4bd71..92c5c59d7e7 100644 --- a/src/gallium/drivers/radeonsi/si_state_streamout.c +++ b/src/gallium/drivers/radeonsi/si_state_streamout.c @@ -32,6 +32,12 @@ static void si_set_streamout_enable(struct si_context *sctx, bool enable); +static inline void si_so_target_reference(struct si_streamout_target **dst, + struct pipe_stream_output_target *src) +{ + pipe_so_target_reference((struct pipe_stream_output_target**)dst, src); +} + static struct pipe_stream_output_target * si_create_so_target(struct pipe_context *ctx, struct pipe_resource *buffer, @@ -100,7 +106,7 @@ void si_common_set_streamout_targets(struct pipe_context *ctx, /* Set the new targets. */ for (i = 0; i < num_targets; i++) { - pipe_so_target_reference((struct pipe_stream_output_target**)&sctx->streamout.targets[i], targets[i]); + si_so_target_reference(&sctx->streamout.targets[i], targets[i]); if (!targets[i]) continue; @@ -110,7 +116,7 @@ void si_common_set_streamout_targets(struct pipe_context *ctx, append_bitmask |= 1 << i; } for (; i < sctx->streamout.num_targets; i++) { - pipe_so_target_reference((struct pipe_stream_output_target**)&sctx->streamout.targets[i], NULL); + si_so_target_reference(&sctx->streamout.targets[i], NULL); } sctx->streamout.enabled_mask = enabled_mask; |