Merged the D3D9 debugger into VideoCommon/VideoUICommon:

Separated UI from debugger functionality. Generally cleaned up that stuff.
Most functionality needs to be reimplemented now, but will be available to D3D9, D3D11 as well as OpenGL then.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6523 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-12-05 14:15:36 +00:00
parent 9da4fe086b
commit 7854bd7109
36 changed files with 735 additions and 1112 deletions

View File

@ -35,8 +35,8 @@
#include "BPStructs.h"
#include "XFStructs.h"
#include "debugger/debugger.h"
#include "Debugger.h"
#include "VideoConfig.h"
// internal state for loading vertices
extern NativeVertexFormat *g_nativeVertexFmt;
@ -47,7 +47,8 @@ namespace DX9
inline void DumpBadShaders()
{
#if defined(_DEBUG) || defined(DEBUGFAST)
std::string error_shaders;
// TODO: Reimplement!
/* std::string error_shaders;
error_shaders.append(VertexShaderCache::GetCurrentShaderCode());
error_shaders.append(PixelShaderCache::GetCurrentShaderCode());
char filename[512] = "bad_shader_combo_0.txt";
@ -58,7 +59,7 @@ inline void DumpBadShaders()
sprintf(filename, "bad_shader_combo_%i.txt", which);
}
File::WriteStringToFile(true, error_shaders, filename);
PanicAlert("DrawIndexedPrimitiveUP failed. Shaders written to %s", filename);
PanicAlert("DrawIndexedPrimitiveUP failed. Shaders written to %s", filename);*/
#endif
}
@ -157,12 +158,12 @@ void VertexManager::vFlush()
if (!PixelShaderCache::SetShader(DSTALPHA_NONE,g_nativeVertexFmt->m_components))
{
DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
if (!VertexShaderCache::SetShader(g_nativeVertexFmt->m_components))
{
DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set vertex shader\n");});
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set vertex shader\n");});
goto shader_fail;
}
@ -177,7 +178,7 @@ void VertexManager::vFlush()
DWORD write = 0;
if (!PixelShaderCache::SetShader(DSTALPHA_ALPHA_PASS, g_nativeVertexFmt->m_components))
{
DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
// update alpha only
@ -189,7 +190,7 @@ void VertexManager::vFlush()
D3D::RefreshRenderState(D3DRS_COLORWRITEENABLE);
D3D::RefreshRenderState(D3DRS_ALPHABLENDENABLE);
}
DEBUGGER_PAUSE_AT(NEXT_FLUSH,true);
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
shader_fail:
ResetBuffer();