void-packages/srcpkgs/graphene/patches/5b746339c70cef3ce767841385d...

42 lines
1.8 KiB
Diff

From 5b746339c70cef3ce767841385d8eb3a2a5e852f Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Thu, 1 Apr 2021 23:14:16 +0100
Subject: [PATCH] Avoid shadowing for nested cross/dot calls
---
include/graphene-simd4f.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/graphene-simd4f.h b/include/graphene-simd4f.h
index ca711e5..f95fe04 100644
--- a/include/graphene-simd4f.h
+++ b/include/graphene-simd4f.h
@@ -897,19 +897,19 @@ typedef int graphene_simd4i_t __attribute__((vector_size (16)));
# define graphene_simd4f_cross3(a,b) \
(__extension__ ({ \
- const graphene_simd4f_t __a = (a); \
- const graphene_simd4f_t __b = (b); \
- graphene_simd4f_init (__a[1] * __b[2] - __a[2] * __b[1], \
- __a[2] * __b[0] - __a[0] * __b[2], \
- __a[0] * __b[1] - __a[1] * __b[0], \
+ const graphene_simd4f_t __cross_a = (a); \
+ const graphene_simd4f_t __cross_b = (b); \
+ graphene_simd4f_init (__cross_a[1] * __cross_b[2] - __cross_a[2] * __cross_b[1], \
+ __cross_a[2] * __cross_b[0] - __cross_a[0] * __cross_b[2], \
+ __cross_a[0] * __cross_b[1] - __cross_a[1] * __cross_b[0], \
0.f); \
}))
# define graphene_simd4f_dot3(a,b) \
(__extension__ ({ \
- const graphene_simd4f_t __a = (a); \
- const graphene_simd4f_t __b = (b); \
- const float __res = __a[0] * __b[0] + __a[1] * __b[1] + __a[2] * __b[2]; \
+ const graphene_simd4f_t __dot_a = (a); \
+ const graphene_simd4f_t __dot_b = (b); \
+ const float __res = __dot_a[0] * __dot_b[0] + __dot_a[1] * __dot_b[1] + __dot_a[2] * __dot_b[2]; \
graphene_simd4f_init (__res, __res, __res, __res); \
}))