From bfce415bf4a23a9313613e92a086910eb16f9a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 31 Mar 2025 20:36:05 +0200 Subject: [PATCH] Shaders: no need to save the tested output to a temporary here. Likely a leftover of a copypaste from elsewhere in the test. --- src/Magnum/Shaders/Test/LineGLTest.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Shaders/Test/LineGLTest.cpp b/src/Magnum/Shaders/Test/LineGLTest.cpp index e4bef6174..d1ca96059 100644 --- a/src/Magnum/Shaders/Test/LineGLTest.cpp +++ b/src/Magnum/Shaders/Test/LineGLTest.cpp @@ -1576,11 +1576,9 @@ void LineGLTest::renderLineCapsJoins2DReversed() { !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); - Image2D image = _framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); - CORRADE_COMPARE_WITH( /* Dropping the alpha channel, as it's always 1.0 */ - Containers::arrayCast(image.pixels()), + Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), /* Minor differences on NVidia vs Mesa Intel vs SwiftShader */ /** @todo sync this with render2D() once the overlaps are fixed */ @@ -1638,11 +1636,9 @@ void LineGLTest::renderLineCapsJoins2DTransformed() { !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); - Image2D image = _framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); - CORRADE_COMPARE_WITH( /* Dropping the alpha channel, as it's always 1.0 */ - Containers::arrayCast(image.pixels()), + Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), /* Minor differences on NVidia vs Mesa Intel vs SwiftShader */ (DebugTools::CompareImageToFile{_manager, 119.0f, 0.112f})); @@ -1843,11 +1839,9 @@ template void LineGLTest::renderCube3D() { !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); - Image2D image = _framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); - CORRADE_COMPARE_WITH( /* Dropping the alpha channel, as it's always 1.0 */ - Containers::arrayCast(image.pixels()), + Containers::arrayCast(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels()), Utility::Path::join({SHADERS_TEST_DIR, "LineTestFiles", data.expected}), /* Minor differences on NVidia vs Mesa Intel vs SwiftShader */ (DebugTools::CompareImageToFile{_manager, 119.0f, 0.102f}));