瀏覽代碼

Merge branch 'master' of github.com:bkaradzic/bgfx

Бранимир Караџић 6 年之前
父節點
當前提交
97e83628fd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/renderer_d3d11.cpp

+ 1 - 1
src/renderer_d3d11.cpp

@@ -4188,7 +4188,7 @@ namespace bgfx { namespace d3d11
 						if (convert)
 						if (convert)
 						{
 						{
 							uint32_t srcpitch = mip.m_width*bpp/8;
 							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);
+							uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, srcpitch*mip.m_height);
 							bimg::imageDecodeToBgra8(g_allocator, 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].pSysMem = temp;