Triforce v0.8.0

Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-25 10:21:32 -06:00
parent 861702476a
commit 4fa4f9188b
881 changed files with 179428 additions and 15581 deletions

View File

@@ -127,7 +127,7 @@ void TranslatorVisitor::ISBERD(u64 insn) {
// nx2 pseudo instruction for the ISBERD/ISBEWR of Switch 2 task and mesh programs (see
// frontend/ampere/lower_to_maxwell.h). Addresses are linear bytes in the stage buffer: reads come
// from the input attribute region, writes go to the output attribute or map region.
// from the input attribute region (or with .O the output one, read back), writes go to the output attribute or map region.
void TranslatorVisitor::ISBE_nx2(u64 insn) {
union {
u64 raw;
@@ -136,6 +136,7 @@ void TranslatorVisitor::ISBE_nx2(u64 insn) {
BitField<20, 24, u64> offset;
BitField<44, 1, u64> is_32;
BitField<45, 1, u64> attribute;
BitField<47, 1, u64> output;
BitField<48, 1, u64> write;
} const isbe{insn};
@@ -145,7 +146,8 @@ void TranslatorVisitor::ISBE_nx2(u64 insn) {
}
const IR::U32 address{ir.IAdd(X(isbe.address_reg), ir.Imm32(static_cast<u32>(isbe.offset)))};
if (isbe.write == 0) {
X(isbe.reg, ir.IsbeRead(address));
// (hookshot) .O: the program reads back its own output region (a task's payload, a mesh's attributes)
X(isbe.reg, isbe.output != 0 ? ir.IsbeReadOutput(address) : ir.IsbeRead(address));
return;
}
const IR::U32 value{X(isbe.reg)};

View File

@@ -4,6 +4,7 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <atomic>
#include <algorithm>
#include <array>
#include <bitset>
@@ -29,6 +30,7 @@ extern thread_local u32 g_nvn2_compute_ssbo_base;
extern thread_local u32 g_nvn2_compute_ssbo_count;
extern thread_local u32 g_nvn2_compute_layout_end;
extern thread_local bool g_nvn2_miss_log_this;
extern std::atomic<u32> g_table_check_unchecked;
}
namespace Shader::Maxwell {
@@ -196,8 +198,17 @@ void AddNVNStorageBuffers(IR::Program& program) {
static const bool miss_log{std::getenv("RX_VK_MISS_LOG") != nullptr && std::atoi(std::getenv("RX_VK_MISS_LOG")) != 0};
// (compute only: the driver crashed compiling a mesh program with it; and only the program vk_shader.cpp names when
// RX_VK_MISS_LOG_PROG is set: Optimization::g_nvn2_miss_log_this)
if (miss_log && (program.stage == Stage::Compute || program.stage == Stage::Mesh || program.stage == Stage::Task) &&
Optimization::g_nvn2_miss_log_this && descs.size() < Info::MAX_SSBOS) {
// (Triforce, RX_VK_GP_TABLE=2: the vertex, fragment, compute, task and mesh stages' loads checked against the page table record
// there too. The mesh fallback's task and mesh stages get the buffer as with the miss log, and leave it unused)
static const bool table_check{std::getenv("RX_VK_GP_TABLE") != nullptr && std::atoi(std::getenv("RX_VK_GP_TABLE")) == 2};
const bool graphics{program.stage == Stage::VertexB || program.stage == Stage::Fragment || program.stage == Stage::Compute ||
program.stage == Stage::Task || program.stage == Stage::Mesh};
if (table_check && graphics && program.info.uses_global_memory && descs.size() >= Info::MAX_SSBOS)
Optimization::g_table_check_unchecked.fetch_add(1, std::memory_order_relaxed); // (no room for the check's buffer)
if (((miss_log && (program.stage == Stage::Compute || program.stage == Stage::Mesh || program.stage == Stage::Task) &&
Optimization::g_nvn2_miss_log_this) ||
(table_check && graphics && program.info.uses_global_memory)) &&
descs.size() < Info::MAX_SSBOS) {
descs.push_back({
.cbuf_index = driver_cbuf,
.cbuf_offset = 0xff0U,