File angle-FramebufferVk-powf.patch of Package nodejs-electron
From 2f934a47e9709cac9ce04d312b7aa496948bced6 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Mon, 18 Mar 2024 12:53:27 +0100
Subject: [PATCH] libstdc++: replace std::powf with std:pow
libstdc++ before GCC 14 does not provide std::powf. So replace the
call with std::pow, that provides an overload for floats.
For reference of the bug tracking the missing methods in libstdc++:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700
Bug: chromium:41455655
Change-Id: Idfb53fe3c71f4dc0198cf6ba3e26c07895f65bc6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5379670
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
---
src/libANGLE/renderer/vulkan/FramebufferVk.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index 98831436adb..e88339521e6 100644
--- a/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -1726,10 +1726,10 @@ angle::Result FramebufferVk::generateFragmentShadingRateWithCPU(
for (uint32_t point = 0; point < activeFocalPoints.size(); point++)
{
float density =
- 1.0f / std::max(std::powf(activeFocalPoints[point].focalX - px, 2) *
- std::powf(activeFocalPoints[point].gainX, 2) +
- std::powf(activeFocalPoints[point].focalY - py, 2) *
- std::powf(activeFocalPoints[point].gainY, 2) -
+ 1.0f / std::max(std::pow(activeFocalPoints[point].focalX - px, 2.0f) *
+ std::pow(activeFocalPoints[point].gainX, 2.0f) +
+ std::pow(activeFocalPoints[point].focalY - py, 2.0f) *
+ std::pow(activeFocalPoints[point].gainY, 2.0f) -
activeFocalPoints[point].foveaArea,
1.0f);