]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
piglit:backport a fix for building with gcc-16
authorHemanth Kumar M D <Hemanth.KumarMD@windriver.com>
Tue, 19 May 2026 07:25:23 +0000 (00:25 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 May 2026 10:18:21 +0000 (11:18 +0100)
Avoid conflict with C++20 std::lerp from <cmath>, which
causes redefinition and ambiguous call errors with newer
toolchains.

Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/piglit/-/commit/ec0fc2fef0755b1595c3799ab25129174a4b2007]

Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/piglit/piglit/0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch [new file with mode: 0644]
meta/recipes-graphics/piglit/piglit_git.bb

diff --git a/meta/recipes-graphics/piglit/piglit/0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch b/meta/recipes-graphics/piglit/piglit/0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch
new file mode 100644 (file)
index 0000000..05f1dd6
--- /dev/null
@@ -0,0 +1,46 @@
+From ec0fc2fef0755b1595c3799ab25129174a4b2007 Mon Sep 17 00:00:00 2001
+From: Vinson Lee <vlee@freedesktop.org>
+Date: Sat, 7 Feb 2026 18:39:39 -0800
+Subject: [PATCH] fbo-blit-stretch: rename local lerp to linear_interp
+
+Avoid conflict with C++20 std::lerp from <cmath>, which
+causes redefinition and ambiguous call errors with newer
+toolchains.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/piglit/-/commit/ec0fc2fef0755b1595c3799ab25129174a4b2007]
+
+Signed-off-by: Vinson Lee <vlee@freedesktop.org>
+Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
+---
+ tests/fbo/fbo-blit-stretch.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/fbo/fbo-blit-stretch.cpp b/tests/fbo/fbo-blit-stretch.cpp
+index a83288c0f..b0d362ecd 100644
+--- a/tests/fbo/fbo-blit-stretch.cpp
++++ b/tests/fbo/fbo-blit-stretch.cpp
+@@ -173,7 +173,7 @@ clamp(GLint &x, GLint xmin, GLint xmax)
+ }
+ static float
+-lerp(float x0, float x1, float w)
++linear_interp(float x0, float x1, float w)
+ {
+       return x0 + (x1 - x0) * w;
+ }
+@@ -181,9 +181,9 @@ lerp(float x0, float x1, float w)
+ static float
+ lerp2d(float xy00, float xy01, float xy10, float xy11, float wx, float wy)
+ {
+-      float y0 = lerp(xy00, xy01, wx);
+-      float y1 = lerp(xy10, xy11, wx);
+-      return lerp(y0, y1, wy);
++      float y0 = linear_interp(xy00, xy01, wx);
++      float y1 = linear_interp(xy10, xy11, wx);
++      return linear_interp(y0, y1, wy);
+ }
+ static float clearColor[4] = {
+-- 
+2.49.0
+
index 76596350628afcae26beb26febc76c10a69eed0b..0dd9c5871451b3961e84769841a504e4155edac5 100644 (file)
@@ -14,6 +14,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma
            file://0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch \
            file://0001-tests-no_error.py-modify-_command-and-not-command.patch \
            file://0001-generated_tests-use-shape-in-place-of-newshape-on-nu.patch \
+           file://0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"