Some stuff which was still lying around on my hard disk:

- Add a sanity check in CRenderFrame::MSWWindowProc. Possibly reduces the risk of a crash when starting a game and immediately closing the emulation window when using the DX9 plugin.
- DX11: Add the resource usage as a parameter to CreateQuadVertexBuffer, possibly to be used in the future.
- reduce the size of the EFB access buffers from 4x4 to 1x1 since they needn't be bigger anymore
- some fixes to the recent hires commit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6256 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-10-04 11:09:32 +00:00
parent 4907e6b6d2
commit 9ffc071e34
5 changed files with 38 additions and 20 deletions

View File

@ -391,15 +391,29 @@ int CD3DFont::DrawTextScaled(float x, float y, float size, float spacing, u32 dw
return S_OK;
}
ID3D11Buffer* CreateQuadVertexBuffer(unsigned int size, void* data)
ID3D11Buffer* CreateQuadVertexBuffer(unsigned int size, void* data, D3D11_USAGE usage = D3D11_USAGE_DYNAMIC)
{
ID3D11Buffer* vb;
D3D11_BUFFER_DESC vbdesc;
vbdesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
vbdesc.ByteWidth = size;
vbdesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
vbdesc.MiscFlags = 0;
vbdesc.Usage = D3D11_USAGE_DYNAMIC;
vbdesc.Usage = usage;
switch (usage)
{
case D3D11_USAGE_DEFAULT:
case D3D11_USAGE_IMMUTABLE:
vbdesc.CPUAccessFlags = 0;
break;
case D3D11_USAGE_DYNAMIC:
vbdesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
break;
case D3D11_USAGE_STAGING:
vbdesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE|D3D11_CPU_ACCESS_READ;
break;
}
if (data)
{
D3D11_SUBRESOURCE_DATA bufdata;