diff options
author | Marek Olšák <marek.olsak@amd.com> | 2020-12-03 11:36:53 -0500 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-12-22 12:01:38 +0000 |
commit | b7f12a04525dee07ab28128e5a6d6df8bce432b2 (patch) | |
tree | 44d634de4b0a6e6b80bd0fe5c48a8b95ddcdf012 /src/gallium/auxiliary/util/u_blitter.c | |
parent | 2d87e52b375a5e4ded80e69ba9332a2fbf79c05e (diff) |
gallium: pass pipe_stencil_ref by value (it has only 2 bytes)
This changes pipe_context::set_stencil_ref to pass the parameter by value.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 60c4144c626..cb7baa25336 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -714,7 +714,7 @@ void util_blitter_restore_fragment_states(struct blitter_context *blitter) /* Miscellaneous states. */ /* XXX check whether these are saved and whether they need to be restored * (depending on the operation) */ - pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref); + pipe->set_stencil_ref(pipe, ctx->base.saved_stencil_ref); if (!blitter->skip_viewport_restore) pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport); @@ -1496,7 +1496,7 @@ static void util_blitter_clear_custom(struct blitter_context *blitter, custom_blend, custom_dsa); sr.ref_value[0] = stencil & 0xff; - pipe->set_stencil_ref(pipe, &sr); + pipe->set_stencil_ref(pipe, sr); bind_fs_write_all_cbufs(ctx); @@ -2363,7 +2363,7 @@ void util_blitter_clear_depth_stencil(struct blitter_context *blitter, if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) { sr.ref_value[0] = stencil & 0xff; pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); - pipe->set_stencil_ref(pipe, &sr); + pipe->set_stencil_ref(pipe, sr); } else if (clear_flags & PIPE_CLEAR_DEPTH) { pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil); @@ -2371,7 +2371,7 @@ void util_blitter_clear_depth_stencil(struct blitter_context *blitter, else if (clear_flags & PIPE_CLEAR_STENCIL) { sr.ref_value[0] = stencil & 0xff; pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); - pipe->set_stencil_ref(pipe, &sr); + pipe->set_stencil_ref(pipe, sr); } else /* hmm that should be illegal probably, or make it a no-op somewhere */ @@ -2892,7 +2892,7 @@ util_blitter_stencil_fallback(struct blitter_context *blitter, UTIL_FORMAT_COLORSPACE_ZS, 1); struct pipe_stencil_ref sr = { { (1u << stencil_bits) - 1 } }; - pipe->set_stencil_ref(pipe, &sr); + pipe->set_stencil_ref(pipe, sr); union blitter_attrib coord; get_texcoords(src_view, src->width0, src->height0, |