Repository navigation
fix(gfx): scaled and format-changing texture copies are drawn, so Ocarina of Time's pause menus show the blurred scene behind them - #2160
Merged
ly05010419 merged 1 commit intoNov 14, 2026
Conversation
…rina of Time's pause menus show the blurred scene behind them copy_t2t dropped every texture copy whose source and destination regions differ in size or format (RED_ONCE 33). Ocarina of Time's pause menus copy the 2560x1440 scene into a 1280x720 texture for their blurred backdrop; with that copy dropped, the menus stood on black and the dark slots of songs not yet learned were invisible against it. copy_t2t_draw draws such a copy as one render pass per layer: the source region sampled into the destination region, nearest or (LINEAR_FILTER) bilinear. Float, unorm and sRGB 2D / 2D-array colour textures only; a destination without render-target usage gets it through tex_upgrade_usage. Anything else keeps the red line. TOTK_T2T_DRAW=0 turns it off for an A/B test. Adapted from nxnative's copy_t2t_draw (MIT, commit e734ced7), listed in THIRD_PARTY_NOTICES.md.
ly05010419
added a commit
that referenced
this pull request
Nov 14, 2026
Owner
|
已合并并推送。新增验证提交:0d3ead2e。 测试提取并执行实际 copy_t2t_draw 实现,使用 Metal 4 提交和独立 CPU 像素期望:16 个 GPU 用例、15,360 个通道比对全部通过,覆盖最近点/双线性、非零区域、未覆盖区域保留、mip、数组多层、RGBA/BGRA/sRGB/半精度目标及部分拒绝路径。集成后的 Mac/iOS 图形源编译通过。 本轮未重做 OOT 菜单或共享游戏的实际游玩;没有把合成 GPU 回归等同于游戏验收。谢谢贡献。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Ocarina of Time the pause menus (for example the ocarina song menu) stood on a black background instead of the blurred scene, and the dark slots of songs not yet learned were invisible against it.
copy_t2tdropped every texture copy whose source and destination regions differ in size or format (RED_ONCE(33, …), then return). The menus build their backdrop from a copy of the 2560x1440 scene into a 1280x720 texture, so that texture was never written.Fix
copy_t2t_draw(ingames/totk/third_party/d2r_gfx/gfx/nvn/nvn_mtl.m) draws such a copy as one render pass per layer: the source region sampled into the destination region, nearest or (withNVN_COPY_FLAGS_LINEAR_FILTER_BIT) bilinear.tex_upgrade_usage.bloomq_capture(its own argument table, a barrier at the start,m4_end), and the parameters live in the frame arena.TOTK_T2T_DRAW=0turns it off for an A/B test.Adapted from nxnative's
copy_t2t_draw(MIT, commite734ced7). The colour path only, rewritten for this backend; the row is inTHIRD_PARTY_NOTICES.md.Testing
build_app.pyand updated withupdate_runtime.py. Opened the ocarina song menu in Kokiri Forest: the blurred scene now shows behind the menu, and the slots of unlearned songs are visible. The game log hasscaled / format-changing texture copy: first case 2560x1440 format 92 -> 1280x720 format 92.python -m unittest discover -s tests: 1,376 pass. 5 modules (test_botw_import,test_dlc_import,test_game_containers,test_updates,test_xc3_shaders) do not load on this Mac because its Python lacks thecryptographypackage; that is unrelated to this change, which touches no Python.