Triforce v0.3.2

The above-60 fixes (the pick-up counter, water ripples, sound, moving platforms, the time of day, cutscene cues) and the
RDNA 1 subgroup fix, ported from NotRexed/Hookshot: Jordan Ella, hckrman101, klimovich008, Bruno Baccari.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
ruckus7382sfgsgdf
2026-11-12 01:29:02 -06:00
parent 362d576c7d
commit afbb0d140a
12 changed files with 1157 additions and 19 deletions

View File

@@ -566,11 +566,9 @@ Shader::Profile make_profile() {
p.support_scaled_attributes = false; // (*_UI2F / *_I2F read as integers, converted in the shader: R32 has no scaled format)
p.support_multi_viewport = true;
p.support_sampled_image_array_nonuniform_indexing = true;
// (hookshot) a graphics stage the GPU cannot pin to 32 lanes runs at its default: 64 on AMD, where only compute is pinned
// (vk_main.cpp). The translator then keeps each 32-lane guest warp to its half of the host's, as Eden does on AMD; the
// long path is right at 32 lanes too. The ballots and shuffles of the game's fragment shaders ran across both halves
p.warp_size_potentially_larger_than_guest =
dev.subgroup_size > 32 && (dev.sg32_stages & VK_SHADER_STAGE_ALL_GRAPHICS) != VK_SHADER_STAGE_ALL_GRAPHICS;
// Unpinned SPIR-V 1.6 stages can use any supported subgroup size, even when the default is 32.
// The stage-specific profiles below keep the short path only where pin_subgroup actually pins 32 lanes.
p.warp_size_potentially_larger_than_guest = dev.subgroup_max > 32;
// (RX_VK_WARP64=0 or 1, a test: the graphics stages' long warp path off or on, whatever the GPU; in the cache's stamp)
if (const char* e = getenv("RX_VK_WARP64")) p.warp_size_potentially_larger_than_guest = e[0] == '1';
p.lower_left_origin_mode = false;
@@ -1225,9 +1223,11 @@ uint64_t disk_stamp() {
const uint32_t mesh = (dev.mesh_shader ? 1u : 0u) | (dev.mesh_fallback ? 2u : 0u) | (dev.task_mesh_fallback ? 4u : 0u);
add(&mesh, sizeof mesh);
// (and what of the GPU the translator is told (make_profile): its warps' lanes and the driver's shuffle workaround, and
// which stages it pins to 32 lanes, which keep the short path: profile_graphics)
// which stages it pins to 32 lanes, which keep the short path: profile_graphics. An explicit warp override bypasses
// the pinned graphics profile even if the base profile already has the requested width)
const uint32_t lanes[] = {profile().warp_size_potentially_larger_than_guest ? 1u : 0u, profile().max_subgroup_size,
profile().has_broken_spirv_fragment_shuffle ? 1u : 0u, (uint32_t)dev.sg32_stages};
profile().has_broken_spirv_fragment_shuffle ? 1u : 0u, (uint32_t)dev.sg32_stages,
getenv("RX_VK_WARP64") ? 1u : 0u};
add(lanes, sizeof lanes);
// (the records keep Shader::Info as it lies in memory: a cache written by another C++ library (the MSVC build's, then the
// llvm-mingw one's libc++) has other layouts, and reading it crashed at start. The library and the sizes, so it starts again)