From 354f1aceba7173b0f212482c2e44fdf2dafb514a Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Mon, 29 Nov 2021 13:38:32 +0000 Subject: [PATCH] www/wpebackend-fdo: unbreak the build on i386 error: non-constant-expression cannot be narrowed from type 'std::__1::array::value_type' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] --- .../patch-src_egl-client-dmabuf-pool.cpp | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 www/wpebackend-fdo/files/patch-src_egl-client-dmabuf-pool.cpp diff --git a/www/wpebackend-fdo/files/patch-src_egl-client-dmabuf-pool.cpp b/www/wpebackend-fdo/files/patch-src_egl-client-dmabuf-pool.cpp new file mode 100644 index 000000000000..3cb1d630610e --- /dev/null +++ b/www/wpebackend-fdo/files/patch-src_egl-client-dmabuf-pool.cpp @@ -0,0 +1,62 @@ +--- src/egl-client-dmabuf-pool.cpp.orig 2021-10-18 22:13:13 UTC ++++ src/egl-client-dmabuf-pool.cpp +@@ -182,10 +182,10 @@ void TargetDmabufPool::frameWillRender() + uint32_t modifier_lo = bufferData.modifiers[0] & 0xFFFFFFFF; + std::array planeAttributes = { + EGL_DMA_BUF_PLANE0_FD_EXT, bufferData.fds[0], +- EGL_DMA_BUF_PLANE0_PITCH_EXT, bufferData.strides[0], +- EGL_DMA_BUF_PLANE0_OFFSET_EXT, bufferData.offsets[0], +- EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, modifier_hi, +- EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, modifier_lo, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, static_cast(bufferData.strides[0]), ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, static_cast(bufferData.offsets[0]), ++ EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, static_cast(modifier_hi), ++ EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, static_cast(modifier_lo), + }; + + std::copy(planeAttributes.begin(), planeAttributes.end(), +@@ -198,10 +198,10 @@ void TargetDmabufPool::frameWillRender() + uint32_t modifier_lo = bufferData.modifiers[1] & 0xFFFFFFFF; + std::array planeAttributes = { + EGL_DMA_BUF_PLANE1_FD_EXT, bufferData.fds[1], +- EGL_DMA_BUF_PLANE1_PITCH_EXT, bufferData.strides[1], +- EGL_DMA_BUF_PLANE1_OFFSET_EXT, bufferData.offsets[1], +- EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT, modifier_hi, +- EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT, modifier_lo, ++ EGL_DMA_BUF_PLANE1_PITCH_EXT, static_cast(bufferData.strides[1]), ++ EGL_DMA_BUF_PLANE1_OFFSET_EXT, static_cast(bufferData.offsets[1]), ++ EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT, static_cast(modifier_hi), ++ EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT, static_cast(modifier_lo), + }; + + std::copy(planeAttributes.begin(), planeAttributes.end(), +@@ -214,10 +214,10 @@ void TargetDmabufPool::frameWillRender() + uint32_t modifier_lo = bufferData.modifiers[2] & 0xFFFFFFFF; + std::array planeAttributes = { + EGL_DMA_BUF_PLANE2_FD_EXT, bufferData.fds[2], +- EGL_DMA_BUF_PLANE2_PITCH_EXT, bufferData.strides[2], +- EGL_DMA_BUF_PLANE2_OFFSET_EXT, bufferData.offsets[2], +- EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT, modifier_hi, +- EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT, modifier_lo, ++ EGL_DMA_BUF_PLANE2_PITCH_EXT, static_cast(bufferData.strides[2]), ++ EGL_DMA_BUF_PLANE2_OFFSET_EXT, static_cast(bufferData.offsets[2]), ++ EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT, static_cast(modifier_hi), ++ EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT, static_cast(modifier_lo), + }; + + std::copy(planeAttributes.begin(), planeAttributes.end(), +@@ -230,10 +230,10 @@ void TargetDmabufPool::frameWillRender() + uint32_t modifier_lo = bufferData.modifiers[3] & 0xFFFFFFFF; + std::array planeAttributes = { + EGL_DMA_BUF_PLANE3_FD_EXT, bufferData.fds[3], +- EGL_DMA_BUF_PLANE3_PITCH_EXT, bufferData.strides[3], +- EGL_DMA_BUF_PLANE3_OFFSET_EXT, bufferData.offsets[3], +- EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT, modifier_hi, +- EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT, modifier_lo, ++ EGL_DMA_BUF_PLANE3_PITCH_EXT, static_cast(bufferData.strides[3]), ++ EGL_DMA_BUF_PLANE3_OFFSET_EXT, static_cast(bufferData.offsets[3]), ++ EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT, static_cast(modifier_hi), ++ EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT, static_cast(modifier_lo), + }; + + std::copy(planeAttributes.begin(), planeAttributes.end(),