D3D: replace memset, fix warning
This commit is contained in:
parent
442b7ba99c
commit
c43da7e00b
Source/Core/VideoBackends/D3D
|
@ -264,8 +264,7 @@ HRESULT Create(HWND wnd)
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
DXGI_SWAP_CHAIN_DESC swap_chain_desc;
|
DXGI_SWAP_CHAIN_DESC swap_chain_desc = {};
|
||||||
memset(&swap_chain_desc, 0, sizeof(swap_chain_desc));
|
|
||||||
swap_chain_desc.BufferCount = 1;
|
swap_chain_desc.BufferCount = 1;
|
||||||
swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||||
swap_chain_desc.OutputWindow = wnd;
|
swap_chain_desc.OutputWindow = wnd;
|
||||||
|
@ -273,12 +272,10 @@ HRESULT Create(HWND wnd)
|
||||||
swap_chain_desc.SampleDesc.Quality = 0;
|
swap_chain_desc.SampleDesc.Quality = 0;
|
||||||
swap_chain_desc.Windowed = !g_Config.bFullscreen;
|
swap_chain_desc.Windowed = !g_Config.bFullscreen;
|
||||||
|
|
||||||
DXGI_OUTPUT_DESC out_desc;
|
DXGI_OUTPUT_DESC out_desc = {};
|
||||||
memset(&out_desc, 0, sizeof(out_desc));
|
|
||||||
output->GetDesc(&out_desc);
|
output->GetDesc(&out_desc);
|
||||||
|
|
||||||
DXGI_MODE_DESC mode_desc;
|
DXGI_MODE_DESC mode_desc = {};
|
||||||
memset(&mode_desc, 0, sizeof(mode_desc));
|
|
||||||
mode_desc.Width = out_desc.DesktopCoordinates.right - out_desc.DesktopCoordinates.left;
|
mode_desc.Width = out_desc.DesktopCoordinates.right - out_desc.DesktopCoordinates.left;
|
||||||
mode_desc.Height = out_desc.DesktopCoordinates.bottom - out_desc.DesktopCoordinates.top;
|
mode_desc.Height = out_desc.DesktopCoordinates.bottom - out_desc.DesktopCoordinates.top;
|
||||||
mode_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
mode_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
@ -317,8 +314,7 @@ HRESULT Create(HWND wnd)
|
||||||
D3D11_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS
|
D3D11_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS
|
||||||
};
|
};
|
||||||
|
|
||||||
D3D11_INFO_QUEUE_FILTER filter;
|
D3D11_INFO_QUEUE_FILTER filter = {};
|
||||||
memset(&filter, 0, sizeof(filter));
|
|
||||||
filter.DenyList.NumIDs = sizeof(hide) / sizeof(D3D11_MESSAGE_ID);
|
filter.DenyList.NumIDs = sizeof(hide) / sizeof(D3D11_MESSAGE_ID);
|
||||||
filter.DenyList.pIDList = hide;
|
filter.DenyList.pIDList = hide;
|
||||||
infoQueue->AddStorageFilterEntries(&filter);
|
infoQueue->AddStorageFilterEntries(&filter);
|
||||||
|
@ -402,7 +398,7 @@ void Close()
|
||||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
--references; // we didn't release the debug interface yet
|
--references; // the debug interface increases the refcount of the device, subtract that.
|
||||||
if (references)
|
if (references)
|
||||||
{
|
{
|
||||||
// print out alive objects, but only if we actually have pending references
|
// print out alive objects, but only if we actually have pending references
|
||||||
|
|
|
@ -361,8 +361,8 @@ void XFBEncoder::Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcR
|
||||||
D3D::context->Unmap(m_outStage, 0);
|
D3D::context->Unmap(m_outStage, 0);
|
||||||
|
|
||||||
// Restore API
|
// Restore API
|
||||||
|
|
||||||
g_renderer->RestoreAPIState();
|
g_renderer->RestoreAPIState();
|
||||||
|
D3D::stateman->Apply(); // force unbind efb texture as shader resource
|
||||||
D3D::context->OMSetRenderTargets(1,
|
D3D::context->OMSetRenderTargets(1,
|
||||||
&FramebufferManager::GetEFBColorTexture()->GetRTV(),
|
&FramebufferManager::GetEFBColorTexture()->GetRTV(),
|
||||||
FramebufferManager::GetEFBDepthTexture()->GetDSV());
|
FramebufferManager::GetEFBDepthTexture()->GetDSV());
|
||||||
|
|
Loading…
Reference in New Issue