This commit is contained in:
Branimir Karadžić 2018-02-10 15:43:26 -08:00
parent 3a8857654f
commit 636d4bfe55
2 changed files with 8 additions and 8 deletions

View File

@ -195,7 +195,7 @@ namespace bgfx
{
bx::MutexScope scope(m_mutex);
++m_numBlocks;
m_maxBlocks = bx::uint32_max(m_maxBlocks, m_numBlocks);
m_maxBlocks = bx::max(m_maxBlocks, m_numBlocks);
}
#endif // BGFX_CONFIG_MEMORY_TRACKING
@ -212,7 +212,7 @@ namespace bgfx
{
bx::MutexScope scope(m_mutex);
++m_numBlocks;
m_maxBlocks = bx::uint32_max(m_maxBlocks, m_numBlocks);
m_maxBlocks = bx::max(m_maxBlocks, m_numBlocks);
}
#endif // BGFX_CONFIG_MEMORY_TRACKING
@ -987,9 +987,9 @@ namespace bgfx
m_compute.m_startMatrix = m_draw.m_startMatrix;
m_compute.m_numMatrices = m_draw.m_numMatrices;
m_compute.m_numX = bx::uint32_max(_numX, 1);
m_compute.m_numY = bx::uint32_max(_numY, 1);
m_compute.m_numZ = bx::uint32_max(_numZ, 1);
m_compute.m_numX = bx::max(_numX, 1u);
m_compute.m_numY = bx::max(_numY, 1u);
m_compute.m_numZ = bx::max(_numZ, 1u);
m_compute.m_submitFlags = _flags;
m_key.m_program = _handle.idx;

View File

@ -449,7 +449,7 @@ namespace bgfx
{
if (_hasMips)
{
const uint32_t max = bx::uint32_max(bx::uint32_max(_width, _height), _depth);
const uint32_t max = bx::max(_width, _height, _depth);
const uint32_t num = 1 + uint32_t(bx::log2(float(max) ) );
return uint8_t(num);
@ -2864,7 +2864,7 @@ namespace bgfx
return ptr;
}
uint32_t allocSize = bx::uint32_max(BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE, _size);
const uint32_t allocSize = bx::max<uint32_t>(BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE, _size);
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateDynamicIndexBuffer);
cmdbuf.write(indexBufferHandle);
@ -3033,7 +3033,7 @@ namespace bgfx
return NonLocalAllocator::kInvalidBlock;
}
uint32_t allocSize = bx::uint32_max(BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE, _size);
const uint32_t allocSize = bx::max<uint32_t>(BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE, _size);
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateDynamicVertexBuffer);
cmdbuf.write(vertexBufferHandle);