-
|
|
FindClosestMatchingMode() under Windows 7
|
Hi,
while running a debug version of our app on Windows 7 x64, I have noticed that a call to FindClosestMatchingMode() produced a lot of messages in the debug output window.
I get more than 400 of these messages for a single call (with different formats checked for I guess):
D3D10: INFO: ID3D10Device::CheckFormatSupport: Format B8G8R8A8_UNORM, while present in DXGI, is deprecated and not available in D3D10+. [ MISCELLANEOUS INFO #321: CHECKFORMATSUPPORT_FORMAT_DEPRECATED ]
Any idea why ?
Thanks,
Gregory
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
Dou you call FindClosestMatchingMode with B8G8R8A8_UNORM as Format?
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
I don't want to "hijack" this thread so to speak but I have the EXACT same issue on win7 x64..
I call FindClosestMatchingMode with a format of DXGI_FORMAT_R16G16B16A16_FLOAT and it returns 266 lines of:
"D3D10: INFO: ID3D10Device::CheckFormatSupport: Format B8G8R8A8_UNORM, while present in DXGI, is deprecated and not available in D3D10+. [ MISCELLANEOUS INFO #321: CHECKFORMATSUPPORT_FORMAT_DEPRECATED ]"
The Format does change between B5G6R5_UNORM and B8G8R8A8_UNORM ... 5-6 lines of each alternating by the looks of it.
As I said - I'm using DXGI_FORMAT_R16G16B16A16_FLOAT and do not use any of the formats mentioned in the debug.
Side note: alt-enter flickers and will NOT set full screen mode, however I can force it to the mode using SetFullscreenMode on a keypress.. This is probably related? I AM resetting OMSetRenderTargets, Releasing the buffers and resizing buffers on resize as well...
(edit: aside: I cannot get alt-enter working to set fullscreen AT ALL, and my keypress SetFullscreenMode call gives me the debug message:
"DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain::ResizeBuffers appropriately, specifying a DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH.... This appears okay though because if I create a 640x480 window and then go full screen, it swaps modes to 640x480 but in full screen (this _IS_ what I want..) other than the alt-enter behaviour)
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
I have the exact same problem here, also Win7 x64 RC 7100.
My D3D10 programs will spam me with this "D3D10: INFO: ID3D10Device::CheckFormatSupport: Format
B8G8R8A8_UNORM, while present in DXGI, is deprecated and not available
in D3D10+. [ MISCELLANEOUS INFO #321:
CHECKFORMATSUPPORT_FORMAT_DEPRECATED ]" stuff and some other warnings.
But my main issue is that in my D3D11 application I get this warning:
DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain::ResizeBuffers appropriately, specifying a DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH. DXGI_SWAP_CHAIN_DESC::BufferDesc = { 1280, 768, { 60, 1 }, B8G8R8A8_UNORM, 0, 1 }; DXGI_SWAP_CHAIN_DESC::SampleDesc = { 4, 0 }; DXGI_SWAP_CHAIN_DESC::Flags = 0x2;
Even though I am 100% sure I quadruple-checked that I use the right flags, and my mode desc is enumerated from the output object, and I am calling ResizeBuffers correctly in response to WM_SIZE.
and my debug output window gets SPAMMED with
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ac89c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acc30..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acd74..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003adeec..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae024..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ac89c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acc30..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acd74..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003adeec..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae024..
'Client.exe': Loaded 'C:\Windows\SysWOW64\ntmarta.dll'
'Client.exe': Loaded 'C:\Windows\SysWOW64\Wldap32.dll'
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acb0c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acea0..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acfe4..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae15c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae290..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acb0c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acea0..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acfe4..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae15c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae290..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acb0c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acea0..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acfe4..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae15c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae290..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acb0c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acea0..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003acfe4..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae15c..
First-chance exception at 0x767b98f6 in Client.exe: Microsoft C++ exception: _com_error at memory location 0x003ae290..
'Client.exe': Loaded 'C:\Windows\SysWOW64\D3D10SDKLayers.DLL'
DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain::ResizeBuffers appropriately, specifying a DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH. DXGI_SWAP_CHAIN_DESC::BufferDesc = { 1280, 768, { 60, 1 }, B8G8R8A8_UNORM, 0, 1 }; DXGI_SWAP_CHAIN_DESC::SampleDesc = { 4, 0 }; DXGI_SWAP_CHAIN_DESC::Flags = 0x2;
The warning and the exceptions happen when switching in and out of Full-Screen mode.
This is terribly annoying and I would like some sort of statement from someone in the DX-team as to why this is happening and when or how it will get fixed.
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
I'm not sure about the com errors you're getting, but I've asked someone else to look at those. As for getting spammed with uninteresting info messages, that's why info messages are off by default, and that's what muting is for. Go ahead and add message 321 to the mute message ID list in the DX control panel and just make sure you don't use the formats that DXGI is warning you about.
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
John Rapp:I'm not sure about the com errors you're getting, but I've asked someone else to look at those. As for getting spammed with uninteresting info messages, that's why info messages are off by default, and that's what muting is for. Go ahead and add message 321 to the mute message ID list in the DX control panel and just make sure you don't use the formats that DXGI is warning you about.
Also, do you know why every Direct3D 11 program I tried so far, even the DX SDK samples and the nVidia samples all get this warning?
DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation
inefficiencies incurred due to application not using
IDXGISwapChain::ResizeBuffers appropriately, specifying a
DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not
using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH.
DXGI_SWAP_CHAIN_DESC::BufferDesc = { 1280, 768, { 60, 1 },
B8G8R8A8_UNORM, 0, 1 }; DXGI_SWAP_CHAIN_DESC::SampleDesc = { 4, 0 };
DXGI_SWAP_CHAIN_DESC::Flags = 0x2;
I'm not sure if this only happens on win7 x64 because I haven't tested it on other configurations yet, but from this warning it seems like there's an issue that prevents DXGI from flipping the backbuffer on Present()?
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
One of the possible reasons for this message is mismatched refresh rate. To enable flipping, refresh rate in the mode description should match with the monitor refresh rate perfectly (which is usually not 60/1, but something like 60003/1000). Please double-check your app doesn't set refresh rate 60/1 manually, but copies it over from the result of IDXGIOutput::GetDisplayModeList.
|
|
-
|
|
Re: FindClosestMatchingMode() under Windows 7
|
Yep, I copy it over from the result of IDXGIOutput::GetDisplayModeList.
This is about how I switch to Fullscreen Mode:
memcpy(&m_SwapChainDesc.BufferDesc, &m_pModeDescs[m_iMode], sizeof(DXGI_MODE_DESC));
if(FAILED(m_pSwapChain->ResizeTarget(&m_SwapChainDesc.BufferDesc)))
{
m_SwapChainDesc.Windowed = true;
return;
}
if(FAILED(m_pSwapChain->SetFullscreenState(TRUE, m_vOutputs[m_iOutput])))
{
m_SwapChainDesc.Windowed = true;
return;
}
DXGI_RATIONAL temp = m_SwapChainDesc.BufferDesc.RefreshRate;
ZeroMemory(&m_SwapChainDesc.BufferDesc.RefreshRate, sizeof(DXGI_RATIONAL));
if(FAILED(m_pSwapChain->ResizeTarget(&m_SwapChainDesc.BufferDesc)))
{
m_SwapChainDesc.BufferDesc.RefreshRate = temp;
return;
}
m_SwapChainDesc.BufferDesc.RefreshRate = temp;
And how I handle WM_SIZE:
void Renderer::OnSize(SizeArgs& args)
{
unsigned int Width = args.Width(),
Height = args.Height();
if(Width < 8 || Height < 8)
return;
m_pImmediateContext->OMSetRenderTargets(0, 0, 0);
m_pRenderTargetView->Release();
m_pDepthStencilView->Release();
m_pDepthStencilView = NULL;
m_pDepthStencil->Release();
m_pDepthStencil = NULL;
m_pSwapChain->ResizeBuffers(m_SwapChainDesc.BufferCount,
m_SwapChainDesc.BufferDesc.Width = Width,
m_SwapChainDesc.BufferDesc.Height = Height,
m_SwapChainDesc.BufferDesc.Format,
m_SwapChainDesc.Flags);
m_DepthStencilDesc.Width = Width;
m_DepthStencilDesc.Height = Height;
if(FAILED(m_pDevice->CreateTexture2D(&m_DepthStencilDesc, NULL, &m_pDepthStencil)))
{
return;
}
if(FAILED(m_pDevice->CreateDepthStencilView(m_pDepthStencil, &m_DepthStencilViewDesc, &m_pDepthStencilView)))
{
return;
}
// Recreate the Render Target View
CreateRenderTargetView();
// Set the new viewport
SetViewport();
}
I'm no longer getting the _com_error's now it's only the fullscreen presentation inefficiencies message.
Edit: Btw this is D3D11 now.
|
|
|