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

@ -32,7 +32,7 @@ typedef void (__cdecl* TVideo_EnterLoop)();
typedef void (__cdecl* TVideo_ExitLoop)();
typedef void (__cdecl* TVideo_SetRendering)(bool bEnabled);
typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds);
typedef u32 (__cdecl* TVideo_AccessEFB)(EFBAccessType, u32, u32);
typedef u32 (__cdecl* TVideo_AccessEFB)(EFBAccessType, u32, u32, u32);
typedef void (__cdecl* TVideo_Read16)(u16& _rReturnValue, const u32 _Address);
typedef void (__cdecl* TVideo_Write16)(const u16 _Data, const u32 _Address);
typedef void (__cdecl* TVideo_Read32)(u32& _rReturnValue, const u32 _Address);

View File

@ -136,10 +136,10 @@ u32 EFB_Read(const u32 addr)
int y = (addr >> 12) & 0x3ff;
if (addr & 0x00400000) {
var = CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(PEEK_Z, x, y);
var = CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(PEEK_Z, x, y, 0);
DEBUG_LOG(MEMMAP, "EFB Z Read @ %i, %i\t= 0x%08x", x, y, var);
} else {
var = CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(PEEK_COLOR, x, y);
var = CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(PEEK_COLOR, x, y, 0);
DEBUG_LOG(MEMMAP, "EFB Color Read @ %i, %i\t= 0x%08x", x, y, var);
}
@ -235,10 +235,10 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
int y = (em_address >> 12) & 0x3ff;
// TODO figure out a way to send data without falling into the template trap
if (em_address & 0x00400000) {
CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(POKE_Z, x, y);
CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(POKE_Z, x, y, (u32)data);
DEBUG_LOG(MEMMAP, "EFB Z Write %08x @ %i, %i", data, x, y);
} else {
CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(POKE_COLOR, x, y);
CPluginManager::GetInstance().GetVideo()->Video_AccessEFB(POKE_COLOR, x, y,(u32)data);
DEBUG_LOG(MEMMAP, "EFB Color Write %08x @ %i, %i", data, x, y);
}
return;