diff options
| -rw-r--r-- | meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch | 158 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch | 50 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb (renamed from meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb) | 6 |
3 files changed, 53 insertions, 161 deletions
diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch b/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch deleted file mode 100644 index 2eb50a5a3a..0000000000 --- a/meta-oe/recipes-graphics/glm/glm/0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch +++ /dev/null | |||
| @@ -1,158 +0,0 @@ | |||
| 1 | From 461861cd2e34294830b121db834c05ff39424f6f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 27 Dec 2019 18:42:51 -0800 | ||
| 4 | Subject: [PATCH] Fix Wimplicit-int-float-conversion warnings with clang 10+ | ||
| 5 | |||
| 6 | This is a new warning in clang which will be available in clang 10 | ||
| 7 | onwards | ||
| 8 | |||
| 9 | Fixes | ||
| 10 | error: implicit conversion from 'const int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion] | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/986] | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | glm/gtx/scalar_multiplication.hpp | 2 +- | ||
| 16 | test/gtx/gtx_fast_trigonometry.cpp | 32 +++++++++++++++--------------- | ||
| 17 | 2 files changed, 17 insertions(+), 17 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/glm/gtx/scalar_multiplication.hpp b/glm/gtx/scalar_multiplication.hpp | ||
| 20 | index f391f8de..496ba193 100644 | ||
| 21 | --- a/glm/gtx/scalar_multiplication.hpp | ||
| 22 | +++ b/glm/gtx/scalar_multiplication.hpp | ||
| 23 | @@ -54,7 +54,7 @@ namespace glm | ||
| 24 | template<typename T> \ | ||
| 25 | return_type_scalar_multiplication<T, Vec> \ | ||
| 26 | operator/(Vec lh, T const& s){ \ | ||
| 27 | - return lh *= 1.0f / s; \ | ||
| 28 | + return lh *= 1.0f / static_cast<float>(s); \ | ||
| 29 | } | ||
| 30 | |||
| 31 | GLM_IMPLEMENT_SCAL_MULT(vec2) | ||
| 32 | diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp | ||
| 33 | index f3bf17bf..f3c4e957 100644 | ||
| 34 | --- a/test/gtx/gtx_fast_trigonometry.cpp | ||
| 35 | +++ b/test/gtx/gtx_fast_trigonometry.cpp | ||
| 36 | @@ -239,12 +239,12 @@ namespace taylorCos | ||
| 37 | std::vector<glm::vec4> Results; | ||
| 38 | Results.resize(Samples); | ||
| 39 | |||
| 40 | - float Steps = (End - Begin) / Samples; | ||
| 41 | + float Steps = (End - Begin) / float(Samples); | ||
| 42 | |||
| 43 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 44 | |||
| 45 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 46 | - Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * i)); | ||
| 47 | + Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * float(i))); | ||
| 48 | |||
| 49 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 50 | |||
| 51 | @@ -280,12 +280,12 @@ namespace taylorCos | ||
| 52 | std::vector<glm::vec4> Results; | ||
| 53 | Results.resize(Samples); | ||
| 54 | |||
| 55 | - float Steps = (End - Begin) / Samples; | ||
| 56 | + float Steps = (End - Begin) / float(Samples); | ||
| 57 | |||
| 58 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 59 | |||
| 60 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 61 | - Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * i)); | ||
| 62 | + Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * float(i))); | ||
| 63 | |||
| 64 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 65 | |||
| 66 | @@ -327,12 +327,12 @@ namespace taylorCos | ||
| 67 | std::vector<glm::vec4> Results; | ||
| 68 | Results.resize(Samples); | ||
| 69 | |||
| 70 | - float Steps = (End - Begin) / Samples; | ||
| 71 | + float Steps = (End - Begin) / float(Samples); | ||
| 72 | |||
| 73 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 74 | |||
| 75 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 76 | - Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * i)); | ||
| 77 | + Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * float(i))); | ||
| 78 | |||
| 79 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 80 | |||
| 81 | @@ -349,12 +349,12 @@ namespace taylorCos | ||
| 82 | std::vector<glm::vec4> Results; | ||
| 83 | Results.resize(Samples); | ||
| 84 | |||
| 85 | - float Steps = (End - Begin) / Samples; | ||
| 86 | + float Steps = (End - Begin) / float(Samples); | ||
| 87 | |||
| 88 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 89 | |||
| 90 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 91 | - Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * i)); | ||
| 92 | + Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * float(i))); | ||
| 93 | |||
| 94 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 95 | |||
| 96 | @@ -371,12 +371,12 @@ namespace taylorCos | ||
| 97 | std::vector<glm::vec4> Results; | ||
| 98 | Results.resize(Samples); | ||
| 99 | |||
| 100 | - float Steps = (End - Begin) / Samples; | ||
| 101 | + float Steps = (End - Begin) / float(Samples); | ||
| 102 | |||
| 103 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 104 | |||
| 105 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 106 | - Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * i)); | ||
| 107 | + Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * float(i))); | ||
| 108 | |||
| 109 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 110 | |||
| 111 | @@ -466,12 +466,12 @@ namespace taylor2 | ||
| 112 | std::vector<float> Results; | ||
| 113 | Results.resize(Samples); | ||
| 114 | |||
| 115 | - float Steps = (End - Begin) / Samples; | ||
| 116 | + float Steps = (End - Begin) / float(Samples); | ||
| 117 | |||
| 118 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 119 | |||
| 120 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 121 | - Results[i] = taylorCosA(AngleShift.x + Begin + Steps * i); | ||
| 122 | + Results[i] = taylorCosA(AngleShift.x + Begin + Steps * float(i)); | ||
| 123 | |||
| 124 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 125 | |||
| 126 | @@ -488,12 +488,12 @@ namespace taylor2 | ||
| 127 | std::vector<float> Results; | ||
| 128 | Results.resize(Samples); | ||
| 129 | |||
| 130 | - float Steps = (End - Begin) / Samples; | ||
| 131 | + float Steps = (End - Begin) / float(Samples); | ||
| 132 | |||
| 133 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 134 | |||
| 135 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 136 | - Results[i] = taylorCosB(AngleShift.x + Begin + Steps * i); | ||
| 137 | + Results[i] = taylorCosB(AngleShift.x + Begin + Steps * float(i)); | ||
| 138 | |||
| 139 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 140 | |||
| 141 | @@ -510,12 +510,12 @@ namespace taylor2 | ||
| 142 | std::vector<float> Results; | ||
| 143 | Results.resize(Samples); | ||
| 144 | |||
| 145 | - float Steps = (End - Begin) / Samples; | ||
| 146 | + float Steps = (End - Begin) / float(Samples); | ||
| 147 | |||
| 148 | std::clock_t const TimeStampBegin = std::clock(); | ||
| 149 | |||
| 150 | for(std::size_t i = 0; i < Samples; ++i) | ||
| 151 | - Results[i] = taylorCosC(AngleShift.x + Begin + Steps * i); | ||
| 152 | + Results[i] = taylorCosC(AngleShift.x + Begin + Steps * float(i)); | ||
| 153 | |||
| 154 | std::clock_t const TimeStampEnd = std::clock(); | ||
| 155 | |||
| 156 | -- | ||
| 157 | 2.24.1 | ||
| 158 | |||
diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch new file mode 100644 index 0000000000..25e851883e --- /dev/null +++ b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From 5b83983b246cff440de4421696b6b5dd9072ed2d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 6 Feb 2021 11:36:23 -0800 | ||
| 4 | Subject: [PATCH] Silence clang warnings | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | glm/gtc/random.inl:25:17: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion] | ||
| 8 | | std::rand() % std::numeric_limits<uint8>::max()); | ||
| 9 | | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 10 | |||
| 11 | glm/gtc/../ext/quaternion_common.inl:76:87: error: unused parameter 'k' [-Werror,-Wunused-parameter] | ||
| 12 | GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k) | ||
| 13 | ^ | ||
| 14 | |||
| 15 | Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/1055] | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | glm/ext/quaternion_common.inl | 2 +- | ||
| 19 | glm/gtc/random.inl | 2 +- | ||
| 20 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl | ||
| 23 | index 0e4a3bb2..8f9dccef 100644 | ||
| 24 | --- a/glm/ext/quaternion_common.inl | ||
| 25 | +++ b/glm/ext/quaternion_common.inl | ||
| 26 | @@ -104,7 +104,7 @@ namespace glm | ||
| 27 | { | ||
| 28 | // Graphics Gems III, page 96 | ||
| 29 | T angle = acos(cosTheta); | ||
| 30 | - T phi = angle + k * glm::pi<T>(); | ||
| 31 | + T phi = angle + static_cast<float>(k) * glm::pi<T>(); | ||
| 32 | return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl | ||
| 36 | index 70485098..a4af2a06 100644 | ||
| 37 | --- a/glm/gtc/random.inl | ||
| 38 | +++ b/glm/gtc/random.inl | ||
| 39 | @@ -22,7 +22,7 @@ namespace detail | ||
| 40 | GLM_FUNC_QUALIFIER static vec<1, uint8, P> call() | ||
| 41 | { | ||
| 42 | return vec<1, uint8, P>( | ||
| 43 | - std::rand() % std::numeric_limits<uint8>::max()); | ||
| 44 | + static_cast<uint8>(std::rand()) % std::numeric_limits<uint8>::max()); | ||
| 45 | } | ||
| 46 | }; | ||
| 47 | |||
| 48 | -- | ||
| 49 | 2.30.0 | ||
| 50 | |||
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb b/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb index e2f4dbebc5..c5a7c5bff8 100644 --- a/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb +++ b/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb | |||
| @@ -6,17 +6,17 @@ HOMEPAGE = "https://glm.g-truc.net" | |||
| 6 | BUGTRACKER = "https://github.com/g-truc/glm/issues" | 6 | BUGTRACKER = "https://github.com/g-truc/glm/issues" |
| 7 | SECTION = "libs" | 7 | SECTION = "libs" |
| 8 | LICENSE = "MIT" | 8 | LICENSE = "MIT" |
| 9 | LIC_FILES_CHKSUM = "file://copying.txt;md5=4a735e33f271f57404fda17e80085411" | 9 | LIC_FILES_CHKSUM = "file://copying.txt;md5=462e4b97f73ef12f8171c3c546ce4e8d" |
| 10 | 10 | ||
| 11 | SRC_URI = " \ | 11 | SRC_URI = " \ |
| 12 | git://github.com/g-truc/glm;branch=master \ | 12 | git://github.com/g-truc/glm;branch=master \ |
| 13 | file://0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch \ | 13 | file://0001-Silence-clang-warnings.patch \ |
| 14 | file://glmConfig.cmake.in \ | 14 | file://glmConfig.cmake.in \ |
| 15 | file://glmConfigVersion.cmake.in \ | 15 | file://glmConfigVersion.cmake.in \ |
| 16 | file://glm.pc.in \ | 16 | file://glm.pc.in \ |
| 17 | file://glmTargets.cmake \ | 17 | file://glmTargets.cmake \ |
| 18 | " | 18 | " |
| 19 | SRCREV = "4db8f89aace8f04c839b606e15b39fb8383ec732" | 19 | SRCREV = "bf71a834948186f4097caa076cd2663c69a10e1e" |
| 20 | 20 | ||
| 21 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
| 22 | 22 | ||
