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

@ -31,6 +31,7 @@
#include "VertexLoader.h"
#include "BPMemory.h"
#include "XFMemory.h"
#include "Debugger.h"
VertexShaderCache::VSCache VertexShaderCache::vshaders;
const VertexShaderCache::VSCacheEntry *VertexShaderCache::last_entry;
@ -207,7 +208,10 @@ bool VertexShaderCache::SetShader(u32 components)
VERTEXSHADERUID uid;
GetVertexShaderId(&uid, components);
if (uid == last_vertex_shader_uid && vshaders[uid].frameCount == frameCount)
{
GFX_DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE, true);
return (vshaders[uid].shader != NULL);
}
memcpy(&last_vertex_shader_uid, &uid, sizeof(VERTEXSHADERUID));
@ -219,6 +223,7 @@ bool VertexShaderCache::SetShader(u32 components)
last_entry = &entry;
if (entry.shader) D3D::gfxstate->SetVShader(entry.shader, iter->second.bytecode);
GFX_DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE, true);
return (entry.shader != NULL);
}
@ -230,6 +235,7 @@ bool VertexShaderCache::SetShader(u32 components)
if (pbytecode == NULL)
{
PanicAlert("Failed to compile Vertex Shader %s %d:\n\n%s", __FILE__, __LINE__, code);
GFX_DEBUGGER_PAUSE_AT(NEXT_ERROR, true);
return false;
}
g_vs_disk_cache.Append(uid, pbytecode->Data(), pbytecode->Size());
@ -238,6 +244,7 @@ bool VertexShaderCache::SetShader(u32 components)
bool result = InsertByteCode(uid, pbytecode);
D3D::gfxstate->SetVShader(last_entry->shader, last_entry->bytecode);
pbytecode->Release();
GFX_DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE, true);
return result;
}