Fix texture conversion in the GL backend

The line as currently written disallows conversions (except swizzle) because `convert` can't be true if `compressed` isn't.
This commit is contained in:
Christophe Dehais 2022-10-13 14:28:31 +02:00 committed by GitHub
parent 9bb2dbdb70
commit 155a2e35e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5950,7 +5950,7 @@ namespace bgfx { namespace gl
const bool unpackRowLength = !!BGFX_CONFIG_RENDERER_OPENGL || s_extension[Extension::EXT_unpack_subimage].m_supported; const bool unpackRowLength = !!BGFX_CONFIG_RENDERER_OPENGL || s_extension[Extension::EXT_unpack_subimage].m_supported;
const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_requestedFormat) ); const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_requestedFormat) );
const bool convert = false const bool convert = false
|| (compressed && m_textureFormat != m_requestedFormat) || (!compressed && m_textureFormat != m_requestedFormat)
|| swizzle || swizzle
; ;