From 274c0827393ad3a6590342f5c3811bdeebcc3607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 1 Oct 2024 12:15:09 +0200 Subject: [PATCH] Text: zero the texture data so the test doesn't compare against garbage. --- src/Magnum/Text/Test/GlyphCacheGLTest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Magnum/Text/Test/GlyphCacheGLTest.cpp b/src/Magnum/Text/Test/GlyphCacheGLTest.cpp index 0117d02fb..ed8cca1d2 100644 --- a/src/Magnum/Text/Test/GlyphCacheGLTest.cpp +++ b/src/Magnum/Text/Test/GlyphCacheGLTest.cpp @@ -205,6 +205,9 @@ void GlyphCacheGLTest::setImageCustomFormat() { #endif {4, 8}}; + /* Zero the texture to avoid comparing against garbage */ + cache.texture().setSubImage(0, {}, Image2D{PixelFormat::RGBA8Unorm, {4, 8}, Containers::Array{ValueInit, 4*4*8}}); + Utility::copy( Containers::StridedArrayView2D{Containers::arrayCast(Containers::arrayView(InputData)), {4, 2}}, cache.image().pixels()[0].sliceSize({4, 2}, {4, 2}));