From c25d376ac345ac4d34a92f70c98c613abe265fc1 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Wed, 28 Feb 2018 15:38:46 -0500 Subject: [PATCH] Use GL_RGBA8 as the internal format for GL_BGRA. --- src/backend/opengl/TextureGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/opengl/TextureGL.cpp b/src/backend/opengl/TextureGL.cpp index 6625fafdd3..b478b0a539 100644 --- a/src/backend/opengl/TextureGL.cpp +++ b/src/backend/opengl/TextureGL.cpp @@ -39,8 +39,8 @@ namespace backend { namespace opengl { case nxt::TextureFormat::R8G8B8A8Uint: return {GL_RGBA8UI, GL_RGBA, GL_UNSIGNED_INT}; case nxt::TextureFormat::B8G8R8A8Unorm: - // This doesn't have an enum for the internal format in OpenGL. - return {GL_NONE, GL_BGRA, GL_UNSIGNED_BYTE}; + // This doesn't have an enum for the internal format in OpenGL, so use RGBA8. + return {GL_RGBA8, GL_BGRA, GL_UNSIGNED_BYTE}; case nxt::TextureFormat::D32FloatS8Uint: return {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV};