diff options
Diffstat (limited to '3rdparty/bgfx/src/vertexdecl.cpp')
-rw-r--r-- | 3rdparty/bgfx/src/vertexdecl.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/3rdparty/bgfx/src/vertexdecl.cpp b/3rdparty/bgfx/src/vertexdecl.cpp index 70c3aafc67f..a2d88a4ff84 100644 --- a/3rdparty/bgfx/src/vertexdecl.cpp +++ b/3rdparty/bgfx/src/vertexdecl.cpp @@ -3,11 +3,10 @@ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -#include <string.h> #include <bx/debug.h> #include <bx/hash.h> #include <bx/readerwriter.h> -#include <bx/radixsort.h> +#include <bx/sort.h> #include <bx/string.h> #include <bx/uint32_t.h> @@ -74,8 +73,8 @@ namespace bgfx { m_hash = _renderer; // use hash to store renderer type while building VertexDecl. m_stride = 0; - memset(m_attributes, 0xff, sizeof(m_attributes) ); - memset(m_offset, 0, sizeof(m_offset) ); + bx::memSet(m_attributes, 0xff, sizeof(m_attributes) ); + bx::memSet(m_offset, 0, sizeof(m_offset) ); return *this; } @@ -513,7 +512,7 @@ namespace bgfx break; case AttribType::Float: - memcpy(data, _input, num*sizeof(float) ); + bx::memCopy(data, _input, num*sizeof(float) ); break; } } @@ -522,7 +521,7 @@ namespace bgfx { if (!_decl.has(_attr) ) { - memset(_output, 0, 4*sizeof(float) ); + bx::memSet(_output, 0, 4*sizeof(float) ); return; } @@ -630,7 +629,7 @@ namespace bgfx break; case AttribType::Float: - memcpy(_output, data, num*sizeof(float) ); + bx::memCopy(_output, data, num*sizeof(float) ); _output += num; break; } @@ -648,7 +647,7 @@ namespace bgfx { if (_destDecl.m_hash == _srcDecl.m_hash) { - memcpy(_destData, _srcData, _srcDecl.getSize(_num) ); + bx::memCopy(_destData, _srcData, _srcDecl.getSize(_num) ); return; } @@ -721,11 +720,11 @@ namespace bgfx switch (cop.op) { case ConvertOp::Set: - memset(dest + cop.dest, 0, cop.size); + bx::memSet(dest + cop.dest, 0, cop.size); break; case ConvertOp::Copy: - memcpy(dest + cop.dest, src + cop.src, cop.size); + bx::memCopy(dest + cop.dest, src + cop.src, cop.size); break; case ConvertOp::Convert: @@ -755,7 +754,7 @@ namespace bgfx const float epsilonSq = _epsilon*_epsilon; uint32_t numVertices = 0; - memset(_output, 0xff, _num*sizeof(uint16_t) ); + bx::memSet(_output, 0xff, _num*sizeof(uint16_t) ); for (uint32_t ii = 0; ii < _num; ++ii) { @@ -800,7 +799,7 @@ namespace bgfx const uint32_t size = sizeof(uint16_t)*(hashSize + _num); uint16_t* hashTable = (uint16_t*)alloca(size); - memset(hashTable, 0xff, size); + bx::memSet(hashTable, 0xff, size); uint16_t* next = hashTable + hashSize; |