Mesa (master): iris: move variable to the scope where it is being used

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 4 04:43:32 UTC 2019


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

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Tue Apr  2 09:12:21 2019 +0300

iris: move variable to the scope where it is being used

iris_upload_border_color is passed a pointer which points to
variable that is introduced in a different scope.

CID: 1444296
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/gallium/drivers/iris/iris_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 970d2190a09..591c6359315 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1532,8 +1532,8 @@ iris_upload_sampler_states(struct iris_context *ice, gl_shader_stage stage)
           * back into A.
           */
          union pipe_color_union *color = &state->border_color;
+         union pipe_color_union tmp;
          if (tex) {
-            union pipe_color_union tmp;
             enum pipe_format internal_format = tex->res->internal_format;
 
             if (util_format_is_alpha(internal_format)) {




More information about the mesa-commit mailing list