Skip to content

Conversation

PathogenDavid
Copy link
Contributor

@PathogenDavid PathogenDavid commented Jul 21, 2021

This PR was superseded by #4348


This PR fixes #4346

Not sure why this example was recreating the entire swap chain on resize (it's been like that forever), but ResizeBuffers is the correct way to react to WM_SIZE.

Only the Direct3D 12 sample was affected, other samples and viewport-aware backends are fine:

@PathogenDavid
Copy link
Contributor Author

Closing while I investigate a quirk I found.

@PathogenDavid
Copy link
Contributor Author

TL;DR: Had a false alarm on a bug in this change. Found unnecessary device object recreation in the process.


I finished investigating the quirk. While testing this change with the docking branch I noticed a debug layer crash happening in ImGui_ImplDX12_InvalidateDeviceObjects.

I did not determine the root cause of the crash (other than that it is specific to the docking backend -- will investigate more later), but it did make me realize I got tunnel vision and did not notice this unnecessary destruction/creation of backend-owned device objects.

Since this PR is already touching this area and it is related to window resizing, I removed those calls as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DX12 example app crashes immediately after going into fullscreen
2 participants