Repository navigation
vulkan: preserve the game aspect when presenting - #205
monsterlag wants to merge 7 commits into
Conversation
|
Tested the same approach on another setup, and found one case where it goes black. Setup: RTX 4070, 5120x1440 (32:9), Windows 11, fullscreen, the I patched only
Switching Upscaling to Off live in the Insert menu brought the picture back right away, so the black screen comes from upscaling straight to the rectangle's size. I didn't find the root cause. Your 5090 test had frame generation at 2x, and mine had it off, so that may be the difference. The workaround I'm running upscales at the window's size (as before this PR) and then blits that into the rectangle: if (const VkImage scaled = src && view ? framegen_scale(f.cmd, view, src, sw, sh, crop, dev.swap_extent.width, dev.swap_extent.height) : VK_NULL_HANDLE) {
blit_crop_to_rect(f.cmd, scaled, dev.swap_extent.width, dev.swap_extent.height, nullptr, dst,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, rect);
}It does extra upscaling work on wide screens, so it's a workaround, not a fix. Happy to test a build or send logs. Also relevant to #119 (16:10 laptop, stretched in fullscreen). |
|
Thanks, this is a good fix for #119/#297. Before merging: a 32:9 user reported a black picture with upscaling on (see #297). Could you check that case (3840x1080 or 5120x1440 fullscreen with Upscaling Catmull-Rom/Lanczos) and the frame generation path at those sizes? Also, it bumps the renderer API to v2, which #324 also did; that one is closing, so v2 is yours. |
# Conflicts: # .github/workflows/source-regressions.yml # gpu/vk/vk_api.h # host/rx_backend.c
Fixes #119. Refs #297.
Fit the game's source crop into a centered presentation rectangle and clear uncovered areas to black, including frame-generated presents. Preserve the existing camera-aspect override when Ultrawide or HOS_ASPECT is enabled.
The branch includes upstream main 4c236f3 and retains its controller callbacks. The aspect callback is appended after them, requiring renderer API v4. The executable and DLL must be deployed together. The actual DLL rejects a null/API3 host before loading Vulkan.
Current validation at 552e0f1:
This remains draft pending active FG-off filter validation. The machine's panel is 5120x2160, so physical 32:9 fullscreen and the reported RTX 4070 FG-off black-screen case remain unverified. These are display-compatibility checks, not a native-FPS benchmark. No speculative black-screen workaround is included. AMD/Intel, wider progression and arbitrary drag/minimize transitions remain untested.