mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
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:
@ -32,6 +32,7 @@
|
||||
#include "BPMemory.h"
|
||||
#include "XFMemory.h"
|
||||
#include "ImageWrite.h"
|
||||
#include "Debugger.h"
|
||||
|
||||
extern int frameCount;
|
||||
|
||||
@ -331,6 +332,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
|
||||
if (uid == last_pixel_shader_uid && PixelShaders[uid].frameCount == frameCount)
|
||||
{
|
||||
PSCache::const_iterator iter = PixelShaders.find(uid);
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_PIXEL_SHADER_CHANGE,true);
|
||||
return (iter != PixelShaders.end() && iter->second.shader);
|
||||
}
|
||||
|
||||
@ -346,6 +348,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
|
||||
last_entry = &entry;
|
||||
|
||||
D3D::gfxstate->SetPShader(entry.shader);
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_PIXEL_SHADER_CHANGE,true);
|
||||
return (entry.shader != NULL);
|
||||
}
|
||||
|
||||
@ -356,6 +359,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
|
||||
if (!D3D::CompilePixelShader(code, strlen(code), &pbytecode))
|
||||
{
|
||||
PanicAlert("Failed to compile Pixel Shader:\n\n%s", code);
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_ERROR, true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -366,6 +370,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
|
||||
bool result = InsertByteCode(uid, pbytecode->Data(), pbytecode->Size());
|
||||
D3D::gfxstate->SetPShader(last_entry->shader);
|
||||
pbytecode->Release();
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_PIXEL_SHADER_CHANGE, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include "Fifo.h"
|
||||
#include "DLCache.h"
|
||||
|
||||
#include "Debugger.h"
|
||||
|
||||
#include <strsafe.h>
|
||||
|
||||
static int s_fps = 0;
|
||||
@ -919,6 +921,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
||||
OSD::DrawMessages();
|
||||
D3D::EndFrame();
|
||||
frameCount++;
|
||||
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_FRAME, true);
|
||||
|
||||
DLCache::ProgressiveCleanup();
|
||||
TextureCache::Cleanup();
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "XFStructs.h"
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Debugger.h"
|
||||
|
||||
// internal state for loading vertices
|
||||
extern NativeVertexFormat *g_nativeVertexFmt;
|
||||
@ -218,9 +219,15 @@ void VertexManager::vFlush()
|
||||
if (!PixelShaderCache::SetShader(
|
||||
useDstAlpha ? DSTALPHA_DUAL_SOURCE_BLEND : DSTALPHA_NONE,
|
||||
g_nativeVertexFmt->m_components))
|
||||
{
|
||||
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))
|
||||
{
|
||||
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
|
||||
goto shader_fail;
|
||||
}
|
||||
|
||||
unsigned int stride = g_nativeVertexFmt->GetVertexStride();
|
||||
g_nativeVertexFmt->SetupVertexPointers();
|
||||
@ -230,6 +237,8 @@ void VertexManager::vFlush()
|
||||
|
||||
D3D::gfxstate->Reset();
|
||||
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
|
||||
|
||||
shader_fail:
|
||||
ResetBuffer();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "EmuWindow.h"
|
||||
#include "FramebufferManager.h"
|
||||
#include "DLCache.h"
|
||||
#include "DebuggerPanel.h"
|
||||
|
||||
HINSTANCE g_hInstance = NULL;
|
||||
|
||||
@ -64,7 +65,11 @@ WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
|
||||
void *DllDebugger(void *_hParent, bool Show)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
return new GFXDebuggerPanel((wxWindow*)_hParent);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
@ -150,6 +155,7 @@ void InitBackendInfo()
|
||||
g_Config.backend_info.bSupportsRealXFB = false;
|
||||
g_Config.backend_info.bSupports3DVision = false;
|
||||
g_Config.backend_info.bAllowSignedBytes = true;
|
||||
g_Config.backend_info.bSupportsDualSourceBlend = true;
|
||||
}
|
||||
|
||||
void DllConfig(void *_hParent)
|
||||
|
Reference in New Issue
Block a user