Branimir Karadžić vor 7 Jahren
Ursprung
Commit
e9869fbeed
5 geänderte Dateien mit 32 neuen und 22 gelöschten Zeilen
  1. 2 2
      src/renderer_d3d11.cpp
  2. 9 7
      src/renderer_d3d12.cpp
  3. 11 9
      src/renderer_d3d9.cpp
  4. 4 2
      src/renderer_gl.cpp
  5. 6 2
      src/renderer_mtl.mm

+ 2 - 2
src/renderer_d3d11.cpp

@@ -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;
 		}
 

+ 9 - 7
src/renderer_d3d12.cpp

@@ -4495,13 +4495,15 @@ namespace bgfx { namespace d3d12
 							const uint32_t size  = slice*depth;
 
 							uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, size);
-							bimg::imageDecodeToBgra8(temp
-									, mip.m_data
-									, mip.m_width
-									, mip.m_height
-									, pitch
-									, mip.m_format
-									);
+							bimg::imageDecodeToBgra8(
+								  g_allocator
+								, temp
+								, mip.m_data
+								, mip.m_width
+								, mip.m_height
+								, pitch
+								, mip.m_format
+								);
 
 							srd[kk].pData      = temp;
 							srd[kk].RowPitch   = pitch;

+ 11 - 9
src/renderer_d3d9.cpp

@@ -2978,13 +2978,15 @@ namespace bgfx { namespace d3d9
 								uint32_t srcpitch = mipWidth*bpp/8;
 
 								uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, srcpitch*mipHeight);
-								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
+									);
 
 								bx::memCopy(bits, temp, pitch, height, srcpitch, pitch);
 
@@ -2992,7 +2994,7 @@ namespace bgfx { namespace d3d9
 							}
 							else
 							{
-								bimg::imageDecodeToBgra8(bits, mip.m_data, mip.m_width, mip.m_height, pitch, mip.m_format);
+								bimg::imageDecodeToBgra8(g_allocator, bits, mip.m_data, mip.m_width, mip.m_height, pitch, mip.m_format);
 							}
 						}
 						else
@@ -3051,7 +3053,7 @@ namespace bgfx { namespace d3d9
 		if (convert)
 		{
 			temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height);
-			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;
 		}
 

+ 4 - 2
src/renderer_gl.cpp

@@ -5151,7 +5151,9 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
 
 							if (convert)
 							{
-								imageDecodeToRgba8(temp
+								imageDecodeToRgba8(
+									  g_allocator
+									, temp
 									, mip.m_data
 									, mip.m_width
 									, mip.m_height
@@ -5320,7 +5322,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
 
 			if (convert)
 			{
-				bimg::imageDecodeToRgba8(temp, data, width, height, srcpitch, bimg::TextureFormat::Enum(m_requestedFormat) );
+				bimg::imageDecodeToRgba8(g_allocator, temp, data, width, height, srcpitch, bimg::TextureFormat::Enum(m_requestedFormat) );
 				data = temp;
 				srcpitch = rectpitch;
 			}

+ 6 - 2
src/renderer_mtl.mm

@@ -2707,7 +2707,9 @@ namespace bgfx { namespace mtl
 
 						if (convert)
 						{
-							bimg::imageDecodeToBgra8(temp
+							bimg::imageDecodeToBgra8(
+								  g_allocator
+								, temp
 								, mip.m_data
 								, mip.m_width
 								, mip.m_height
@@ -2780,7 +2782,9 @@ namespace bgfx { namespace mtl
 		if (convert)
 		{
 			temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height);
-			bimg::imageDecodeToBgra8(temp
+			bimg::imageDecodeToBgra8(
+				  g_allocator
+				, temp
 				, data
 				, _rect.m_width
 				, _rect.m_height