Skip to content

Commit

Permalink
LIBS: updated meshoptimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Feb 14, 2025
1 parent 241b21c commit 80171ff
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"simplexnoise": "83b576feea873a9ab4f2d3bb5da394c0b0b18e7f",
"flextgl": "bc3d4da8fc087cba17d64e9d908ae35b7e40f4fe",
"libvxl": "2d482be6e738f0befdbb4f63d740c51eef9970a3",
"meshoptimizer": "331f1cebfa08bfcb06521ea587336a870a04955a",
"meshoptimizer": "568b628e52f5c383e9f8aa7cbb3f0df666bfbca4",
"yocto-gl": "7e35c631b5ee29f1a7ee1010c5dcf0879aa3dcf3",
"ufbx": "6af38bda840a1741faa203a2f952e6877f2b4d6f",
"natsort": "cdd8df9602e727482ae5e051cff74b7ec7ffa07a",
Expand Down
44 changes: 22 additions & 22 deletions contrib/libs/meshoptimizer/meshoptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,27 @@ MESHOPTIMIZER_API void meshopt_spatialSortRemap(unsigned int* destination, const
*/
MESHOPTIMIZER_EXPERIMENTAL void meshopt_spatialSortTriangles(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride);

/**
* Quantize a float into half-precision (as defined by IEEE-754 fp16) floating point value
* Generates +-inf for overflow, preserves NaN, flushes denormals to zero, rounds to nearest
* Representable magnitude range: [6e-5; 65504]
* Maximum relative reconstruction error: 5e-4
*/
MESHOPTIMIZER_API unsigned short meshopt_quantizeHalf(float v);

/**
* Quantize a float into a floating point value with a limited number of significant mantissa bits, preserving the IEEE-754 fp32 binary representation
* Generates +-inf for overflow, preserves NaN, flushes denormals to zero, rounds to nearest
* Assumes N is in a valid mantissa precision range, which is 1..23
*/
MESHOPTIMIZER_API float meshopt_quantizeFloat(float v, int N);

/**
* Reverse quantization of a half-precision (as defined by IEEE-754 fp16) floating point value
* Preserves Inf/NaN, flushes denormals to zero
*/
MESHOPTIMIZER_API float meshopt_dequantizeHalf(unsigned short h);

/**
* Set allocation callbacks
* These callbacks will be used instead of the default operator new/operator delete for all temporary allocations in the library.
Expand All @@ -620,7 +641,7 @@ MESHOPTIMIZER_API void meshopt_setAllocator(void* (MESHOPTIMIZER_ALLOC_CALLCONV*
} /* extern "C" */
#endif

/* Quantization into commonly supported data formats */
/* Quantization into fixed point normalized formats; these are only available as inline C++ functions */
#ifdef __cplusplus
/**
* Quantize a float in [0..1] range into an N-bit fixed point unorm value
Expand All @@ -635,27 +656,6 @@ inline int meshopt_quantizeUnorm(float v, int N);
* Maximum reconstruction error: 1/2^N
*/
inline int meshopt_quantizeSnorm(float v, int N);

/**
* Quantize a float into half-precision (as defined by IEEE-754 fp16) floating point value
* Generates +-inf for overflow, preserves NaN, flushes denormals to zero, rounds to nearest
* Representable magnitude range: [6e-5; 65504]
* Maximum relative reconstruction error: 5e-4
*/
MESHOPTIMIZER_API unsigned short meshopt_quantizeHalf(float v);

/**
* Quantize a float into a floating point value with a limited number of significant mantissa bits, preserving the IEEE-754 fp32 binary representation
* Generates +-inf for overflow, preserves NaN, flushes denormals to zero, rounds to nearest
* Assumes N is in a valid mantissa precision range, which is 1..23
*/
MESHOPTIMIZER_API float meshopt_quantizeFloat(float v, int N);

/**
* Reverse quantization of a half-precision (as defined by IEEE-754 fp16) floating point value
* Preserves Inf/NaN, flushes denormals to zero
*/
MESHOPTIMIZER_API float meshopt_dequantizeHalf(unsigned short h);
#endif

/**
Expand Down

0 comments on commit 80171ff

Please sign in to comment.