more bug fix in dx11:

fixed screen clearing and simplify drawClearQuad a little
put some nice code from dx11 that i like in dx9.
modify plugin spec preparing for implementing efb poke (is not used often but is a missing functionality so..)
please test.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5710 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-06-15 21:19:09 +00:00
parent 4464c11457
commit cb1694252b
13 changed files with 58 additions and 50 deletions

View File

@ -420,7 +420,7 @@ ID3D11Buffer* clearvb = NULL;
typedef struct { float x,y,z,u,v; } STQVertex;
typedef struct { float x,y,z,u,v; } STSQVertex;
typedef struct { float x,y,z; float col[4];} ClearVertex;
typedef struct { float x,y,z; u32 col;} ClearVertex;
void InitUtils()
{
@ -575,16 +575,11 @@ void drawClearQuad(u32 Color, float z, ID3D11PixelShader* PShader, ID3D11VertexS
if (lastcol != Color || lastz != z)
{
float col[4];
col[0] = (float)((Color & 0xFF) << 24);
col[1] = (float)((Color & 0xFF00) << 8);
col[2] = (float)((Color & 0xFF0000) >> 8);
col[3] = (float)((Color & 0xFF000000) >> 24);
ClearVertex coords[4] = {
{-1.0f, 1.0f, z, {col[0],col[1],col[2],col[3]}},
{ 1.0f, 1.0f, z, {col[0],col[1],col[2],col[3]}},
{-1.0f, -1.0f, z, {col[0],col[1],col[2],col[3]}},
{ 1.0f, -1.0f, z, {col[0],col[1],col[2],col[3]}},
{-1.0f, 1.0f, z, Color},
{ 1.0f, 1.0f, z, Color},
{-1.0f, -1.0f, z, Color},
{ 1.0f, -1.0f, z, Color},
};
D3D11_MAPPED_SUBRESOURCE map;