mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 07:59:58 -04:00
Log Reflex's frame limit as each of the first 16 swapchains hands it to Streamline again.
The review found that a play-test item expected nx2_sl.cpp nx2sl_reflex2's line after each resize, fullscreen toggle
or HDR change, but that export logs only its first 8 calls, which the device, the first swapchain, the first
hand-over and a movie use up, so a later rebuild usually logged nothing and the tester would read that as a failure.
vk_dlssg.c vk_dlssg_create_swapchain now logs, for each of the first 16 swapchains with a DLL that has nx2sl_reflex2,
the limit it sent and the one Streamline took ("dlssg: swapchain N: Reflex's mode and frame limit sent again"), on
the present thread under the present and queue locks where reflex_apply already logs a refused limit. The compile
check and -Wall on vk_dlssg.c (no new warnings) pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -283,10 +283,19 @@ static int multiplier_wanted(void) {
|
|||||||
PFN_vkGetDeviceProcAddr vk_dlssg_dpa(void) { return S.loaded > 0 && S.gdpa ? S.gdpa() : NULL; }
|
PFN_vkGetDeviceProcAddr vk_dlssg_dpa(void) { return S.loaded > 0 && S.gdpa ? S.gdpa() : NULL; }
|
||||||
|
|
||||||
// gfx_present.c create_swapchain, under the present and queue locks: the new swapchain has neither the mode nor the
|
// gfx_present.c create_swapchain, under the present and queue locks: the new swapchain has neither the mode nor the
|
||||||
// limit, so both go to Streamline again, the limit as the presenting guest thread last asked for it.
|
// limit, so both go to Streamline again, the limit as the presenting guest thread last asked for it. One line for each
|
||||||
|
// of the first 16 swapchains says the limit sent and the one Streamline took: nx2_sl.cpp nx2sl_reflex2 logs only its
|
||||||
|
// first calls, and the start (the device, the first swapchain, the first hand-over, a movie) uses them up.
|
||||||
VkResult vk_dlssg_create_swapchain(VkDevice d, const VkSwapchainCreateInfoKHR *ci, VkSwapchainKHR *sc) {
|
VkResult vk_dlssg_create_swapchain(VkDevice d, const VkSwapchainCreateInfoKHR *ci, VkSwapchainKHR *sc) {
|
||||||
VkResult r = S.create_sc(d, ci, NULL, sc);
|
VkResult r = S.create_sc(d, ci, NULL, sc);
|
||||||
if (r == VK_SUCCESS) reflex_apply(__atomic_load_n(&S.limit_want, __ATOMIC_ACQUIRE));
|
if (r == VK_SUCCESS) {
|
||||||
|
static int made;
|
||||||
|
uint32_t want = __atomic_load_n(&S.limit_want, __ATOMIC_ACQUIRE);
|
||||||
|
reflex_apply(want);
|
||||||
|
if (S.reflex2 && made++ < 16)
|
||||||
|
rt_log("dlssg: swapchain %d: Reflex's mode and frame limit sent again (%.3f ms asked, %.3f ms taken; 0 is "
|
||||||
|
"none)", made, want / 1000.0, __atomic_load_n(&S.limit_set, __ATOMIC_ACQUIRE) / 1000.0);
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
void vk_dlssg_destroy_swapchain(VkDevice d, VkSwapchainKHR sc) { S.destroy_sc(d, sc, NULL); }
|
void vk_dlssg_destroy_swapchain(VkDevice d, VkSwapchainKHR sc) { S.destroy_sc(d, sc, NULL); }
|
||||||
|
|||||||
Reference in New Issue
Block a user