One NVN driver layout for every game; shader sources read from the game files
The NVN driver's constant segments have the same layout in every game, so the nvn_* profile keys are gone. Combined textures are at c2 0x20 + 8 r (a slot past 31 shares the image table; Hades II binds 34), images at 0x120, separate textures at 0x168 (now always the host's slots 128 + n, as Monster Hunter Rise had them), samplers at 0x568, and the storage buffer tables at c0 0x110 / 0x310 / 0x510. dmsh_build.py decodes with that layout, the replay fills both texture tables, and the translator numbers slots the same way (rebuilt; its SPIR-V and reflection are byte-identical on 1,491 sample shaders, lock updated). The shader_* switches and graphics are gone too; the build reads them from the files (profile_guess.py shader_sources): - Vulkan when main imports Vulkan and not NVN; its capture when the RomFS has no SPIR-V. - A GLSLC capture when main holds GLSL sources and imports glslcCompile. - An Oodle decode for Unreal paks, and the tool-mode decoder for Trinity packs. - GLSLC outputs from every main. - A cover pairing for each single-stage vertex shader (GLSLC, Unreal). build_ipa.sh takes GFXAPI from the NSP script. Also removed: the last D2R pieces (the embedded-shader path in dmsh_build.py, dmsh_facts.py --freeze / --check, maxwell_refs.py, ref/hle_hid_d2r.c). Chain: every profile's dmsh_chain.h is regenerated. The c1_full lists are carried over: the change touches no c1 read, and the rebuilt Octopath Traveler 0, Hades II, Unicorn Overlord and Rhythm Heaven Groove gave the same lists, identical tables and the same reflection apart from separate texture slots + 128. Still to do: - Run the chain procedure for the other NVN profiles. - Engage's and Three Houses' shader tables need a new split: Engage gains Unity's 11 GLSLC shaders in main, and Three Houses' 17 BNSH vertex shaders lose their cover pairs. - Ace Attorney's new tables are in, but its libraries are not rebuilt.
This commit is contained in:
1 parent
d34e0446aa
commit
56b806155f
91 files changed
+348
-1056
No files matched your search
@@ -1,2 +1,2 @@
|
||||
// Generated file (dm/gfx/tools/dmsh_chain.py --header, game 010099C022B96000): the B shader library translation chain version this source tree expects (default options); the host loads only <library dir>/b-<V>/
|
||||
#define DMSH_CHAIN "78abd7b76d0d"
|
||||
#define DMSH_CHAIN "59873f9b6a5a"
|
||||
@@ -23,10 +23,8 @@ package v327680
|
||||
shader_versions v327680
|
||||
|
||||
# ---- Graphics ----
|
||||
# Vulkan through the host's layer (dm/gfx/vk/hle_vk.m). Hagi generates its GX shaders as SPIR-V at run time from data/database/pip/pipelineDB.pip during "Initializing system...":
|
||||
# 3,089 modules with the 56 built into main. The NSP script captures them by booting the game on the Mac (vk_capture.tsv lists the keys); vk_shaders.py translates the capture
|
||||
graphics vulkan
|
||||
shader_vk_capture on
|
||||
# main imports Vulkan, not NVN: the host's Vulkan layer (dm/gfx/vk/hle_vk.m). Hagi generates its GX shaders as SPIR-V at run time from data/database/pip/pipelineDB.pip during "Initializing system...":
|
||||
# 3,089 modules with the 56 built into main, and the RomFS has no SPIR-V file, so the NSP script captures them by booting the game on the Mac (vk_capture.tsv lists the keys); vk_shaders.py translates the capture
|
||||
|
||||
# ---- Files ----
|
||||
# load order as on Horizon: main, subsdk*, sdk; subsdk1–4 (GLSLC, nn::pcm, NVIDIA's OpenGL and Vulkan drivers) are replaced by the host's Vulkan layer and not loaded
|
||||
@@ -43,13 +41,5 @@ mem_alias 0x10000000
|
||||
mem_stack 0x10000000
|
||||
app_pool 0xCD500000
|
||||
|
||||
# ---- NVN driver constant segments (Mario's values; the game has no NVN shaders) ----
|
||||
nvn_tex_base 0x20
|
||||
nvn_tex_slots 32
|
||||
nvn_samp_base 0x568
|
||||
nvn_img_base 0x120
|
||||
nvn_img_slots 8
|
||||
nvn_ssbo_bases vs=0x110 ps=0x510 cs=0x310
|
||||
|
||||
# ---- Shader split ----
|
||||
shader_note Super Mario Galaxy has no NVN shaders (its SPIR-V shaders go through the Vulkan layer)
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 10.
|
Reference in new issue
Block a user