mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
Cleanup.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user