Not sure if we can find a better way, I suppose
we could clamp vertex coordinates that are in this range instead, if it
turns out that this somehow breaks something.
This matches some earlier test results by Unknown where we could see
that only every second value was used, and is the only explanation I can
come up with for the Afterburner problem, having now traced all the
depth math properly.
Fixes#21785 - and hopefully doesn't break anything else.
There's no guarantee VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT will enter Fullscreen exclusive (FSE). Under the right conditions, the driver and/or DWM can grant FSE. Adding "allow" to the FSE setting should make this a bit clearer.
Previously, "Smart 2D texture filtering" was limited to through-mode
draws, but many games use fully transformed draws to do 2D elements.
An example of this is Outrun in the menus, and it's always been plagued by
horrible filtering artifacts.
With the improved Smart 2D texture filtering, the artifacts are gone!
Of course, instead of glitchy bilinear you instead get point sampled
texturing so it looks more pixellated, but no more ugly borders between letters
in the game.
Fixes#21776
Since only two games are known to need the cull-after-clip behavior
(previously known as inversion), we flag those and avoid unnecessary
soft clipping.
I had hoped to find a dynamic check that would work, but haven't managed
to figure out a good one yet.
This will improve performance a little bit in some other games since we
can avoid clipping in software at all in many cases.
Exclusive full screens is fundamentally a single monitor concept. It doesn't make sense to have "use all screens" and "Exclusive fullscreen".
The order of the options have been swapped so "Fullscreen" and "Exclusive Fullscreen" are right next to each other.
Previously the exclusive fullscreen option in the settings screen was
guarded by a compile-time #ifdef VK_EXT_full_screen_exclusive, which is
always true on Windows. It now uses a runtime fullScreenExclusiveSupported
cap derived from whether the extension is actually enabled by the driver.
Switching between borderless and exclusive fullscreen currently requires a
restart. This is because once DWM has claimed the window (any frames
presented), ALLOWED_EXT cannot re-engage exclusive mode on an existing
swapchain. A new process gets a fresh HWND that DWM has not claimed yet,
so ALLOWED_EXT works correctly at startup.
The proper fix is to use VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT
with vkAcquireFullScreenExclusiveModeEXT/vkReleaseFullScreenExclusiveModeEXT
to explicitly negotiate exclusive mode with DWM mid-session without needing
a restart. To be done in a follow-up.
Vulkan swapchain now explicitly sets VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT by default, enabling proper borderless fullscreen behavior with benefits including better Alt+Tab, VRR/G-Sync/FreeSync, and Auto HDR support.