Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

press F2 to set SampleDesc.count = 4 will fail, due to mSwapChainBuffer not be reset before create a new swap chain #3

Open
qzhan15 opened this issue May 23, 2016 · 4 comments

Comments

@qzhan15
Copy link

qzhan15 commented May 23, 2016

at below code at begin of D3DApp::CreateSwapChain will solve this issue

for (int i = 0; i < SwapChainBufferCount; ++i)
mSwapChainBuffer[i].Reset();

@qzhan15 qzhan15 changed the title press F2 to turn on SampleDesc.count will fail, due to mSwapChainBuffer not be reset press F2 to set SampleDesc.count = 4 will fail, due to mSwapChainBuffer not be reset before create a new swap chain May 23, 2016
@Sighman6
Copy link

Actually, the problem occurs because you cannot use multi-sampling with DXGI_SWAP_EFFECT_FLIP_DISCARD.

@doxmo
Copy link

doxmo commented Oct 28, 2016

I wrote GHagi's code and I've changed DXGI_SWAP_EFFECT_FLIP_DISCARD for anothers. The error continue.

@Drayan
Copy link

Drayan commented Jul 24, 2017

Actually, according to https://github.com/Microsoft/DirectXTK12/wiki/Simple-rendering#Multisampling (Look at the technical note at the end of the page), MSAA is supported for DXGI_SWAP_EFFECT_DISCARD, not FLIP_DISCARD.

With DXGI_SWAP_EFFECT_FLIP_DISCARD, you have to use another way (explained in the link I gave).

@khollen42
Copy link

khollen42 commented Jul 30, 2017

Has anyone implemented the code changes recommended by Drayan? I'm getting the same crash with the latest code.

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

No branches or pull requests

5 participants