Files
Triforce-Source/gpu/vk/vk_dlssg.h
ruckus7382sfgsgdf 93eeb714c2 Triforce v0.4.0
What was merged from NX2navi (DLSS frame generation, AMD FSR 4 in Setup builds, texture detail by video memory, sprint, volume, frame caps, safer saves, the above-60 fixes), the ultrawide HUD at the screen edges, camera speed, movies without the AV1 Video Extension, the 5120x2880 + RenoDX HDR start fix, the renderer work of 11-14 and the first float changes of the lift.
2026-11-15 06:39:00 -06:00

58 lines
2.8 KiB
C++

// (Triforce) NVIDIA DLSS Frame Generation through NVIDIA's Streamline (vk_dlssg.cpp), after NX2navi's runtime/vk_dlssg.c
// and runtime/dlssg/nx2_sl.cpp. In a build without HOOKSHOT_STREAMLINE_SDK every function here answers "off".
#pragma once
#include <cstdint>
#include <vector>
#include "vk_internal.h"
namespace mkwvk::dlssg {
/// The frames shown for each of the game's as asked at the start, 2 to 4; 0: off. The Insert menu's DLSS frame
/// generation row as the options file has it (dlss_frame_generation=), RX_VK_DLSSG=<0|2|3|4> over it. Read once: the
/// Vulkan instance and device are made through Streamline, so a change takes a restart.
int asked();
/// Before the Vulkan instance is made: Streamline loaded and started from the game's folder. Its vkGetInstanceProcAddr,
/// through which the instance, the device and every function of both are then fetched; nullptr when it is not asked
/// for, not built in, its files are missing or it did not start (the loader's own is used, as without it).
PFN_vkGetInstanceProcAddr early();
/// The extensions Vulkan 1.3 made core, asked for by name as well where the device lists them: Streamline's plugins
/// look their functions up under the extensions' names, which resolve only with the extension enabled.
void device_extensions(std::vector<const char*>& want, const std::vector<VkExtensionProperties>& all);
/// The device was not made through Streamline (another vendor's card, or Streamline refused it): off for this run.
void gave_up(const char* why);
/// The device is made (through Streamline): whether frame generation runs on this card and driver, said in the log.
void device_ready(VkPhysicalDevice physical, VkDevice device);
/// Frame generation runs in this session (the swapchain's presents go through Streamline). The game's frames then
/// reach the display from the replay's thread alone, and Reflex is Streamline's.
bool active();
/// A swapchain was made: Reflex's mode is the swapchain's and is set again.
void swapchain_created();
/// Where a frame of the game starts (after the present of the one before): Reflex's sleep, then the frame's first
/// latency markers. Frames are numbered from here.
void frame_start();
/// The frame's submissions went out.
void submit_end();
/// Before the present's command buffer ends: this frame's camera, depth and motion for Streamline, and generation on
/// or off (off in the menu, and while a frame has no scene). cmd: the present's command buffer.
void frame(VkCommandBuffer cmd, uint32_t out_width, uint32_t out_height);
/// Around vkQueuePresentKHR.
void present_marker(bool after);
/// The frames the display gets for each of the game's right now: 1 while generation is off or paused.
int multiplier();
/// One line for the menu about what runs, or why it does not.
const char* status();
void shutdown();
} // namespace mkwvk::dlssg