From 27602120e9af88ac36913e94824ed5ba8ec84864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Tue, 11 Oct 2022 07:15:30 -0700 Subject: [PATCH] Deleted bad conversion code. --- src/renderer_d3d11.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 5e42bf9f7..4c5a1a630 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -4785,7 +4785,6 @@ namespace bgfx { namespace d3d11 } const bimg::ImageBlockInfo& blockInfo = bimg::getBlockInfo(bimg::TextureFormat::Enum(m_textureFormat) ); - const uint16_t blockHeight = blockInfo.blockHeight; const uint16_t bpp = blockInfo.bitsPerPixel; const uint32_t subres = _mip + ( (layer + _side) * m_numMips); const bool depth = bimg::isDepth(bimg::TextureFormat::Enum(m_textureFormat) ); @@ -4813,32 +4812,6 @@ namespace bgfx { namespace d3d11 box.bottom = bx::max(1u, m_height >> _mip); } - { - uint8_t* src = data; - for (uint32_t yy = 0, height = _rect.m_height; yy < height; yy += blockHeight) - { - switch (m_textureFormat) - { - case TextureFormat::R5G6B5: - temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch); - bimg::imageConvert(temp, 16, bx::packB5G6R5, src, bx::unpackR5G6B5, rectpitch); - data = temp; - break; - case TextureFormat::RGBA4: - temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch); - bimg::imageConvert(temp, 16, bx::packBgra4, src, bx::unpackRgba4, rectpitch); - data = temp; - break; - case TextureFormat::RGB5A1: - temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch); - bimg::imageConvert(temp, 16, bx::packBgr5a1, src, bx::unpackRgb5a1, rectpitch); - data = temp; - break; - } - src += srcpitch; - } - } - deviceCtx->UpdateSubresource( m_ptr , subres