mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fix debug mode build, fix some profile stuff to not get compiled when profiling is off, cleaned a bit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@941 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -419,7 +419,7 @@ void BPWritten(int addr, int changes, int newval)
|
||||
|
||||
case 0x52:
|
||||
{
|
||||
DVProfileFunc _pf("LoadBPReg:swap");
|
||||
DVSTARTSUBPROFILE("LoadBPReg:swap");
|
||||
VertexManager::Flush();
|
||||
|
||||
((u32*)&bpmem)[addr] = newval;
|
||||
@ -524,7 +524,7 @@ void BPWritten(int addr, int changes, int newval)
|
||||
|
||||
case 0x65: //GXLoadTlut
|
||||
{
|
||||
DVProfileFunc _pf("LoadBPReg:GXLoadTlut");
|
||||
DVSTARTSUBPROFILE("LoadBPReg:GXLoadTlut");
|
||||
VertexManager::Flush();
|
||||
((u32*)&bpmem)[addr] = newval;
|
||||
|
||||
|
@ -27,25 +27,25 @@
|
||||
#include "Globals.h"
|
||||
#include "Profiler.h"
|
||||
#include "OpcodeDecoding.h"
|
||||
|
||||
#include "VertexLoader.h"
|
||||
#include "VertexManager.h"
|
||||
#include "VertexShaderManager.h"
|
||||
|
||||
#include "Statistics.h"
|
||||
|
||||
#include "BPStructs.h"
|
||||
#include "Fifo.h"
|
||||
#include "DataReader.h"
|
||||
|
||||
#define CMDBUFFER_SIZE 1024*1024
|
||||
|
||||
u8* g_pVideoData = 0;
|
||||
|
||||
extern u8* FAKE_GetFifoStartPtr();
|
||||
extern u8* FAKE_GetFifoEndPtr();
|
||||
|
||||
void Decode();
|
||||
static void Decode();
|
||||
|
||||
void ExecuteDisplayList(u32 address, u32 size)
|
||||
static void ExecuteDisplayList(u32 address, u32 size)
|
||||
{
|
||||
u8* old_pVideoData = g_pVideoData;
|
||||
|
||||
@ -69,7 +69,7 @@ void ExecuteDisplayList(u32 address, u32 size)
|
||||
g_pVideoData = old_pVideoData;
|
||||
}
|
||||
|
||||
bool FifoCommandRunnable(void)
|
||||
bool FifoCommandRunnable()
|
||||
{
|
||||
u32 iBufferSize = (u32)(FAKE_GetFifoEndPtr() - g_pVideoData);
|
||||
if (iBufferSize == 0)
|
||||
@ -198,7 +198,7 @@ bool FifoCommandRunnable(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Decode(void)
|
||||
static void Decode()
|
||||
{
|
||||
int Cmd = DataReadU8();
|
||||
switch(Cmd)
|
||||
@ -230,16 +230,16 @@ void Decode(void)
|
||||
break;
|
||||
|
||||
case GX_LOAD_INDX_A: //used for position matrices
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(),0xC);
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(), 0xC);
|
||||
break;
|
||||
case GX_LOAD_INDX_B: //used for normal matrices
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(),0xD);
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(), 0xD);
|
||||
break;
|
||||
case GX_LOAD_INDX_C: //used for postmatrices
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(),0xE);
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(), 0xE);
|
||||
break;
|
||||
case GX_LOAD_INDX_D: //used for lights
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(),0xF);
|
||||
VertexShaderMngr::LoadIndexedXF(DataReadU32(), 0xF);
|
||||
break;
|
||||
|
||||
case GX_CMD_CALL_DL:
|
||||
@ -268,7 +268,7 @@ void Decode(void)
|
||||
|
||||
// draw primitives
|
||||
default:
|
||||
if (Cmd&0x80)
|
||||
if (Cmd & 0x80)
|
||||
{
|
||||
// load vertices (use computed vertex size from FifoCommandRunnable above)
|
||||
u16 numVertices = DataReadU16();
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include "Statistics.h"
|
||||
#include "Config.h"
|
||||
#include "ImageWrite.h"
|
||||
#include "Common.h"
|
||||
#include "Render.h"
|
||||
|
@ -688,7 +688,7 @@ void Renderer::Swap(const TRectangle& rc)
|
||||
{
|
||||
OpenGL_Update(); // just updates the render window position and the backbuffer size
|
||||
|
||||
DVProfileFunc _pf("Renderer::Swap");
|
||||
DVSTARTPROFILE();
|
||||
|
||||
Renderer::SetRenderMode(Renderer::RM_Normal);
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Config.h"
|
||||
#include "ImageWrite.h"
|
||||
#include "x64Emitter.h"
|
||||
#include "ABI.h"
|
||||
|
@ -16,6 +16,7 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Config.h"
|
||||
#include "VertexLoader.h"
|
||||
#include "VertexManager.h"
|
||||
#include "VertexLoader_Normal.h"
|
||||
|
@ -125,8 +125,8 @@ void VertexManager::Flush()
|
||||
_assert_(s_pCurBufferPointer != s_pBaseBufferPointer);
|
||||
|
||||
#ifdef _DEBUG
|
||||
PRIM_LOG("frame%d:\ncomps=0x%x, texgen=%d, numchan=%d, dualtex=%d, ztex=%d, proj=%d, cole=%d, alpe=%d, ze=%d\n", g_Config.iSaveTargetId, s_prevcomponents, xfregs.numTexGens,
|
||||
xfregs.nNumChans, (int)xfregs.bEnableDualTexTransform, bpmem.ztex2.op, VertexShaderMngr::rawProjection[6]==0,
|
||||
PRIM_LOG("frame%d:\ncomps=0x%x, texgen=%d, numchan=%d, dualtex=%d, ztex=%d, cole=%d, alpe=%d, ze=%d\n", g_Config.iSaveTargetId, s_prevcomponents, xfregs.numTexGens,
|
||||
xfregs.nNumChans, (int)xfregs.bEnableDualTexTransform, bpmem.ztex2.op,
|
||||
bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate, bpmem.zmode.updateenable);
|
||||
for (int i = 0; i < xfregs.nNumChans; ++i) {
|
||||
LitChannel* ch = &xfregs.colChans[i].color;
|
||||
@ -163,7 +163,7 @@ void VertexManager::Flush()
|
||||
|
||||
// set the textures
|
||||
{
|
||||
DVProfileFunc _pf("VertexManager::Flush:textures");
|
||||
DVSTARTPROFILE("VertexManager::Flush:textures");
|
||||
|
||||
u32 usedtextures = 0;
|
||||
for (u32 i = 0; i < (u32)bpmem.genMode.numtevstages + 1; ++i) {
|
||||
@ -275,7 +275,7 @@ void VertexManager::Flush()
|
||||
std::ofstream fps(strfile);
|
||||
fps << ps->strprog.c_str();
|
||||
sprintf(strfile, "frames/vs%.3d.txt", g_Config.iSaveTargetId);
|
||||
ofstream fvs(strfile);
|
||||
std::ofstream fvs(strfile);
|
||||
fvs << vs->strprog.c_str();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user