This commit is contained in:
Branimir Karadžić
2018-05-24 18:03:31 -07:00
parent 2f67615460
commit e9869fbeed
5 changed files with 32 additions and 22 deletions

View File

@@ -4392,7 +4392,7 @@ namespace bgfx { namespace d3d11
{
uint32_t srcpitch = mip.m_width*bpp/8;
uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, mip.m_width*mip.m_height*bpp/8);
bimg::imageDecodeToBgra8(temp, mip.m_data, mip.m_width, mip.m_height, srcpitch, mip.m_format);
bimg::imageDecodeToBgra8(g_allocator, temp, mip.m_data, mip.m_width, mip.m_height, srcpitch, mip.m_format);
srd[kk].pSysMem = temp;
srd[kk].SysMemPitch = srcpitch;
@@ -4713,7 +4713,7 @@ namespace bgfx { namespace d3d11
if (convert)
{
temp = (uint8_t*)BX_ALLOC(g_allocator, slicepitch);
bimg::imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, bimg::TextureFormat::Enum(m_requestedFormat) );
bimg::imageDecodeToBgra8(g_allocator, temp, data, _rect.m_width, _rect.m_height, srcpitch, bimg::TextureFormat::Enum(m_requestedFormat) );
data = temp;
}