mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-21 00:59:59 -04:00
Triforce v0.6.0 "Sage Of Power"
Faster frames (the replay's memory work, held submits, helper threads, collection and capture cuts), the game letting old areas go (QueryMemoryInfo), the 0.5.2 stutter fixed, AMD RX 5000/6000 and integrated-GPU fixes, the GPU device chosen by name, the in-game menus and launcher reworked, controller, Linux and benchmark fixes.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
|
||||
#include "fsr3_math.h"
|
||||
#include "vk_internal.h"
|
||||
@@ -24,6 +25,9 @@
|
||||
namespace mkwvk {
|
||||
|
||||
struct Texture;
|
||||
namespace fsr3_inputs {
|
||||
struct Frame; // (vk_fsr3_inputs.h)
|
||||
}
|
||||
|
||||
namespace fsr3 {
|
||||
|
||||
@@ -37,12 +41,18 @@ struct Inputs {
|
||||
uint32_t render_width = 0, render_height = 0;
|
||||
uint32_t upscale_width = 0, upscale_height = 0;
|
||||
float jitter[2]{};
|
||||
uint32_t jitter_phases = 8; ///< the length of the jitter's sequence (dlss_jitter_phases: the host's own)
|
||||
uint32_t jitter_phases = 8; ///< the length of the jitter's sequence (fsr3_math.h jitter_phases: the host's own)
|
||||
/// The game's dynamic resolution is on (the Render resolution row's Auto): the render size changes from frame to frame,
|
||||
/// and the internal images are made for the output's size at once (fsr3_math.h plan_images)
|
||||
bool dynamic = false;
|
||||
/// Turns a motion vector into render pixels (1 for vectors already in them)
|
||||
float motion_scale[2]{1.0f, 1.0f};
|
||||
fsr3_math::Camera camera; ///< device_to_view_depth (fsr3_math.h)
|
||||
float frame_time_ms = 16.667f;
|
||||
bool reset = false;
|
||||
/// ((Triforce, S1) FSR's own sharpening, 0 (off) to 1 (the most): accumulate_sharpen and RCAS, as the SDK runs them with
|
||||
/// its sharpening on (sharpen_rules.h fsr3_sharpness: the Sharpness row, more below 3/4 of the output's width)
|
||||
float sharpness = 0.0f;
|
||||
};
|
||||
|
||||
/// Whether this device can run the passes: push descriptors enough for the widest pass, storage images in every format the
|
||||
@@ -51,16 +61,44 @@ struct Inputs {
|
||||
/// once; the reason it cannot is logged once
|
||||
[[nodiscard]] bool supported();
|
||||
|
||||
/// Records one evaluation into output_image(), making the pipelines and the internal images at these sizes first (again
|
||||
/// when they change). False when something could not be made or the inputs are not usable
|
||||
/// Records one evaluation into output_image(), making the pipelines and the internal images first (again for another
|
||||
/// output, or a frame larger than they are: a smaller frame of the game's dynamic resolution keeps them and the history).
|
||||
/// False when something could not be made or the inputs are not usable
|
||||
[[nodiscard]] bool upscale(VkCommandBuffer cmd, const Inputs& in);
|
||||
|
||||
/// The image an evaluation resolves into: RGBA16F at the upscale size, or null before the first
|
||||
[[nodiscard]] VkImage output_image();
|
||||
[[nodiscard]] VkImageView output_view();
|
||||
|
||||
/// The internal images let go (a few frames on, when no work in flight can read them), the pipelines kept: the next
|
||||
/// upscale makes them again with a new history. Not while a frame may still use output_view (fsr3_idle decides)
|
||||
void release();
|
||||
/// Images held, or let go and not yet destroyed
|
||||
[[nodiscard]] bool holding();
|
||||
/// Images let go earlier destroyed, once the frames that may read them are done
|
||||
void free_unused();
|
||||
/// texture_frame_no of the last evaluation, 0: none
|
||||
[[nodiscard]] uint64_t last_used();
|
||||
|
||||
/// ((Triforce, S1) FSR's own sharpening can run (its two passes were made, or have not been tried yet): the Sharpness row
|
||||
/// then sharpens FSR 3.1's 3D before the HUD, and nothing at the window
|
||||
[[nodiscard]] bool sharpens();
|
||||
/// ((Triforce, S1) FSR 3.1's RCAS pass alone, over another upscaler's picture before the HUD (NVIDIA DLSS's, which has no
|
||||
/// sharpening of its own: vk_temporal.cpp): in (sampled) into out (storage, any float format), w x h, at sharpness 0..1
|
||||
/// (sharpen_rules.h rcas_config). Exposure 1. False when it cannot run here (made once; the reason logged): the caller
|
||||
/// keeps its picture as it is
|
||||
[[nodiscard]] bool rcas(VkCommandBuffer cmd, VkImageView in, VkImageView out, uint32_t w, uint32_t h, float sharpness);
|
||||
/// rcas can run here: this device runs FSR 3.1's passes, and it was made or not tried yet
|
||||
[[nodiscard]] bool rcas_ok();
|
||||
|
||||
} // namespace fsr3
|
||||
|
||||
/// Once a frame (vk_temporal.cpp temporal_idle, at the present): FSR 3.1's internal images let go once the Upscaler row has
|
||||
/// left FSR 3.1 and they were not used for 120 frames (2 s: a row stepped through keeps them), and its inputs' images once
|
||||
/// nothing asks for them (vk_fsr3_inputs.h release_idle), as vk_temporal.cpp lets the chain's go. Nothing to do costs a
|
||||
/// few loads. true: FSR 3.1's picture was let go now (the chain forgets the one it kept of it from before the bloom)
|
||||
bool fsr3_idle();
|
||||
|
||||
/// FSR 3.1 upscales: the Insert menu's Upscaler row says FSR 3.1 or its Native AA (upscaler_rows.h FSR3, FSR3_AA) and
|
||||
/// neither RX_VK_DLSS nor RX_VK_FSR4 is set over it (vk_temporal.h temporal_env_chosen), or RX_VK_FSR=1 or 2; and it
|
||||
/// runs here
|
||||
@@ -72,13 +110,18 @@ bool fsr3_native();
|
||||
/// A gameplay upscale's dispatch, as vk_temporal.h's temporal_upscale takes it (vk_draw.cpp's fsr3_stand_in finds them the same
|
||||
/// way). With FSR 3.1's frame interpolation on, the dispatch's input and this frame's camera become its inputs here
|
||||
/// (vk_fsr3_inputs.h) whichever upscaler runs. true: FSR 3.1 wrote the output (the dispatch is left out); false: the network
|
||||
/// (or DLSS) runs, the reason logged when it changes
|
||||
/// (or DLSS) runs, the reason logged when it changes. (Triforce) In an RGBA16F run (RenoDX's HDR Native) as well: the
|
||||
/// network's RGBA16F input, the square root of HDR colour, is FSR's colour unclamped, and its picture goes into the RGBA16F
|
||||
/// output squared (dlss_out.comp's -DHDR layout)
|
||||
/// FSR 3.1 before the game's bloom and tone mapping (vk_temporal.h temporal_pre_tonemap, which calls this at the bloom's
|
||||
/// first pass): its inputs from the scene's colour target (linear HDR light) and its passes, at ow x oh. *picture: its
|
||||
/// picture, linear HDR at that size, which the chain writes back into the scene and the tone mapping draws from. Not
|
||||
/// with FSR's frame interpolation on (fsr3_pre_wanted), whose inputs are made at the upscale's dispatch
|
||||
/// with FSR's frame interpolation on (fsr3_pre_wanted), whose inputs are made at the upscale's dispatch.
|
||||
/// ((Triforce, FSR3-03) own_motion: called once its inputs are made, before its passes, with the chain's lock held: the
|
||||
/// chain draws what moves by itself into their motion, from this frame's draws it took; it returns the draws drawn again)
|
||||
bool fsr3_pre_wanted();
|
||||
bool fsr3_pre(VkCommandBuffer cmd, Texture* scene, VkImageView scene_view, uint32_t ow, uint32_t oh, VkImageView* picture);
|
||||
bool fsr3_pre(VkCommandBuffer cmd, Texture* scene, VkImageView scene_view, uint32_t ow, uint32_t oh, VkImageView* picture,
|
||||
const std::function<int(const fsr3_inputs::Frame&)>& own_motion);
|
||||
|
||||
bool fsr3_upscale(VkCommandBuffer cmd, uint64_t key, bool known, Texture* in, VkImageView in_view, Texture* out,
|
||||
VkImageView out_view, uint32_t out_level);
|
||||
|
||||
Reference in New Issue
Block a user