English
-
Fix Issue #38 inverted/black light fixtures ("anti-lights emitting darkness") in Numara Castle (Philosopher's Chamber):
- In
LostOdysseyRecomp/gpu/renderer.cppandLostOdysseyRecomp/gpu/shader/xenos_translator.cpp, correct the host EDRAM epilogue clamping for unsigned formats (formats 0, 1, 2, 3, 10, 12, including 7e3COLOR_2_10_10_10_FLOAT). Clamping lower bound is now strictly0.0for unsigned targets, preventing additive blending passes from accumulating negative light and tone-mappinglog2from triggering NaNs / black voids. - Bump shader cache
Versionfrom 22 to 23 incache.hto invalidate stale DXIL binaries.
- In
-
Fix TAA flicker on stairs and save point in
f2358:- Register missing static scene and lighting vertex shaders (
0x69e9adcf2e1b6887,0x6a8c2c78737dc94c,0xa20d6099a44e2cd5to Slot 7 and0x6761469677f921c6to Slot 8) inPositionVPSlot(LostOdysseyRecomp/gpu/temporal_scene.h), eliminating inter-frame phase jitter artifacts.
- Register missing static scene and lighting vertex shaders (
-
Optimize shader and pipeline prebuilding concurrency and throughput:
- Dynamically scale concurrent DXC and pipeline workers based on host physical memory and CPU thread count (
HostWorkerCap). Hosts with >= 8 GB RAM automatically uselogicalThreads - 1workers, while low-memory environments (< 8 GB RAM) retain a 4-worker safety cap to prevent OOM. - Support explicit worker concurrency overrides via environment variables
LO_SHADER_WORKERSandLO_PIPELINE_WORKERS(accepting numeric counts,0, ormax). - Eliminate
MOVEFILE_WRITE_THROUGHforced disk flushes on Windows shader checkpoint saves, allowing OS write-caching to accelerate compilation throughput. - Prioritize primary game and executable shaders ahead of predictive expansion variants during preparation, ensuring essential scene shaders compile first.
- Add interactive skip support to the shader preparation screen (press ESC, Space, or Controller B to skip remaining compilation and start the game immediately).
- Add
skip_shader_prebuildconfiguration setting insettings.inito permanently bypass startup compilation on low-end systems. - Add
tools/release/package_shader_bundle.pyutility to package precompiled startup bundles into release archives for distribution without Git LFS.
- Dynamically scale concurrent DXC and pipeline workers based on host physical memory and CPU thread count (
-
Add portable Vulkan shader pack distribution architecture (
.lospv):- Introduce independent, read-only
.lospvdistribution artifact for successful SPIR-V binaries and essentialTranslatedShadermetadata, completely stripping HLSL sources, diagnostics, and failure records. - Implement SHA-256 deduplication of SPIR-V bytecode and chunked Zstandard block compression (~1 MiB blocks) with single-block streaming cache, significantly reducing distribution size and startup RSS (169.9 MB package for 28,482 shaders).
- Runtime module creation is performed lazily upon first use in rendering, bypassing startup discovery/translation/DXC overhead when a valid pack is present (verified 1.2s startup on WSL Linux with 0 DXC calls).
- Decouple compatibility contract from host install path and host DXC DLL/SO SHA-256, allowing portable pack reuse across platforms and CPU architectures (x86-64 / ARM64, Windows / Linux / Steam Deck).
- Add
LoShaderPackToolinspection/verification utility,tools/build_linux.shandtools/build_wsl.batfor fast on-demand incremental builds, and update packaging scripts (package_shader_bundle.py,package_release.py,package_appimage.py) to verify and package.lospvrelease assets.
- Introduce independent, read-only
-
Keep extraction and fixed/linked shader sources in bounded memory instead of
exporting and re-reading temporary sources during prebuild; retain compiled
checkpoints for interrupted-startup recovery. -
Bind startup bundles to the current runtime/compiler contract, restore event
pumping and transactional error propagation, and fix cancellation wakeups. -
Cap concurrent DXC preparation at four workers, release retained HLSL, and
decode only indexed CPX blocks. Preserve explicit diagnostic/full-scan controls. -
Add game-data-free CPU/sanitizer and production-function regression coverage.
See audit scope, evidence and remaining hardware checks. -
Menu branch fixes improve the in-game debug overlay across output resolutions and protect shared overlay state during concurrent access. The software UI now uses the intended RGBA channel order, HID locking covers the complete device operation, and guest pause uses cooperative safe points so overlay interaction does not suspend worker threads indefinitely.
-
Addressed code review report items R1 through R10:
- Decoupled host controller input pumping (
PumpHostInput) and overlay presentation (PresentHostOverlay) from guest pause, and added SDL event pumping to GPUWAIT_REG_MEMloops (R1, R2). - Replaced atomic wait in
InterruptMainwithstd::condition_variableand integratedhost_ui::RequestStop()to guarantee cancellable shutdown without lost wakeups (R5a, R5b). - Implemented pause-aware active game clock (
GetActiveGameTimeMs) and scene generation tracking for teleport and battle commands, preserving bookmarks and pending states across pauses, and provided accurate asynchronous status feedback in the debug overlay (R3, R9). - Enabled custom settings on Linux via renderer capability check (
LO_GPU_PLUME), isolated settings buffer caching from debug overlay compositing, guarded mouse click propagation under modal overlays, and corrected straight-alpha source-over blending math (R4, R7, R8, R10). - Migrated
LoDebugMenuInteractionTestto the host overlay model, covering navigation, state synchronization, and error handling (R6).
- Decoupled host controller input pumping (
-
Addressed third-round code review report items R11 through R17:
- Synchronized
g_pixelsbuffer, dimensions, and added exact-size validation inSaveScreenshotCPU fallback to eliminate out-of-bounds reads during menu presentation (R11). - Deduplicated keyboard navigation between window event pump and host HID polling by removing raw key polling from
PumpHostInput(R12). - Implemented button release quarantine for overlay close actions (B button and LB+RB chord) to prevent consumed buttons from leaking to underlying settings and game simulation (R13).
- Added throttled 16ms host overlay presentation inside GPU
PM4_WAIT_REG_MEMloops to ensure UI refreshes even when CP waits on paused guest conditions (R14). - Propagated active presentation tickets from
DisplayChangeTrackerinPresentHostOverlayto properly resolve display change transactions (R15). - Protected overlay status feedback with minimum display durations so immediate command rejections are not overwritten by stale service snapshots (R16).
- Configured platform-appropriate graphics backend choices and graceful manual-restart guidance on non-Windows platforms (R17).
- Relocated
LoDebugMenuInteractionTestinto the cross-platform test suite in CMake.
- Synchronized
-
Maintained and expanded test suite:
LoHidTest,LoHostUiCompositeTest,LoDebugOverlayTest,LoDebugMenuInteractionTest, andLoMenuRenderTestall built and passed.
简体中文
-
修复 Issue #38 努玛拉城哲学者之间(Philosopher's Chamber)黑光灯具问题:
- 在
LostOdysseyRecomp/gpu/renderer.cpp与LostOdysseyRecomp/gpu/shader/xenos_translator.cpp中修正着色器尾声对无符号 EDRAM 格式(格式 0、1、2、3、10、12,含 7e3 格式COLOR_2_10_10_10_FLOAT)的物理范围截断。无符号目标下限严格截断至0.0,杜绝加法光照混合通道写入负数及后续色调映射log2(负数)扩散至全屏的巨大黑洞。 - 将
cache.h中的着色器缓存版本号Version由 22 提升至 23,自动使磁盘旧版 DXIL 缓存失效。
- 在
-
修复
f2358场景阶梯与保存点光球处的 TAA 抖动闪烁:- 在
LostOdysseyRecomp/gpu/temporal_scene.h的PositionVPSlot中补充注册遗漏的静态场景与光照顶点着色器(0x69e9adcf2e1b6887、0x6a8c2c78737dc94c、0xa20d6099a44e2cd5映射至 Slot 7,0x6761469677f921c6映射至 Slot 8),消除帧间相机抖动补偿相位不匹配导致的闪烁。
- 在
-
优化着色器与管线预构建并发编译效率与 I/O 吞吐:
- 基于宿主物理内存容量与 CPU 逻辑线程数动态调整 DXC 与管线并发工作线程数(
HostWorkerCap)。宿主物理内存 >= 8 GB 时自动使用logicalThreads - 1线程充分发挥多核并发性能,仅在物理内存 < 8 GB 的低内存环境中保留 4 线程安全上限以防 OOM。 - 支持通过环境变量
LO_SHADER_WORKERS与LO_PIPELINE_WORKERS显式指定工作线程数(支持数值、0或max全核)。 - 移除 Windows 单文件着色器落盘时的
MOVEFILE_WRITE_THROUGH物理强行刷盘标志,利用系统写缓冲消除小文件磁头寻道阻塞,显著提升写入吞吐。 - 引入着色器预构建优先级排序:核心 XEX 与游戏包体真实着色器(优先级 0)优先编译,预测性展开变体(优先级 1)靠后编译,确保基础画面即时就绪。
- 启动预构建界面增加按键跳过支持:按 ESC、空格键或手柄 B 键可随时安全跳过剩余预编译直接进入游戏,已编译内容自动持久化保存。
settings.ini增加skip_shader_prebuild配置项,方便低配电脑与掌机用户永久绕过全量预编译。- 新增
tools/release/package_shader_bundle.py打包脚本,支持将预编译启动包打入独立 Release 附件分发,避免消耗 Git LFS 配额。
- 基于宿主物理内存容量与 CPU 逻辑线程数动态调整 DXC 与管线并发工作线程数(
-
新增可分发便携式 Vulkan 着色器包架构(
.lospv):- 引入独立、只读的
.lospv分发资产,仅封装成功编译的 SPIR-V 字节码与必要TranslatedShader元数据,彻底剥离 HLSL 源码、诊断日志与编译失败条目。 - 实现 SPIR-V 字节码 SHA-256 精确去重与分块 Zstandard 压缩(约 1 MiB 数据块),采用单块流式解码缓存,大幅压缩分发体积并削减启动 RSS 内存占用(28,482 个着色器压缩至 169.9 MB)。
- 运行时着色器模块创建改为按需惰性加载(Lazy loading),存在有效便携包时直接秒级进入游戏并跳过启动阶段全量预编译(WSL Linux 实测 1.2 秒启动,0 次 DXC 调用与重翻译);遇到未覆盖着色器时保留本地按需编译回退。
- 兼容性契约与宿主绝对路径、宿主 DXC 动态库哈希完全解耦,支持跨系统与跨 CPU 架构(Windows / Linux / Steam Deck,x86-64 / ARM64)通用复用。
- 提供
LoShaderPackTool检查与完整性校验工具,新增tools/build_linux.sh与tools/build_wsl.bat便捷增量构建脚本,并更新打包流程(package_shader_bundle.py、package_release.py、package_appimage.py),支持在发布时按需校验并打包独立的.lospvRelease 附件。
- 引入独立、只读的
-
menu 分支修复了游戏内调试浮层在不同输出分辨率下的合成,并保护并发访问中的共享浮层状态。软件 UI 现使用正确的 RGBA 通道顺序,HID 锁覆盖完整设备操作,客户机暂停通过协作安全点完成,避免浮层交互无限期挂起工作线程。
-
完整修复代码审查报告 R1 至 R10 缺陷项:
- 将手柄宿主输入泵(
PumpHostInput)与浮层呈现(PresentHostOverlay)与客户机暂停解耦,并在 GPUWAIT_REG_MEM循环中注入事件泵,防止暂停期间卡死(R1, R2)。 - 使用
std::condition_variable替换InterruptMain中的原子变量等待,并在退出流程接入host_ui::RequestStop(),消除漏唤醒并确保可取消销毁(R5a, R5b)。 - 引入感知暂停的主动游戏时钟(
GetActiveGameTimeMs)与场景代数(sceneGeneration),防止暂停超时误判失效并保留传送标记与胜负请求;浮层 UI 准确反馈异步命令状态,杜绝虚假成功提示(R3, R9)。 - 移除 Linux 设置菜单入口的平台宏限制,改为按渲染器能力启用(
LO_GPU_PLUME);拆分独立呈现缓冲隔离设置底图缓存,拦截模态下底层鼠标点击穿透,并修正ColorBlend的 straight-alpha source-over 混合算法(R4, R7, R8, R10)。 - 将废弃的原生窗口测试迁移为浮层交互测试
LoDebugMenuInteractionTest,覆盖模态切换、导航、错误反馈及光栅化渲染(R6)。
- 将手柄宿主输入泵(
-
完整修复第三轮代码审查报告 R11 至 R17 缺陷项:
- 同步菜单呈现时的
g_pixels缓冲与元数据,并在SaveScreenshot的 CPU 回退分支增加严格尺寸一致性校验,根除截图越界读取隐患(R11)。 - 去除
PumpHostInput中的按键重复轮询,统一由窗口事件泵处理键盘导航,解决方向与切页键双重触发问题(R12)。 - 引入按键释放隔离(Release Quarantine)机制,关闭浮层的 B 键及肩键组合(LB+RB)在物理松开前持续过滤,防止泄漏到底层设置及游戏(R13)。
- 在 GPU
PM4_WAIT_REG_MEM循环中增加 16ms 节拍的浮层独立呈现,解决等待停滞期间的菜单重绘饥饿问题(R14)。 - 浮层呈现接入
DisplayChangeTracker的有效展示凭证(Presentation Ticket),修复暂停期间全屏切换事务挂起缺陷(R15)。 - 为浮层命令反馈增加最短保留时间,防止即时拒绝提示被过期的业务快照无条件覆盖(R16)。
- 在 Linux 平台上按实际能力展示唯一的 Vulkan 图形后端,并将重启对话框调整为友好的手动重启提示(R17)。
- 将
LoDebugMenuInteractionTest测试目标移出 Windows 独占条件,加入跨平台测试套件。
- 同步菜单呈现时的
-
维持并扩充测试套件:
LoHidTest、LoHostUiCompositeTest、LoDebugOverlayTest、LoDebugMenuInteractionTest与LoMenuRenderTest全部重新编译并测试通过。
Published at GitHub Release v0.5.20 on 2026-09-17.