tinyusdz.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. diff -rupN -x .git autoclone/tinyusdz_repo-src/src/external/stb_image_resize2.h tinyusdz_repo_patch/src/external/stb_image_resize2.h
  2. --- autoclone/tinyusdz_repo-src/src/external/stb_image_resize2.h 2024-10-27 03:26:45.457163600 -0700
  3. +++ tinyusdz_repo_patch/src/external/stb_image_resize2.h 2024-10-27 03:31:09.255211100 -0700
  4. @@ -2500,6 +2500,38 @@ static stbir__inline stbir_uint8 stbir__
  5. }
  6. }
  7. +#elif defined(STBIR_NEON) && (defined(__ANDROID__) && defined(__arm__)) // 32-bit ARM on android NDK
  8. +
  9. + // TODO As of Apr 2024, tinyusdz doesn't support building on armeabi-v7a (32 bit arm) for android
  10. + // (falls through to arm64 block and build fails)
  11. + //
  12. + // For assimp integration, the image processing utilities aren't used at all, so it's safe to
  13. + // essentially replace the functions with dummy no-ops.
  14. + //
  15. + // This will need to be done manually whenever the tinyusdz source files are updated in assimp,
  16. + // as it seems unlikely this will be fixed in the tinyusdz project
  17. + static stbir__inline void stbir__half_to_float_SIMD(float * output, stbir__FP16 const * input)
  18. + {
  19. + // TODO: this stub is just to allow build on armeabi-v7a via android NDK
  20. + }
  21. +
  22. + static stbir__inline void stbir__float_to_half_SIMD(stbir__FP16 * output, float const * input)
  23. + {
  24. + // TODO: this stub is just to allow build on armeabi-v7a via android NDK
  25. + }
  26. +
  27. + static stbir__inline float stbir__half_to_float( stbir__FP16 h )
  28. + {
  29. + // TODO: this stub is just to allow build on armeabi-v7a via android NDK
  30. + return 0;
  31. + }
  32. +
  33. + static stbir__inline stbir__FP16 stbir__float_to_half( float f )
  34. + {
  35. + // TODO: this stub is just to allow build on armeabi-v7a via android NDK
  36. + return 0;
  37. + }
  38. +
  39. #endif