DX11 DWM vsync fix for windowed modes + fix for broken blur passes + TODO with explanation of issue for MSAA w/ volumetrics error#72
Merged
themrdemonized merged 4 commits intothemrdemonized:all-in-one-vs2022-wpofrom Sep 15, 2024
Conversation
- Added `--dxgi-dbg` argument to enable the D3D debug layer without requiring recompilation - Fixed issue with windowed/fullscreen transitions when display mode is changed
…epth buffer resolution (HW.pBaseRT is the fullscreen depth buffer, but the blur passes use 1/2, 1/4, and 1/8 resolution color targets which is an API use error) - DX9 doesn't have `rt->pZRT` like DX10/11 so has to directly create a depth stencil surface for Z-buffers (which requires appropriate cleanup in the destructor) - I'm not sure that these passes need depth buffers, but the original code was trying to use them. If not required could save a little bit of VRAM and just pass 0/NULL to those functions
…ew it in RenderDoc
themrdemonized
added a commit
that referenced
this pull request
Sep 15, 2024
DX11 DWM vsync fix for windowed modes + fix for broken blur passes + TODO with explanation of issue for MSAA w/ volumetrics error (cherry picked from commit 4668344)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sorry for bundling all this in one PR, I tried to break up the commits to make it easier to see what changes are relevant for each issue. Also sorry for trailing whitespace changes, but probably better they're gone now :)
DX11 DWM vsync issue:
FLIPpresentation modes vsync to the DWM, so if your desktop refresh rate was 60Hz and the game was in a windowed mode (borderless/windowed) the renderer would be locked to 60Hz even if it could run at a higher framerate (even with the in-game vsync disabled)PresentcallDXGI_PRESENT_ALLOW_TEARINGto unlock the framerate in windowed modesNew DXGI debug argument:
--dxgi-dbgto enable the D3D debug layer without requiring recompilation (currently only for DX11)OutputDebugStringso you either need to run the game in a debugger that displays that output, or use a tool like DebugView) wrong and can help a lot with debugging--dxgi-dbgas an argument, withEnable API ValidationandCollect CallstacksenabledTools > Load Symbolsto load debug symbols for callstack viewResizeBuffersdon't happen within a frame so you'll just have to look at the debug output logFixing broken blur render passes:
u_setrtto disable binding oneMSAA volumetrics error:
rt_Generic_2) with a non-multisampled depth buffer (HW.pBaseZB) which is a hard API errorRImplementation.o.ssfx_volumetricis enabled, so maybe we could just pass NULL? Otherwise I think we would usert_MSAADepth->pZRTor a new depth target, but this might require a multisample resolve