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.
Reported by Joseph on Discord.
Sometimes, things could align perfectly so allocations happend exactly
at the end of a pushbuffer. At the same time, we allow our vertex decoder to write an extra few
bytes if it needs to for speed. Unfortunately I missed this interaction,
resulting in some uncommon crashes that were especially common with
heavy-geometry things like modified GTA LCS with PS2 assets, for
example.
The problem was reported with Vulkan, but our OpenGL backend had the
same issue too.
Integrates the GLProfiler into GLQueueRunner to provide GPU timestamp
profiling for OpenGL render passes, similar to the Vulkan backend.
Profiled operations:
- RenderPass (with tag name for identification)
- Copy operations
- Blit operations
- Readback operations
- ReadbackImage operations
The profiler is initialized in CreateDeviceObjects() and shutdown in
DestroyDeviceObjects(). Timing results are logged each frame when the
GPU profile debug overlay is enabled.
Signed-off-by: Chris Healy <cphealy@gmail.com>
Adds a new GLProfiler class for GPU-side timestamp profiling, similar to
VulkanProfiler. Uses GL_EXT_disjoint_timer_query (GLES) or GL_ARB_timer_query
(desktop GL).
Features:
- Scoped Begin()/End() profiling with printf-style naming
- Automatic GPU disjoint detection (frequency changes invalidate results)
- Millisecond timing output via INFO_LOG
- Pre-allocated query pool (1024 queries max per frame)
- Nested scope support with indented output
Signed-off-by: Chris Healy <cphealy@gmail.com>
Add detection for GL_EXT_disjoint_timer_query (OpenGL ES) and
GL_ARB_timer_query (desktop GL) extensions. These extensions provide
GPU timestamp queries for profiling render pass durations.
Also adds function pointer declarations for glQueryCounter,
glGetQueryObjecti64v, and glGetQueryObjectui64v.
Signed-off-by: Chris Healy <cphealy@gmail.com>
The original code checked for "Mali" in GL_RENDERER and disabled GLES3
for all Mali GPUs, which was a workaround for bugs in ARM's proprietary
Mali driver. However, Mesa/Panfrost (open-source Mali driver) does not
have these bugs and should be allowed to use GLES3.
This patch:
- Adds GPU_VENDOR_MESA for identifying Mesa drivers via GL_VENDOR
- Changes the GLES3 ban to only apply when GL_VENDOR="ARM" (proprietary)
- Allows Mesa/Panfrost Mali GPUs to use GLES3 features
Expected behavior:
- ARM proprietary driver (GL_VENDOR="ARM"): GLES3 disabled (preserved)
- Mesa/Panfrost (GL_VENDOR="Mesa"): GLES3 enabled
- Other Mesa drivers: Unaffected
Related issues: #4078, #15413
Signed-off-by: Chris Healy <cphealy@gmail.com>