From 1191eb41760160077941aa49c317c37b1bb40ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 2 Oct 2023 16:50:02 +0200 Subject: [PATCH] GL: whoops, mapping of these to a TextureFormat was wrong. Only noticed this now when adding inverse mapping. Sigh. OTOH, with the inverse mapping in place this will no longer be possible to happen, as it would cause a compile error due to a duplicate switch case. --- doc/changelog.dox | 3 +++ src/Magnum/GL/Implementation/pixelFormatMapping.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 9a0899ad7..8413fedb1 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -993,6 +993,9 @@ See also: for most shader-related limits - Fixed @ref GL::Shader reporting errors and warnings with line numbers off-by-one on desktop GLSL < 330. +- Fixed accidentally incorrect @ref GL::textureFormat() mapping for + @ref PixelFormat::RG8Snorm, @relativeref{PixelFormat,RGB8Snorm}, + @relativeref{PixelFormat,RGBA8Snorm} and @relativeref{PixelFormat,RGB32UI} - Fixed assertions related to OpenGL driver workarounds when the proprietary AMDGPU PRO drivers are used on Linux - Fixed @relativeref{Corrade,Utility::Tweakable} parsers to compile with diff --git a/src/Magnum/GL/Implementation/pixelFormatMapping.hpp b/src/Magnum/GL/Implementation/pixelFormatMapping.hpp index 181792eb1..1fea0520a 100644 --- a/src/Magnum/GL/Implementation/pixelFormatMapping.hpp +++ b/src/Magnum/GL/Implementation/pixelFormatMapping.hpp @@ -44,9 +44,9 @@ _n(RGBA8Unorm, RGBA, UnsignedByte) #endif #ifndef MAGNUM_TARGET_GLES2 _c(R8Snorm, Red, Byte, R8Snorm) -_c(RG8Snorm, RG, Byte, R8Snorm) -_c(RGB8Snorm, RGB, Byte, R8Snorm) -_c(RGBA8Snorm, RGBA, Byte, R8Snorm) +_c(RG8Snorm, RG, Byte, RG8Snorm) +_c(RGB8Snorm, RGB, Byte, RGB8Snorm) +_c(RGBA8Snorm, RGBA, Byte, RGBA8Snorm) #else _s(R8Snorm) _s(RG8Snorm) @@ -133,7 +133,7 @@ _c(RGB16I, RGBInteger, Short, RGB16I) _c(RGBA16I, RGBAInteger, Short, RGBA16I) _c(R32UI, RedInteger, UnsignedInt, R32UI) _c(RG32UI, RGInteger, UnsignedInt, RG32UI) -_c(RGB32UI, RGBInteger, UnsignedInt, RGBA32UI) +_c(RGB32UI, RGBInteger, UnsignedInt, RGB32UI) _c(RGBA32UI, RGBAInteger, UnsignedInt, RGBA32UI) _c(R32I, RedInteger, Int, R32I) _c(RG32I, RGInteger, Int, RG32I)