st/mesa: don't make a local copy of blend color
authorMarek Olšák <marek.olsak@amd.com>
Thu, 3 Dec 2020 18:47:19 +0000 (13:47 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Dec 2020 12:01:38 +0000 (12:01 +0000)
This is perfectly safe and nothing bad can happen... and we have also CI.

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

src/mesa/state_tracker/st_atom_blend.c

index 426dc02..4b73856 100644 (file)
@@ -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);
 }