D3D: Implemented context state caching

This avoids most of the redundant API calls.
This commit is contained in:
Yuriy O'Donnell
2014-10-29 01:19:09 +01:00
parent d83f0308af
commit 6e9226650d
12 changed files with 453 additions and 136 deletions

View File

@ -4,6 +4,7 @@
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/D3DBlob.h"
#include "VideoBackends/D3D/D3DState.h"
#include "VideoBackends/D3D/VertexManager.h"
#include "VideoBackends/D3D/VertexShaderCache.h"
#include "VideoCommon/NativeVertexFormat.h"
@ -137,7 +138,7 @@ void D3DVertexFormat::SetupVertexPointers()
if (FAILED(hr)) PanicAlert("Failed to create input layout, %s %d\n", __FILE__, __LINE__);
DX11::D3D::SetDebugObjectName((ID3D11DeviceChild*)m_layout, "input layout used to emulate the GX pipeline");
}
DX11::D3D::context->IASetInputLayout(m_layout);
DX11::D3D::stateman->setInputLayout(m_layout);
}
} // namespace DX11