panfrost: Fix border colour
authorIcecream95 <ixn@keemail.me>
Thu, 13 Aug 2020 07:35:00 +0000 (19:35 +1200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 13 Aug 2020 13:45:00 +0000 (13:45 +0000)
The border colour was being set to the red colour for all channels.
Fixes tex-border-1 from piglit.

Fixes: f74186baa5e ("panfrost: XMLify Midgard samplers")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6298>

src/gallium/drivers/panfrost/pan_cmdstream.c

index f8248f137caec305f967eafc5eadd4de0824122e..31c19679b6a80f3c6765b0f1ec7b1ec34bf49848 100644 (file)
@@ -420,9 +420,9 @@ void panfrost_sampler_desc_init(const struct pipe_sampler_state *cso,
                 cfg.seamless_cube_map = cso->seamless_cube_map;
 
                 cfg.border_color_r = cso->border_color.f[0];
                 cfg.seamless_cube_map = cso->seamless_cube_map;
 
                 cfg.border_color_r = cso->border_color.f[0];
-                cfg.border_color_g = cso->border_color.f[0];
-                cfg.border_color_b = cso->border_color.f[0];
-                cfg.border_color_a = cso->border_color.f[0];
+                cfg.border_color_g = cso->border_color.f[1];
+                cfg.border_color_b = cso->border_color.f[2];
+                cfg.border_color_a = cso->border_color.f[3];
         }
 }
 
         }
 }