diff options
author | Marek Olšák <[email protected]> | 2017-10-07 23:04:25 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-09 16:26:58 +0200 |
commit | a86c9328ce87fece002ea1f918829ec88d62b12c (patch) | |
tree | 47725afac1a780c973336687b385e12ab692b14c /src/gallium | |
parent | 65f2e33500bc648b1e9fc3a1b54938f157cf172f (diff) |
radeonsi: add si_so_target_reference
The src type is different on purpose.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-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; |