panfrost: Constify the constants pointers passed to pan_blend functions
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 19 May 2021 07:49:28 +0000 (09:49 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Jun 2021 14:07:33 +0000 (14:07 +0000)
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11139>

src/panfrost/lib/pan_blend.c
src/panfrost/lib/pan_blend.h

index b1ddd73..6f3082e 100644 (file)
@@ -90,7 +90,7 @@ pan_blend_constant_mask(const struct pan_blend_equation eq)
  * valid for fixed-function, so check for this condition */
 
 bool
-pan_blend_is_homogenous_constant(unsigned mask, float *constants)
+pan_blend_is_homogenous_constant(unsigned mask, const float *constants)
 {
         float constant = pan_blend_get_constant(mask, constants);
 
index 73bf8c6..0801302 100644 (file)
@@ -112,7 +112,7 @@ pan_blend_constant_mask(const struct pan_blend_equation eq);
  * just the first constant. */
 
 static inline float
-pan_blend_get_constant(unsigned mask, float *constants)
+pan_blend_get_constant(unsigned mask, const float *constants)
 {
         return mask ? constants[ffs(mask) - 1] : 0.0;
 }
@@ -128,7 +128,7 @@ pan_blend_supports_constant(unsigned arch, unsigned rt)
 }
 
 bool
-pan_blend_is_homogenous_constant(unsigned mask, float *constants);
+pan_blend_is_homogenous_constant(unsigned mask, const float *constants);
 
 void
 pan_blend_to_fixed_function_equation(const struct pan_blend_equation eq,