mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user