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

@@ -67,16 +67,57 @@ class BcRawTargetTests(unittest.TestCase):
self.assertRegex(self.draw, r"default_list && cp->key == 0x53509044401d78d2ull && !at\.n")
def test_3d_bc_images_take_no_attachment_usage_on_nvidia_before_turing(self):
# (Pascal loses the device on a raw view of a 3D BC image, upstream #2327: no usage there, so no view, and
# the noise pass is left out by the rule above)
# (Pascal loses the device on a raw view of a 3D BC image: no usage there, so no raw view; its slices are drawn into
# through block attachments of their own instead, and the noise pass runs: bc3d_way)
raw = self.tex.index("Raw storage views address one compressed block per texel")
branch = self.tex[raw:self.tex.index("CUBE_COMPATIBLE_BIT", raw)]
self.assertIn("dev.props.vendorID == 0x10de && dev.props.deviceID < 0x1e00", branch)
guard = branch.index("if (x.type == VK_IMAGE_TYPE_3D && !bc3d_target)")
guard = branch.index("if (x.type == VK_IMAGE_TYPE_3D && bc3d_way() != 1) {")
usage = branch.index("x.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;")
self.assertLess(guard, usage)
self.assertIn("} else if (format_props(raw).optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)", branch)
self.assertIn('getenv("RX_VK_BC3D_TARGET")', branch)
way = block(self.tex, "int bc3d_way() {")
self.assertIn("dev.props.vendorID == 0x10de && dev.props.deviceID < 0x1e00", way)
self.assertIn('getenv("RX_VK_BC3D_TARGET")', way)
self.assertIn("old_nvidia ? 2 : 1", way)
def test_3d_bc_slices_are_drawn_through_block_attachments_where_raw_views_cannot_be(self):
attach = block(self.tex, "TextureAttachment texture_attachment(")
# (every other image, and every card whose raw views work: texture_view's, as before)
first = attach[:attach.index("// (the view's format")]
self.assertIn("tex->type != VK_IMAGE_TYPE_3D || !is_bc(tex->format) || tex->bc || bc3d_way() != 2", first)
self.assertIn("texture_view(tex, t, v, VK_IMAGE_VIEW_TYPE_2D, ViewUse::Attachment, &out.format)", first)
# (one texel a block: the level's extent in blocks, every slice, uncompressed, copied to and from)
self.assertIn("(std::max(1u, tex->width >> level) + 3) / 4, (std::max(1u, tex->height >> level) + 3) / 4, depth", attach)
self.assertIn("bytes != tex->bpb", attach)
self.assertIn("VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT", attach)
self.assertIn("InitRedirect redirect;", attach)
copy = block(self.tex, "void copy_block_attachment(")
self.assertIn("to_attachment ? VkExtent3D{width, height, 1} : VkExtent3D{(width + 3) / 4, (height + 3) / 4, 1}", copy)
# (the pass: loaded behind a full barrier before it begins, stored back behind one after it ends)
targets = block(self.draw, "Targets targets(NvnState& s)")
self.assertIn("const TextureAttachment ta = texture_attachment(tex, t, v);", targets)
begin = block(self.draw, "void begin_pass(VkCommandBuffer cmd, const Targets& at) {")
load = begin.index("copy_block_attachment(cmd, *at.color[i], at.block_image[i], at.color_level[i], at.color_layer[i], true);")
self.assertLess(begin.index('full_barrier(cmd, "barrier (before BC slice loads)");'), load)
self.assertLess(load, begin.index('full_barrier(cmd, "barrier (after BC slice loads)");'))
self.assertLess(load, begin.index("vkCmdBeginRendering(cmd, &ri);"))
end = block(self.draw, "void end_pass(VkCommandBuffer cmd) {")
store = end.index("copy_block_attachment(cmd, *ps.tex[i], ps.block_image[i], ps.level[i], ps.layer[i], false);")
self.assertLess(end.index("vkCmdEndRendering(cmd);"), store)
self.assertLess(end.index('full_barrier(cmd, "barrier (before BC slice stores)");'), store)
self.assertLess(store, end.index('full_barrier(cmd, "barrier (after BC slice stores)");'))
# (and they go with their texture)
gone = block(self.tex, "void destroy_later(Texture& tex) {")
self.assertIn("for (const auto& a : tex.block_attachments) dead.push_back(Dead{tex.last_value, a.image, a.allocation, {}, {}});", gone)
def test_a_bc_image_is_never_cleared_with_vkCmdClearColorImage(self):
clear = block(self.xfer, "void clear_tex(")
self.assertIn("if (whole && !volume && !raw) {", clear)
self.assertLess(clear.index("const bool raw ="), clear.index("vkCmdClearColorImage("))
self.assertIn("const uint32_t slices = volume ? s.d : s.layers;", clear)
self.assertIn("const TextureAttachment attachment = texture_attachment(s.tex, p.tex, &lv);", clear)
self.assertIn("copy_block_attachment(cmd, *s.tex, attachment.blocks, s.level, slice, true);", clear)
self.assertIn("copy_block_attachment(cmd, *s.tex, attachment.blocks, s.level, slice, false);", clear)
if __name__ == "__main__":