mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 11:29:58 -04:00
Generate frames inside the picture only, so a window of another shape keeps its black bars clean, and use the Triforce as the icon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1040,7 +1040,7 @@ static void present_image(VkImage src, VkImageLayout layout, VkFormat fmt, int w
|
||||
last_write = 0;
|
||||
record_thumb(cb, dst, slot);
|
||||
}
|
||||
if (src) vk_fg_frame(cb, g_sc, g_sc_fmt, g_sc_ext, hudless, g_hl_view); // frame generation: this frame's preparation
|
||||
if (src) vk_fg_frame(cb, g_sc, g_sc_fmt, g_sc_ext, hudless, g_hl_view, to); // frame generation: this frame's preparation
|
||||
if (src) output_rate();
|
||||
if (src) vk_dlssg_frame(cb, g_sc_ext); // DLSS Frame Generation: constants and tags (vk_dlssg.c)
|
||||
sync_barrier(cb, dst, last, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, last_stage, last_write, VK_PIPELINE_STAGE_2_NONE, 0);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 9.5 KiB |
@@ -157,7 +157,7 @@ static bool hdr_format(VkFormat f) {
|
||||
}
|
||||
|
||||
extern "C" void vk_fg_frame(VkCommandBuffer cb, VkSwapchainKHR sc, VkFormat fmt, VkExtent2D ext, VkImage hudless,
|
||||
VkImageView hudless_view) {
|
||||
VkImageView hudless_view, const int pic[4]) {
|
||||
(void)hudless_view;
|
||||
if (!vk_fg_active()) return;
|
||||
vk_dlaa_hudless_wanted = 1; // the upscaling pass keeps a copy of the picture before the HUD (vk_dlaa.c hudless)
|
||||
@@ -205,7 +205,10 @@ extern "C" void vk_fg_frame(VkCommandBuffer cb, VkSwapchainKHR sc, VkFormat fmt,
|
||||
cfg.frameGenerationCallbackUserContext = &F.fg;
|
||||
cfg.frameGenerationEnabled = on != 0;
|
||||
cfg.allowAsyncWorkloads = false;
|
||||
cfg.generationRect = {0, 0, (int32_t)ext.width, (int32_t)ext.height};
|
||||
// the picture's rectangle: with black bars beside or below it (a window of another shape) a generation over the
|
||||
// whole swapchain warped the picture's edges into the bars
|
||||
cfg.generationRect = pic && pic[2] > 0 && pic[3] > 0 ? FfxApiRect2D{pic[0], pic[1], pic[2], pic[3]}
|
||||
: FfxApiRect2D{0, 0, (int32_t)ext.width, (int32_t)ext.height};
|
||||
if (on && hudless) {
|
||||
VkFfxImage h = {hudless, fmt, ext.width, ext.height, 1};
|
||||
cfg.HUDLessColor = image(&h);
|
||||
|
||||
@@ -18,7 +18,10 @@ VkResult vk_fg_present(const VkPresentInfoKHR *pi); // on the game's queue, it
|
||||
// preparation (the frame's depth and motion vectors, vk_dlaa_fg_inputs) into cb.
|
||||
// hudless: this frame's picture without the HUD at the swapchain's size and format, in GENERAL (VK_NULL_HANDLE: none),
|
||||
// from which generation tells the HUD apart and keeps it out of the generated frames.
|
||||
void vk_fg_frame(VkCommandBuffer cb, VkSwapchainKHR sc, VkFormat fmt, VkExtent2D ext, VkImage hudless, VkImageView hudless_view);
|
||||
// pic: the picture's rectangle in the swapchain {x, y, w, h} (black bars around it when the window has another shape);
|
||||
// frames are generated inside it only.
|
||||
void vk_fg_frame(VkCommandBuffer cb, VkSwapchainKHR sc, VkFormat fmt, VkExtent2D ext, VkImage hudless, VkImageView hudless_view,
|
||||
const int pic[4]);
|
||||
uint64_t vk_fg_presents(VkSwapchainKHR sc); // frames the swapchain presented, generated ones included (0: off)
|
||||
PFN_vkSetHdrMetadataEXT vk_fg_hdr_metadata_fn(void); // AMD's replacement for vkSetHdrMetadataEXT while active, else NULL
|
||||
void vk_fg_release(void);
|
||||
|
||||
Reference in New Issue
Block a user