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

@ -296,6 +296,12 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
const PSCacheEntry &entry = iter->second;
last_entry = &entry;
#if defined(_DEBUG) || defined(DEBUGFAST)
if(iter->second.code.empty()) {
iter->second.code = std::string(GeneratePixelShaderCode(dstAlphaMode, API_D3D9, components));
}
#endif
DEBUGGER_PAUSE_AT(NEXT_PIXEL_SHADER_CHANGE,true);
if (entry.shader)
@ -344,6 +350,12 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
// And insert it into the shader cache.
bool result = InsertByteCode(uid, bytecode, bytecodelen, true);
#if defined(_DEBUG) || defined(DEBUGFAST)
iter = PixelShaders.find(uid);
if(iter->second.code.empty()) {
iter->second.code = std::string(code);
}
#endif
delete [] bytecode;
return result;
}