Frame generation: present and acquire queues from another family where the graphics family has one queue

AMD's Windows driver gives the graphics family a single queue. vk_device.c then made no frame generation queues, and
vk_fg_create_swapchain returned without a log line: AMD FSR 3.1 frame generation set in the menu did nothing on an
RX 580. The present queue (which nothing else may submit to) and the image acquire queue now come from a family that
can present, compute families first, with their families passed to AMD's swapchain; the log names them, or says that
there are none, and the menu offers FSR 3.1 frame generation only where they exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobim6
2026-11-12 16:23:12 +01:00
parent 4027229930
commit 293731d083
5 changed files with 83 additions and 26 deletions

View File

@@ -5,7 +5,10 @@
int vk_fg_wanted(void); // NX2NAVI_FRAMEGEN = fsr3 with DLSS or FSR 3.1 upscaling on (live), where FSR 3.1 loads
uint32_t vk_fg_queue_count(void); // graphics-family queues the device creates
void vk_fg_queues(VkQueue present, VkQueue acquire); // vk_device.c, after the device exists
// vk_device.c, after the device exists: the queues AMD's swapchain presents and acquires on, and their families (the
// graphics family's own where it has three queues, else queues of another family: AMD's Windows driver gives one)
void vk_fg_queues(VkQueue present, uint32_t present_family, VkQueue acquire, uint32_t acquire_family);
int vk_fg_has_queues(void); // vk_fg_queues got a present queue: frame generation can run here
int vk_fg_active(void); // the frame generation swapchain exists
int vk_fg_generating(void); // ... and the last frame had generation on (not paused for the menu)
// gfx_present.c's swapchain calls while vk_fg_wanted: the first create makes AMD's swapchain context, later ones
@@ -34,7 +37,7 @@ int vk_fg4_failed(void); // it failed in this run: FSR 3.1's
const char *vk_fg4_name(void); // the frame generation version the loader lists first for the device ("3.1.6"), "" unknown
int vk_fg4_active(void);
int vk_fg4_generating(void);
void vk_fg4_queues(VkQueue present, VkQueue acquire);
void vk_fg4_queues(VkQueue present, uint32_t present_family, VkQueue acquire, uint32_t acquire_family);
VkResult vk_fg4_create_swapchain(const VkSwapchainCreateInfoKHR *ci, VkSwapchainKHR *sc);
void vk_fg4_destroy_swapchain(VkSwapchainKHR sc);
VkResult vk_fg4_get_images(VkSwapchainKHR sc, uint32_t *n, VkImage *img);