summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bimg/src/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bimg/src/image.cpp')
-rw-r--r--3rdparty/bimg/src/image.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/3rdparty/bimg/src/image.cpp b/3rdparty/bimg/src/image.cpp
index 63d46254a09..2529a8ef245 100644
--- a/3rdparty/bimg/src/image.cpp
+++ b/3rdparty/bimg/src/image.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2022 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2023 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bimg/blob/master/LICENSE
*/
@@ -3299,7 +3299,7 @@ namespace bimg
const uint8_t numMips = _hasMips ? imageGetNumMips(_format, _width, _height, _depth) : 1;
uint32_t size = imageGetSize(NULL, _width, _height, _depth, _cubeMap, _hasMips, _numLayers, _format);
- ImageContainer* imageContainer = (ImageContainer*)BX_ALIGNED_ALLOC(_allocator, size + bx::alignUp(sizeof(ImageContainer), 16), 16);
+ ImageContainer* imageContainer = (ImageContainer*)bx::alignedAlloc(_allocator, size + bx::alignUp(sizeof(ImageContainer), 16), 16);
imageContainer->m_allocator = _allocator;
imageContainer->m_data = bx::alignPtr(imageContainer + 1, 0, 16);
@@ -3330,7 +3330,7 @@ namespace bimg
void imageFree(ImageContainer* _imageContainer)
{
- BX_ALIGNED_FREE(_imageContainer->m_allocator, _imageContainer, 16);
+ bx::alignedFree(_imageContainer->m_allocator, _imageContainer, 16);
}
// DDS
@@ -4459,10 +4459,10 @@ namespace bimg
if (isCompressed(_srcFormat))
{
uint32_t size = imageGetSize(NULL, uint16_t(_width), uint16_t(_height), 0, false, false, 1, TextureFormat::RGBA8);
- void* temp = BX_ALLOC(_allocator, size);
+ void* temp = bx::alloc(_allocator, size);
imageDecodeToRgba8(_allocator, temp, _src, _width, _height, _width*4, _srcFormat);
imageConvert(_allocator, dst, TextureFormat::R8, temp, TextureFormat::RGBA8, _width, _height, 1, _width*4, _dstPitch);
- BX_FREE(_allocator, temp);
+ bx::free(_allocator, temp);
}
else
{
@@ -5149,10 +5149,10 @@ namespace bimg
if (isCompressed(_srcFormat) )
{
uint32_t size = imageGetSize(NULL, uint16_t(_width), uint16_t(_height), 0, false, false, 1, TextureFormat::RGBA8);
- void* temp = BX_ALLOC(_allocator, size);
+ void* temp = bx::alloc(_allocator, size);
imageDecodeToRgba8(_allocator, temp, src, _width, _height, _width*4, _srcFormat);
imageRgba8ToRgba32f(dst, _width, _height, _width*4, temp);
- BX_FREE(_allocator, temp);
+ bx::free(_allocator, temp);
}
else
{
@@ -5805,7 +5805,7 @@ namespace bimg
return total;
}
- for (uint8_t side = 0, numSides = _imageContainer.m_numLayers * (_imageContainer.m_cubeMap ? 6 : 1); side < numSides && _err->isOk(); ++side)
+ for (uint8_t side = 0, numSides = uint8_t(_imageContainer.m_numLayers * (_imageContainer.m_cubeMap ? 6 : 1) ); side < numSides && _err->isOk(); ++side)
{
for (uint8_t lod = 0, num = _imageContainer.m_numMips; lod < num && _err->isOk(); ++lod)
{