Mesa (main): panfrost: Constify the constants pointers passed to pan_blend functions
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 14:31:36 UTC 2021
Module: Mesa
Branch: main
Commit: 6d2ed635c349dd882b1c67d13c6d15e182ace222
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d2ed635c349dd882b1c67d13c6d15e182ace222
Author: Boris Brezillon <boris.brezillon at collabora.com>
Date: Wed May 19 09:49:28 2021 +0200
panfrost: Constify the constants pointers passed to pan_blend functions
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11139>
---
src/panfrost/lib/pan_blend.c | 2 +-
src/panfrost/lib/pan_blend.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/panfrost/lib/pan_blend.c b/src/panfrost/lib/pan_blend.c
index b1ddd7397a2..6f3082e7234 100644
--- a/src/panfrost/lib/pan_blend.c
+++ b/src/panfrost/lib/pan_blend.c
@@ -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);
diff --git a/src/panfrost/lib/pan_blend.h b/src/panfrost/lib/pan_blend.h
index 73bf8c69188..080130202c4 100644
--- a/src/panfrost/lib/pan_blend.h
+++ b/src/panfrost/lib/pan_blend.h
@@ -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,
More information about the mesa-commit
mailing list