Mesa (master): st/mesa: don't make a local copy of blend color

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Dec 22 12:18:26 UTC 2020


Module: Mesa
Branch: master
Commit: e91c6ca5b28839422de1212b4033f87b611e9221
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e91c6ca5b28839422de1212b4033f87b611e9221

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Dec  3 13:47:19 2020 -0500

st/mesa: don't make a local copy of blend color

This is perfectly safe and nothing bad can happen... and we have also CI.

Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>

---

 src/mesa/state_tracker/st_atom_blend.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 426dc0211a9..4b73856b493 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -304,8 +304,8 @@ void
 st_update_blend_color(struct st_context *st)
 {
    struct pipe_context *pipe = st->pipe;
-   struct pipe_blend_color bc;
+   struct pipe_blend_color *bc =
+      (struct pipe_blend_color *)st->ctx->Color.BlendColorUnclamped;
 
-   COPY_4FV(bc.color, st->ctx->Color.BlendColorUnclamped);
-   pipe->set_blend_color(pipe, &bc);
+   pipe->set_blend_color(pipe, bc);
 }



More information about the mesa-commit mailing list