From f0b80b6d09f8c26f062362840ea7a188e91a2666 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Tue, 22 Jan 2013 20:04:02 -0800 Subject: [PATCH] Fixed bpp. --- src/bgfx.cpp | 6 +++--- src/renderer_d3d11.cpp | 6 +++--- src/renderer_d3d9.cpp | 6 +++--- src/renderer_gl.cpp | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 0e52b1b13..a8db2e9dc 100755 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -907,10 +907,10 @@ namespace bgfx static const uint32_t s_bitsPerPixel[TextureFormat::Count] = { 4, // Dxt1 - 4, // Dxt3 - 4, // Dxt5 + 8, // Dxt3 + 8, // Dxt5 4, // BC4 - 4, // BC5 + 8, // BC5 0, // Unknown 8, // L8 32, // BGRX8 diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index ee36b2b73..12be066a6 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -150,10 +150,10 @@ namespace bgfx static const TextureFormatInfo s_textureFormat[TextureFormat::Count] = { { DXGI_FORMAT_BC1_UNORM, 4 }, - { DXGI_FORMAT_BC2_UNORM, 4 }, - { DXGI_FORMAT_BC3_UNORM, 4 }, + { DXGI_FORMAT_BC2_UNORM, 8 }, + { DXGI_FORMAT_BC3_UNORM, 8 }, { DXGI_FORMAT_BC4_UNORM, 4 }, - { DXGI_FORMAT_BC5_UNORM, 4 }, + { DXGI_FORMAT_BC5_UNORM, 8 }, { DXGI_FORMAT_UNKNOWN, 0 }, { DXGI_FORMAT_R8_UNORM, 8 }, { DXGI_FORMAT_B8G8R8A8_UNORM, 32 }, diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 9bb039116..854f88962 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -165,10 +165,10 @@ namespace bgfx static const TextureFormatInfo s_textureFormat[TextureFormat::Count] = { { D3DFMT_DXT1, 4 }, - { D3DFMT_DXT3, 4 }, - { D3DFMT_DXT5, 4 }, + { D3DFMT_DXT3, 8 }, + { D3DFMT_DXT5, 8 }, { D3DFMT_ATI1, 4 }, - { D3DFMT_ATI2, 4 }, + { D3DFMT_ATI2, 8 }, { D3DFMT_UNKNOWN, 0 }, { D3DFMT_L8, 8 }, { D3DFMT_X8R8G8B8, 32 }, diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 9c5d598d7..f030ba348 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -527,10 +527,10 @@ namespace bgfx static TextureFormatInfo s_textureFormat[TextureFormat::Count] = { { GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_ZERO, 4, false }, - { GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_ZERO, 4, false }, - { GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_ZERO, 4, false }, + { GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_ZERO, 8, false }, + { GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_ZERO, 8, false }, { GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_ZERO, 4, false }, - { GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_ZERO, 4, false }, + { GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_ZERO, 8, false }, { GL_ZERO, GL_ZERO, GL_ZERO, 0, true }, { GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE, 8, true }, { GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, 32, true },