Mesa (master): v3d: mark some variables static const
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 13 07:32:55 UTC 2021
Module: Mesa
Branch: master
Commit: 36e1c902b9fd793c5581447c0da463d3175562e1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=36e1c902b9fd793c5581447c0da463d3175562e1
Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date: Tue Jan 12 12:53:44 2021 +0100
v3d: mark some variables static const
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8438>
---
src/broadcom/compiler/v3d_nir_lower_logic_ops.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/broadcom/compiler/v3d_nir_lower_logic_ops.c b/src/broadcom/compiler/v3d_nir_lower_logic_ops.c
index 11989c9b18e..2cd613b26a4 100644
--- a/src/broadcom/compiler/v3d_nir_lower_logic_ops.c
+++ b/src/broadcom/compiler/v3d_nir_lower_logic_ops.c
@@ -147,7 +147,7 @@ v3d_nir_unpack_and_swizzle(nir_builder *b, nir_ssa_def *packed,
static nir_ssa_def *
pack_unorm_rgb10a2(nir_builder *b, nir_ssa_def *c)
{
- const unsigned bits[4] = { 10, 10, 10, 2 };
+ static const unsigned bits[4] = { 10, 10, 10, 2 };
nir_ssa_def *unorm = nir_format_float_to_unorm(b, c, bits);
nir_ssa_def *chans[4];
@@ -168,7 +168,7 @@ pack_unorm_rgb10a2(nir_builder *b, nir_ssa_def *c)
static nir_ssa_def *
unpack_unorm_rgb10a2(nir_builder *b, nir_ssa_def *c)
{
- const unsigned bits[4] = { 10, 10, 10, 2 };
+ static const unsigned bits[4] = { 10, 10, 10, 2 };
const unsigned masks[4] = { BITFIELD_MASK(bits[0]),
BITFIELD_MASK(bits[1]),
BITFIELD_MASK(bits[2]),
@@ -239,7 +239,7 @@ v3d_emit_logic_op_unorm(struct v3d_compile *c, nir_builder *b,
int rt, int sample,
nir_pack_func pack_func, nir_unpack_func unpack_func)
{
- const uint8_t src_swz[4] = { 0, 1, 2, 3 };
+ static const uint8_t src_swz[4] = { 0, 1, 2, 3 };
nir_ssa_def *packed_src =
v3d_nir_swizzle_and_pack(b, src_chans, src_swz, pack_func);
More information about the mesa-commit
mailing list