Commit Graph

2597 Commits

Author SHA1 Message Date
Syoyo Fujita
f017d061bd add license term 2026-01-07 06:55:43 +09:00
Syoyo Fujita
428a40f513 Add static_any implementation with small buffer optimization
- Type-erased container supporting up to 256 types via custom TypeTraits
- 24-byte small buffer optimization for stack allocation
- Automatic heap allocation for large types
- No C++ exceptions or RTTI required
- C++14 compatible implementation
- 32 bytes total overhead per instance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 02:49:55 +09:00
Syoyo Fujita
a1c10da17c Merge pull request #255 from lighttransport/memcap
feat: Add memory limit enforcement for USDA/USDC parsers
2025-08-04 10:28:58 +09:00
Syoyo Fujita
bcca702522 Fix REDUCE_MEMORY_USAGE bug.
Use 128GB default for all USDA/USDC parser.
2025-08-04 10:19:28 +09:00
Syoyo Fujita
769d44bdc0 fix 32bit build. 2025-08-04 10:05:18 +09:00
Syoyo
2f0c391ffd possible compile fix. 2025-08-04 10:00:46 +09:00
Syoyo
61725d4278 Merge branch 'memcap' of github.com:syoyo/tinyusdz into memcap 2025-08-04 09:54:23 +09:00
Syoyo
8771c8cf3a Merge branch 'dev' into memcap 2025-08-04 09:53:06 +09:00
Syoyo
b48c7b4720 fix compile. 2025-08-04 09:34:14 +09:00
Syoyo Fujita
37b039dc32 Improve error message. 2025-08-04 09:29:55 +09:00
Syoyo Fujita
667bae4601 fix compile on MSVC. 2025-08-04 09:27:13 +09:00
Syoyo
a630c88d62 fix compile. 2025-08-04 09:18:06 +09:00
Syoyo
39f38260f0 Merge branch 'memcap' of github.com:syoyo/tinyusdz into memcap 2025-08-04 09:16:09 +09:00
Syoyo Fujita
000755e66b feat: Add memory limit enforcement for USDA/USDC parsers
Implement configurable memory limits to prevent out-of-memory conditions when
  parsing large USD files. Memory usage is tracked during parsing and loading
  fails gracefully when limits are exceeded.

  USDC Parser:
  - Add memory tracking via CHECK_MEMORY_USAGE/REDUCE_MEMORY_USAGE macros
  - Track allocations in crate-reader.cc for tokens, arrays, and data structures
  - Pass memory limit from USDLoadOptions through USDCReaderConfig
  - Initialize _memoryUsage in CrateReader constructor

  USDA Parser:
  - Add max_memory_limit_in_mb to USDAReaderConfig (default 16GB)
  - Add memory tracking members to AsciiParser class (default 128GB)
  - Implement SetMaxMemoryLimit() method in AsciiParser
  - Track allocations for arrays, references, and string data
  - Add CHECK_MEMORY_USAGE calls in push_back operations

  Both parsers now:
  - Respect USDLoadOptions::max_memory_limit_in_mb setting
  - Provide clear error messages showing limit and current usage
  - Fail gracefully before system runs out of memory

  Testing:
  - Verified with suzanne-subd-lv5.usdc/usda at various limits (10MB, 50MB, 500MB)
  - Small files load successfully with 1MB limit
  - Memory limits properly enforced at different parsing stages

  This feature is especially useful for:
  - Mobile/embedded devices with limited memory
  - Server environments with resource quotas
  - Preventing DoS from malicious/corrupted USD files
  - Debugging memory usage patterns in USD files
2025-08-04 08:59:49 +09:00
Syoyo Fujita
17f515690b Merge branch 'point-instancer' of github.com:lighttransport/tinyusdz into point-instancer 2025-08-04 07:59:08 +09:00
Syoyo Fujita
9ee28c6a19 docker(podman) devcon initial. 2025-08-04 07:35:47 +09:00
Syoyo Fujita
864266461b Add dockerfile(experimental) 2025-08-04 06:07:19 +09:00
Syoyo Fujita
d5216bd73e Merge remote-tracking branch 'origin/release' into dev 2025-08-04 06:07:11 +09:00
Syoyo Fujita
1894c42026 Improve support for PointInstancer Prim 2025-08-02 13:04:29 +09:00
Syoyo Fujita
e2ee2618e7 support matrix type. 2025-07-28 11:42:04 +09:00
Syoyo Fujita
ef44ffd921 support more float/double types. 2025-07-28 11:41:28 +09:00
Syoyo Fujita
49eae68903 Merge pull request #253 from lighttransport/add-claude-github-actions-1753578212225
Add claude GitHub actions 1753578212225
2025-07-27 10:28:28 +09:00
Syoyo Fujita
02e06d8222 Claude Code Review workflow 2025-07-27 10:03:34 +09:00
Syoyo Fujita
a97fe0012a Claude PR Assistant workflow 2025-07-27 10:03:33 +09:00
Syoyo
5cf79781d1 use tinyusdz::str::parse_int 2025-07-26 07:08:56 +09:00
Syoyo Fujita
c07d4dae6a add parse_int expriment. 2025-07-26 05:50:03 +09:00
Syoyo Fujita
dd9e1649f7 optimzie floating point array parser. 2025-07-25 11:31:17 +09:00
Syoyo Fujita
0cc9febe59 Merge branch 'release' into fast-string 2025-07-25 06:50:52 +09:00
Syoyo Fujita
79827cbde2 Add CLAUDE.md 2025-07-25 04:16:11 +09:00
Syoyo Fujita
2a49cfc7db Merge branch 'release' into fast-string 2025-07-25 04:11:52 +09:00
Syoyo Fujita
42be0dd01c Merge pull request #252 from Shootfast/patch-1
Fix uncommented code under #if 0 guard
2025-07-23 06:11:10 +09:00
Shootfast
2998dc63ea Fix uncommented code under #if 0 guard
Code within `#if 0` blocks is still tokenized and this line emits a warning under gcc, which fails with the default -Werror flags.
2025-07-22 21:30:25 +01:00
Syoyo Fujita
f1b066b5d9 Update README.md 2025-07-14 10:38:31 +09:00
Syoyo Fujita
48c4b41f26 Update README.md 2025-07-14 10:12:53 +09:00
Syoyo Fujita
281eaf49d4 Update README.md 2025-07-14 10:09:52 +09:00
Syoyo Fujita
07d12f9397 Merge pull request #247 from bbias/feature/enhanced-light-support
Enhance USD light support with comprehensive attributes
2025-07-14 10:08:01 +09:00
Syoyo Fujita
55d9bc42db Remove extra trailing space
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-14 09:55:33 +09:00
Syoyo Fujita
87802d526b Update README.md 2025-07-14 06:27:56 +09:00
Tobias Baumbach
fcebefba87 Enhance USD light support with comprehensive attributes
- Add RectLight support throughout parser and composition system
- Implement Shadow API for all light types (shadowEnable, shadowColor, shadowDistance, shadowFalloff, shadowFalloffGamma)
- Add Shaping API for boundable lights only (shapingFocus, shapingFocusTint, shapingConeAngle, shapingConeSoftness)
- Enhance DiskLight with missing basic attributes (color, intensity, exposure, normalize, enableColorTemperature, colorTemperature)
- Enhance DistantLight with missing basic attributes
- Add DomeLight texture support via inputs:texture:file
- Fix typo in CylinderLight visibility enum handler
- Properly restrict Shaping API to boundable lights (excludes DistantLight and DomeLight per USD spec)
2025-07-13 22:07:15 +02:00
Syoyo Fujita
c6cda34ae9 Bump version 2025-07-13 10:02:49 +09:00
Syoyo Fujita
f1e23bd8d3 Merge branch 'release' into dev 2025-07-01 05:30:57 +09:00
Syoyo Fujita
451d453815 Merge pull request #244 from FilipAlg/tydra-constant-interpolation
Ignore primvar indices when interpolation mode is 'constant'
2025-07-01 05:30:37 +09:00
Syoyo Fujita
ed949262ca config.yml を作成 2025-07-01 00:07:54 +09:00
Syoyo Fujita
b557612cf2 Update issue templates 2025-07-01 00:04:40 +09:00
Syoyo Fujita
ff3f913ed8 Update issue templates 2025-07-01 00:03:35 +09:00
Filip Henningsson
d8d9703db4 Ignore primvar indices when interpolation mode is 'constant' 2025-06-30 09:30:32 +02:00
Syoyo Fujita
346fd3302a add JsonWriter(w.i.p.) 2025-06-30 08:22:17 +09:00
Syoyo Fujita
1170732865 README.md を更新 2025-06-30 02:46:52 +09:00
Syoyo Fujita
87bdd2aeec README.md を更新 2025-06-29 02:01:37 +09:00
Syoyo Fujita
e7ca4bc9bb Merge pull request #242 from selimsandal/patch-1 2025-06-29 01:29:16 +09:00