Skip to content

OrigamiKingRecomp v0.1.0-beta.5

Latest

Choose a tag to compare

@WenVil WenVil released this 02 Dec 11:25
87463cc

What's Changed in v0.1.0-beta.5

Upgrade Note: GAMELIB_ID is unchanged — existing players do not need to recompile lasgame_E74395F066FD8CCB.dll. Just replace the extracted files and keep your saves/data folder.

Fixed 3D Lighting Corruption (Dark Areas & Neon-Red Glow)

  • Fixed 3D NVNpackagedTextureLayout Decoding (bh / bd): All 1,664 3D lighting probe volumes (.probe.bntx.zst) across the game use packed block-height/block-depth nibbles (0x20 / 0x30 / 0x40). Previously, layouts with pl > 5 were dropped back to default bh = 3, causing 3D probe slices to misalign/zero out (dark/greenish shadows) and overrun into adjacent R16F buffers (bright neon-red artifacts and NaNs in areas like Picnic Road and battles).
  • Fixed 3D Layer Alignment: Updated tegra_layer_size to align 3D layers by 512 << (block_height_log2 + block_depth_log2).

Stability, Crash (VK_ERROR_DEVICE_LOST) & Memory Leak Fixes

  • Fixed VAMM Unmap GPU Page Fault (0x639... / record.c:585): Removed the 64-entry truncation cap during vamm_unmap_sync and ensured the render queue and in-flight GPU fences fully drain before plat_decommit (VirtualFree MEM_DECOMMIT) releases external-memory host pages.
  • Thread-Safe Deferred Destruction Queue: Added a dedicated mutex (dead_lock) around deferred Vulkan resource destruction and made submit_seq / gc_gen atomic to prevent cross-thread races and premature frees.
  • Expanded Compute Shader Cache (256 → 2048): Fixed g_cs_tab overflow once a session visited more than 256 of the game's 449 unique compute shaders, eliminating cache thrashing and repeated lock contention during longer play sessions.
  • Plugged Object & Pool Leaks: Fixed leaked Vulkan resources on in-place nvnTextureInitialize overwrites, nvnMemoryPoolFinalize, nvnTexturePoolFinalize / nvnSamplerPoolFinalize, and NV12 video planes.
  • Improved GPU Fault Diagnostics: Fixed a disabled VK_EXT_device_fault logging branch and added fault-address lookup (vimp BDA / allocations) plus a recent-operation ring dump on VK_ERROR_DEVICE_LOST.

(Note: Full VRAM LRU eviction for long multi-hour sessions on 4 GB GPUs is planned next for v0.1.0-beta.6.)


v0.1.0-beta.5 更新日志

升级说明: 本版本 GAMELIB_ID 未变更,老玩家覆盖更新后无需重新编译 lasgame_E74395F066FD8CCB.dll,保留原存档与数据目录即可直接启动。

彻底修复 3D 光照异常(局域异常发黑 / 暗绿 / 荧光红过曝)

  • 修复 3D 纹理 NVNpackagedTextureLayout 高低半字节解析(bh / bd):全游戏全部 1,664 个 3D 光照探针体纹理(.probe.bntx.zst)均采用 0x20 / 0x30 / 0x40 布局。此前 pl > 5 会被丢弃并回退至默认 bh = 3,导致探针切片错位归零(野餐之路及战斗场景大面积异常发黑/暗绿)且体积膨胀越界读入相邻 R16F 缓冲(产生高饱和荧光红与 NaN)。
  • 修正 3D 层对齐计算:将 tegra_layer_size 的 3D 层对齐修正为 512 << (block_height_log2 + block_depth_log2)。

GPU 页错误闪退(VK_ERROR_DEVICE_LOST)与内存泄漏修复

  • 修复 VAMM 解映射引发的 GPU Page Fault(record.c:585):取消 vamm_unmap_sync 中 64 项截断上限,并在 plat_decommit 撤回物理页前完整排空渲染线程与在途 GPU Fence,消除外部导入显存被提前撤页导致的页错误崩溃。
  • 修复延迟销毁队列跨线程竞态:为 dead[] 增加专属互斥锁,并将 submit_seq / gc_gen 升级为原子变量,消除游戏线程与渲染线程并发读写引发的提前释放隐患。
  • 扩容 Compute 着色器缓存表(256 → 2048):彻底解决游玩时间变长、触及超过 256 个(全作共 449 个)独立 Compute 着色器后缓存表溢出导致的反复扫描与锁争抢掉帧。
  • 修复多项对象与池泄漏:堵住 nvnTextureInitialize 原地覆写、nvnMemoryPoolFinalize、nvnTexturePoolFinalize / nvnSamplerPoolFinalize 及 NV12 视频平面的资源泄漏。
  • 增强设备丢失诊断:修复 VK_EXT_device_fault 报错分支误屏蔽问题,触发 VK_ERROR_DEVICE_LOST 时自动输出故障地址反查与近期渲染操作记录。

(注:面向 4 GB 小显存长时间游玩的全量纹理 LRU 显存预算回收机制将在 v0.1.0-beta.6 推出。)