mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 09:39:58 -04:00
Frame generation now gets the picture without the HUD each frame: the upscaler's output before the HUD is drawn over it, encoded to sRGB as the game's last pass encodes its picture and put through the same colour, scaling and borders as the presented frame, so it tells the HUD apart and leaves it unwarped in the generated frames (NX2NAVI_FG_HUDLESS_SHOW=1 shows that picture, a test). The performance overlay gains an FG row and the fps line the display's rate, generated frames included. The device enables VK_KHR_get_memory_requirements2 whenever AMD's frame generation is on, which crashed at start with DLSS upscaling. DLSS Frame Generation through NVIDIA Streamline (vk_dlssg.c, and nx2navi_dlssg.dll from runtime/dlssg, built with MSVC by tools/build_dlssg.py against the SDK kept outside the repository) creates the instance and device through Streamline's proxies and calls its swapchain hooks; Streamline still fails in its plugin start-up here, so the menu lists it only while it is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.4 KiB
C
21 lines
1.4 KiB
C
// DLSS Frame Generation through NVIDIA Streamline (vk_dlssg.c, nx2navi_dlssg.dll).
|
|
#pragma once
|
|
#include <stdint.h>
|
|
#include <vulkan/vulkan.h>
|
|
|
|
int vk_dlssg_wanted(void); // NX2NAVI_FRAMEGEN = dlss with DLSS or FSR 3.1 upscaling on (read once)
|
|
int vk_dlssg_early(void); // before the instance exists: loads the DLL and Streamline; 1 when its proxies are there
|
|
// vk_device.c: the instance and device through Streamline's proxies when vk_dlssg_early succeeded, else the loader's
|
|
VkResult vk_dlssg_create_instance(const VkInstanceCreateInfo *ci, VkInstance *out);
|
|
VkResult vk_dlssg_create_device(VkInstance inst, VkPhysicalDevice pd, const VkDeviceCreateInfo *ci, VkDevice *out);
|
|
void vk_dlssg_device_ready(VkDevice dev); // after the device: checks DLSS-G and takes the swapchain hooks
|
|
int vk_dlssg_active(void);
|
|
// gfx_present.c's swapchain calls while active
|
|
VkResult vk_dlssg_create_swapchain(VkDevice d, const VkSwapchainCreateInfoKHR *ci, VkSwapchainKHR *sc);
|
|
void vk_dlssg_destroy_swapchain(VkDevice d, VkSwapchainKHR sc);
|
|
VkResult vk_dlssg_get_images(VkDevice d, VkSwapchainKHR sc, uint32_t *n, VkImage *img);
|
|
VkResult vk_dlssg_acquire(VkDevice d, VkSwapchainKHR sc, uint64_t timeout, VkSemaphore sem, uint32_t *idx);
|
|
VkResult vk_dlssg_present(VkQueue q, const VkPresentInfoKHR *pi);
|
|
void vk_dlssg_frame(VkCommandBuffer cb, VkExtent2D ext); // each present, before its command buffer is submitted
|
|
void vk_dlssg_release(void);
|