DX9, Debugger: Implement pixel/vertex shader and texture dumping.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6322 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-10-31 11:38:06 +00:00
parent 922bb419f4
commit 6b0ac026bc
3 changed files with 173 additions and 2 deletions

View File

@ -230,6 +230,12 @@ bool VertexShaderCache::SetShader(u32 components)
const VSCacheEntry &entry = iter->second;
last_entry = &entry;
#if defined(_DEBUG) || defined(DEBUGFAST)
if(iter->second.code.empty()) {
iter->second.code = std::string(GenerateVertexShaderCode(components, API_D3D9));
}
#endif
DEBUGGER_PAUSE_AT(NEXT_VERTEX_SHADER_CHANGE,true);
if (entry.shader)
{
@ -255,6 +261,12 @@ bool VertexShaderCache::SetShader(u32 components)
g_vs_disk_cache.Sync();
bool result = InsertByteCode(uid, bytecode, bytecodelen, true);
#if defined(_DEBUG) || defined(DEBUGFAST)
iter = vshaders.find(uid);
if(iter->second.code.empty()) {
iter->second.code = std::string(code);
}
#endif
delete [] bytecode;
return result;
}
@ -285,6 +297,9 @@ bool VertexShaderCache::InsertByteCode(const VERTEXSHADERUID &uid, const u8 *byt
#if defined(_DEBUG) || defined(DEBUGFAST)
std::string VertexShaderCache::GetCurrentShaderCode()
{
return "(N/A)\n";
if (last_entry)
return last_entry->code;
else
return "(no shader)\n";
}
#endif