Use GL_RGBA8 as the internal format for GL_BGRA.

This commit is contained in:
Stephen White 2018-02-28 15:38:46 -05:00 committed by Corentin Wallez
parent bc360f7a79
commit c25d376ac3
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,8 @@ namespace backend { namespace opengl {
case nxt::TextureFormat::R8G8B8A8Uint: case nxt::TextureFormat::R8G8B8A8Uint:
return {GL_RGBA8UI, GL_RGBA, GL_UNSIGNED_INT}; return {GL_RGBA8UI, GL_RGBA, GL_UNSIGNED_INT};
case nxt::TextureFormat::B8G8R8A8Unorm: case nxt::TextureFormat::B8G8R8A8Unorm:
// This doesn't have an enum for the internal format in OpenGL. // This doesn't have an enum for the internal format in OpenGL, so use RGBA8.
return {GL_NONE, GL_BGRA, GL_UNSIGNED_BYTE}; return {GL_RGBA8, GL_BGRA, GL_UNSIGNED_BYTE};
case nxt::TextureFormat::D32FloatS8Uint: case nxt::TextureFormat::D32FloatS8Uint:
return {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, return {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV}; GL_FLOAT_32_UNSIGNED_INT_24_8_REV};