mirror of https://github.com/PCSX2/pcsx2.git
gsdx: use correct format in printf
u => unsigned d => signed zu => size_t
This commit is contained in:
parent
0a1454ff6c
commit
15db7eeb81
|
@ -201,7 +201,7 @@ void GSDeviceOGL::GenerateProfilerData()
|
||||||
FILE* csv = fopen("GSdx_profile.csv", "w");
|
FILE* csv = fopen("GSdx_profile.csv", "w");
|
||||||
if (csv) {
|
if (csv) {
|
||||||
for (size_t i = 0; i < times.size(); i++) {
|
for (size_t i = 0; i < times.size(); i++) {
|
||||||
fprintf(csv, "%d,%lf\n", i, times[i]);
|
fprintf(csv, "%zu,%lf\n", i, times[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(csv);
|
fclose(csv);
|
||||||
|
|
|
@ -134,32 +134,32 @@ public:
|
||||||
if (!fp) return;
|
if (!fp) return;
|
||||||
|
|
||||||
fprintf(fp, "XYOFFSET\n"
|
fprintf(fp, "XYOFFSET\n"
|
||||||
"\tX:%d\n"
|
"\tX:%u\n"
|
||||||
"\tY:%d\n\n"
|
"\tY:%u\n\n"
|
||||||
, XYOFFSET.OFX, XYOFFSET.OFY);
|
, XYOFFSET.OFX, XYOFFSET.OFY);
|
||||||
|
|
||||||
fprintf(fp, "TEX0\n"
|
fprintf(fp, "TEX0\n"
|
||||||
"\tTBP0:0x%x\n"
|
"\tTBP0:0x%x\n"
|
||||||
"\tTBW:%d\n"
|
"\tTBW:%u\n"
|
||||||
"\tPSM:0x%x\n"
|
"\tPSM:0x%x\n"
|
||||||
"\tTW:%d\n"
|
"\tTW:%u\n"
|
||||||
"\tTCC:%d\n"
|
"\tTCC:%u\n"
|
||||||
"\tTFX:%d\n"
|
"\tTFX:%u\n"
|
||||||
"\tCBP:0x%x\n"
|
"\tCBP:0x%x\n"
|
||||||
"\tCPSM:0x%x\n"
|
"\tCPSM:0x%x\n"
|
||||||
"\tCSM:%d\n"
|
"\tCSM:%u\n"
|
||||||
"\tCSA:%d\n"
|
"\tCSA:%u\n"
|
||||||
"\tCLD:%d\n"
|
"\tCLD:%u\n"
|
||||||
"\tTH:%lld\n\n"
|
"\tTH:%llu\n\n"
|
||||||
, TEX0.TBP0, TEX0.TBW, TEX0.PSM, TEX0.TW, TEX0.TCC, TEX0.TFX, TEX0.CBP, TEX0.CPSM, TEX0.CSM, TEX0.CSA, TEX0.CLD, TEX0.TH);
|
, TEX0.TBP0, TEX0.TBW, TEX0.PSM, TEX0.TW, TEX0.TCC, TEX0.TFX, TEX0.CBP, TEX0.CPSM, TEX0.CSM, TEX0.CSA, TEX0.CLD, TEX0.TH);
|
||||||
|
|
||||||
fprintf(fp, "TEX1\n"
|
fprintf(fp, "TEX1\n"
|
||||||
"\tLCM:%d\n"
|
"\tLCM:%u\n"
|
||||||
"\tMXL:%d\n"
|
"\tMXL:%u\n"
|
||||||
"\tMMAG:%d\n"
|
"\tMMAG:%u\n"
|
||||||
"\tMMIN:%d\n"
|
"\tMMIN:%u\n"
|
||||||
"\tMTBA:%d\n"
|
"\tMTBA:%u\n"
|
||||||
"\tL:%d\n"
|
"\tL:%u\n"
|
||||||
"\tK:%d\n\n"
|
"\tK:%d\n\n"
|
||||||
, TEX1.LCM, TEX1.MXL, TEX1.MMAG, TEX1.MMIN, TEX1.MTBA, TEX1.L, TEX1.K);
|
, TEX1.LCM, TEX1.MXL, TEX1.MMAG, TEX1.MMIN, TEX1.MTBA, TEX1.L, TEX1.K);
|
||||||
|
|
||||||
|
@ -167,57 +167,57 @@ public:
|
||||||
"\tPSM:0x%x\n"
|
"\tPSM:0x%x\n"
|
||||||
"\tCBP:0x%x\n"
|
"\tCBP:0x%x\n"
|
||||||
"\tCPSM:0x%x\n"
|
"\tCPSM:0x%x\n"
|
||||||
"\tCSM:%d\n"
|
"\tCSM:%u\n"
|
||||||
"\tCSA:%d\n"
|
"\tCSA:%u\n"
|
||||||
"\tCLD:%d\n\n"
|
"\tCLD:%u\n\n"
|
||||||
, TEX2.PSM, TEX2.CBP, TEX2.CPSM, TEX2.CSM, TEX2.CSA, TEX2.CLD);
|
, TEX2.PSM, TEX2.CBP, TEX2.CPSM, TEX2.CSM, TEX2.CSA, TEX2.CLD);
|
||||||
|
|
||||||
fprintf(fp, "CLAMP\n"
|
fprintf(fp, "CLAMP\n"
|
||||||
"\tWMS:%d\n"
|
"\tWMS:%u\n"
|
||||||
"\tWMT:%d\n"
|
"\tWMT:%u\n"
|
||||||
"\tMINU:%d\n"
|
"\tMINU:%u\n"
|
||||||
"\tMAXU:%d\n"
|
"\tMAXU:%u\n"
|
||||||
"\tMAXV:%d\n"
|
"\tMAXV:%u\n"
|
||||||
"\tMINV:%lld\n\n"
|
"\tMINV:%llu\n\n"
|
||||||
, CLAMP.WMS, CLAMP.WMT, CLAMP.MINU, CLAMP.MAXU, CLAMP.MAXV, CLAMP.MINV);
|
, CLAMP.WMS, CLAMP.WMT, CLAMP.MINU, CLAMP.MAXU, CLAMP.MAXV, CLAMP.MINV);
|
||||||
|
|
||||||
// TODO mimmap? (yes I'm lazy)
|
// TODO mimmap? (yes I'm lazy)
|
||||||
fprintf(fp, "SCISSOR\n"
|
fprintf(fp, "SCISSOR\n"
|
||||||
"\tX0:%d\n"
|
"\tX0:%u\n"
|
||||||
"\tX1:%d\n"
|
"\tX1:%u\n"
|
||||||
"\tY0:%d\n"
|
"\tY0:%u\n"
|
||||||
"\tY1:%d\n\n"
|
"\tY1:%u\n\n"
|
||||||
, SCISSOR.SCAX0, SCISSOR.SCAX1, SCISSOR.SCAY0, SCISSOR.SCAY1);
|
, SCISSOR.SCAX0, SCISSOR.SCAX1, SCISSOR.SCAY0, SCISSOR.SCAY1);
|
||||||
|
|
||||||
fprintf(fp, "ALPHA\n"
|
fprintf(fp, "ALPHA\n"
|
||||||
"\tA:%d\n"
|
"\tA:%u\n"
|
||||||
"\tB:%d\n"
|
"\tB:%u\n"
|
||||||
"\tC:%d\n"
|
"\tC:%u\n"
|
||||||
"\tD:%d\n"
|
"\tD:%u\n"
|
||||||
"\tFIX:%d\n"
|
"\tFIX:%u\n"
|
||||||
, ALPHA.A, ALPHA.B, ALPHA.C, ALPHA.D, ALPHA.FIX);
|
, ALPHA.A, ALPHA.B, ALPHA.C, ALPHA.D, ALPHA.FIX);
|
||||||
const char *col[3] = {"Cs", "Cd", "0"};
|
const char *col[3] = {"Cs", "Cd", "0"};
|
||||||
const char *alpha[3] = {"As", "Ad", "Af"};
|
const char *alpha[3] = {"As", "Ad", "Af"};
|
||||||
fprintf(fp, "\t=> (%s - %s) * %s + %s\n\n", col[ALPHA.A], col[ALPHA.B], alpha[ALPHA.C], col[ALPHA.D]);
|
fprintf(fp, "\t=> (%s - %s) * %s + %s\n\n", col[ALPHA.A], col[ALPHA.B], alpha[ALPHA.C], col[ALPHA.D]);
|
||||||
|
|
||||||
fprintf(fp, "TEST\n"
|
fprintf(fp, "TEST\n"
|
||||||
"\tATE:%d\n"
|
"\tATE:%u\n"
|
||||||
"\tATST:%d\n"
|
"\tATST:%u\n"
|
||||||
"\tAREF:%d\n"
|
"\tAREF:%u\n"
|
||||||
"\tAFAIL:%d\n"
|
"\tAFAIL:%u\n"
|
||||||
"\tDATE:%d\n"
|
"\tDATE:%u\n"
|
||||||
"\tDATM:%d\n"
|
"\tDATM:%u\n"
|
||||||
"\tZTE:%d\n"
|
"\tZTE:%u\n"
|
||||||
"\tZTST:%d\n\n"
|
"\tZTST:%u\n\n"
|
||||||
, TEST.ATE, TEST.ATST, TEST.AREF, TEST.AFAIL, TEST.DATE, TEST.DATM, TEST.ZTE, TEST.ZTST);
|
, TEST.ATE, TEST.ATST, TEST.AREF, TEST.AFAIL, TEST.DATE, TEST.DATM, TEST.ZTE, TEST.ZTST);
|
||||||
|
|
||||||
fprintf(fp, "FBA\n"
|
fprintf(fp, "FBA\n"
|
||||||
"\tFBA:%d\n\n"
|
"\tFBA:%u\n\n"
|
||||||
, FBA.FBA);
|
, FBA.FBA);
|
||||||
|
|
||||||
fprintf(fp, "FRAME\n"
|
fprintf(fp, "FRAME\n"
|
||||||
"\tFBP (*32):0x%x\n"
|
"\tFBP (*32):0x%x\n"
|
||||||
"\tFBW:%d\n"
|
"\tFBW:%u\n"
|
||||||
"\tPSM:0x%x\n"
|
"\tPSM:0x%x\n"
|
||||||
"\tFBMSK:0x%x\n\n"
|
"\tFBMSK:0x%x\n\n"
|
||||||
, FRAME.FBP*32, FRAME.FBW, FRAME.PSM, FRAME.FBMSK);
|
, FRAME.FBP*32, FRAME.FBW, FRAME.PSM, FRAME.FBMSK);
|
||||||
|
@ -225,7 +225,7 @@ public:
|
||||||
fprintf(fp, "ZBUF\n"
|
fprintf(fp, "ZBUF\n"
|
||||||
"\tZBP (*32):0x%x\n"
|
"\tZBP (*32):0x%x\n"
|
||||||
"\tPSM:0x%x\n"
|
"\tPSM:0x%x\n"
|
||||||
"\tZMSK:%d\n\n"
|
"\tZMSK:%u\n\n"
|
||||||
, ZBUF.ZBP*32, ZBUF.PSM, ZBUF.ZMSK);
|
, ZBUF.ZBP*32, ZBUF.PSM, ZBUF.ZMSK);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
|
@ -91,54 +91,54 @@ public:
|
||||||
if (!fp) return;
|
if (!fp) return;
|
||||||
|
|
||||||
fprintf(fp, "PRIM\n"
|
fprintf(fp, "PRIM\n"
|
||||||
"\tPRIM:%d\n"
|
"\tPRIM:%u\n"
|
||||||
"\tIIP:%d\n"
|
"\tIIP:%u\n"
|
||||||
"\tTME:%d\n"
|
"\tTME:%u\n"
|
||||||
"\tFGE:%d\n"
|
"\tFGE:%u\n"
|
||||||
"\tABE:%d\n"
|
"\tABE:%u\n"
|
||||||
"\tAA1:%d\n"
|
"\tAA1:%u\n"
|
||||||
"\tFST:%d\n"
|
"\tFST:%u\n"
|
||||||
"\tCTXT:%d\n"
|
"\tCTXT:%u\n"
|
||||||
"\tFIX:%d\n\n"
|
"\tFIX:%u\n\n"
|
||||||
, PRIM.PRIM, PRIM.IIP, PRIM.TME, PRIM.FGE, PRIM.ABE, PRIM.AA1, PRIM.FST, PRIM.CTXT, PRIM.FIX);
|
, PRIM.PRIM, PRIM.IIP, PRIM.TME, PRIM.FGE, PRIM.ABE, PRIM.AA1, PRIM.FST, PRIM.CTXT, PRIM.FIX);
|
||||||
|
|
||||||
fprintf(fp, "PRMODE (when AC=0)\n"
|
fprintf(fp, "PRMODE (when AC=0)\n"
|
||||||
"\t_PRIM:%d\n"
|
"\t_PRIM:%u\n"
|
||||||
"\tIIP:%d\n"
|
"\tIIP:%u\n"
|
||||||
"\tTME:%d\n"
|
"\tTME:%u\n"
|
||||||
"\tFGE:%d\n"
|
"\tFGE:%u\n"
|
||||||
"\tABE:%d\n"
|
"\tABE:%u\n"
|
||||||
"\tAA1:%d\n"
|
"\tAA1:%u\n"
|
||||||
"\tFST:%d\n"
|
"\tFST:%u\n"
|
||||||
"\tCTXT:%d\n"
|
"\tCTXT:%u\n"
|
||||||
"\tFIX:%d\n\n"
|
"\tFIX:%u\n\n"
|
||||||
, PRMODE._PRIM, PRMODE.IIP, PRMODE.TME, PRMODE.FGE, PRMODE.ABE, PRMODE.AA1, PRMODE.FST, PRMODE.CTXT, PRMODE.FIX);
|
, PRMODE._PRIM, PRMODE.IIP, PRMODE.TME, PRMODE.FGE, PRMODE.ABE, PRMODE.AA1, PRMODE.FST, PRMODE.CTXT, PRMODE.FIX);
|
||||||
|
|
||||||
fprintf(fp, "PRMODECONT\n"
|
fprintf(fp, "PRMODECONT\n"
|
||||||
"\tAC:%d\n\n"
|
"\tAC:%u\n\n"
|
||||||
, PRMODECONT.AC);
|
, PRMODECONT.AC);
|
||||||
|
|
||||||
fprintf(fp, "TEXCLUT\n"
|
fprintf(fp, "TEXCLUT\n"
|
||||||
"\tCOU:%d\n"
|
"\tCOU:%u\n"
|
||||||
"\tCBW:%d\n"
|
"\tCBW:%u\n"
|
||||||
"\tCOV:%d\n\n"
|
"\tCOV:%u\n\n"
|
||||||
, TEXCLUT.COU, TEXCLUT.CBW, TEXCLUT.COV);
|
, TEXCLUT.COU, TEXCLUT.CBW, TEXCLUT.COV);
|
||||||
|
|
||||||
fprintf(fp, "SCANMSK\n"
|
fprintf(fp, "SCANMSK\n"
|
||||||
"\tMSK:%d\n\n"
|
"\tMSK:%u\n\n"
|
||||||
"\n"
|
"\n"
|
||||||
, SCANMSK.MSK);
|
, SCANMSK.MSK);
|
||||||
|
|
||||||
fprintf(fp, "TEXA\n"
|
fprintf(fp, "TEXA\n"
|
||||||
"\tAEM:%d\n"
|
"\tAEM:%u\n"
|
||||||
"\tTA0:%d\n"
|
"\tTA0:%u\n"
|
||||||
"\tTA1:%d\n\n"
|
"\tTA1:%u\n\n"
|
||||||
, TEXA.AEM, TEXA.TA0, TEXA.TA1);
|
, TEXA.AEM, TEXA.TA0, TEXA.TA1);
|
||||||
|
|
||||||
fprintf(fp, "FOGCOL\n"
|
fprintf(fp, "FOGCOL\n"
|
||||||
"\tFCG:%d\n"
|
"\tFCG:%u\n"
|
||||||
"\tFCB:%d\n"
|
"\tFCB:%u\n"
|
||||||
"\tFCR:%d\n\n"
|
"\tFCR:%u\n\n"
|
||||||
, FOGCOL.FCG, FOGCOL.FCB, FOGCOL.FCR);
|
, FOGCOL.FCG, FOGCOL.FCB, FOGCOL.FCR);
|
||||||
|
|
||||||
fprintf(fp, "DIMX\n"
|
fprintf(fp, "DIMX\n"
|
||||||
|
@ -161,42 +161,42 @@ public:
|
||||||
, DIMX.DM22, DIMX.DM23, DIMX.DM31, DIMX.DM02, DIMX.DM21, DIMX.DM12, DIMX.DM03, DIMX.DM01, DIMX.DM33, DIMX.DM30, DIMX.DM11, DIMX.DM10, DIMX.DM20, DIMX.DM32, DIMX.DM00, DIMX.DM13);
|
, DIMX.DM22, DIMX.DM23, DIMX.DM31, DIMX.DM02, DIMX.DM21, DIMX.DM12, DIMX.DM03, DIMX.DM01, DIMX.DM33, DIMX.DM30, DIMX.DM11, DIMX.DM10, DIMX.DM20, DIMX.DM32, DIMX.DM00, DIMX.DM13);
|
||||||
|
|
||||||
fprintf(fp, "DTHE\n"
|
fprintf(fp, "DTHE\n"
|
||||||
"\tDTHE:%d\n\n"
|
"\tDTHE:%u\n\n"
|
||||||
, DTHE.DTHE);
|
, DTHE.DTHE);
|
||||||
|
|
||||||
fprintf(fp, "COLCLAMP\n"
|
fprintf(fp, "COLCLAMP\n"
|
||||||
"\tCLAMP:%d\n\n"
|
"\tCLAMP:%u\n\n"
|
||||||
, COLCLAMP.CLAMP);
|
, COLCLAMP.CLAMP);
|
||||||
|
|
||||||
fprintf(fp, "PABE\n"
|
fprintf(fp, "PABE\n"
|
||||||
"\tPABE:%d\n\n"
|
"\tPABE:%u\n\n"
|
||||||
, PABE.PABE);
|
, PABE.PABE);
|
||||||
|
|
||||||
fprintf(fp, "BITBLTBUF\n"
|
fprintf(fp, "BITBLTBUF\n"
|
||||||
"\tSBW:%d\n"
|
"\tSBW:%u\n"
|
||||||
"\tSBP:0x%x\n"
|
"\tSBP:0x%x\n"
|
||||||
"\tSPSM:%d\n"
|
"\tSPSM:%u\n"
|
||||||
"\tDBW:%d\n"
|
"\tDBW:%u\n"
|
||||||
"\tDPSM:%d\n"
|
"\tDPSM:%u\n"
|
||||||
"\tDBP:0x%x\n\n"
|
"\tDBP:0x%x\n\n"
|
||||||
, BITBLTBUF.SBW, BITBLTBUF.SBP, BITBLTBUF.SPSM, BITBLTBUF.DBW, BITBLTBUF.DPSM, BITBLTBUF.DBP);
|
, BITBLTBUF.SBW, BITBLTBUF.SBP, BITBLTBUF.SPSM, BITBLTBUF.DBW, BITBLTBUF.DPSM, BITBLTBUF.DBP);
|
||||||
|
|
||||||
fprintf(fp, "TRXDIR\n"
|
fprintf(fp, "TRXDIR\n"
|
||||||
"\tXDIR:%d\n\n"
|
"\tXDIR:%u\n\n"
|
||||||
, TRXDIR.XDIR);
|
, TRXDIR.XDIR);
|
||||||
|
|
||||||
fprintf(fp, "TRXPOS\n"
|
fprintf(fp, "TRXPOS\n"
|
||||||
"\tDIRY:%d\n"
|
"\tDIRY:%u\n"
|
||||||
"\tSSAY:%d\n"
|
"\tSSAY:%u\n"
|
||||||
"\tSSAX:%d\n"
|
"\tSSAX:%u\n"
|
||||||
"\tDIRX:%d\n"
|
"\tDIRX:%u\n"
|
||||||
"\tDSAX:%d\n"
|
"\tDSAX:%u\n"
|
||||||
"\tDSAY:%d\n\n"
|
"\tDSAY:%u\n\n"
|
||||||
, TRXPOS.DIRY, TRXPOS.SSAY, TRXPOS.SSAX, TRXPOS.DIRX, TRXPOS.DSAX, TRXPOS.DSAY);
|
, TRXPOS.DIRY, TRXPOS.SSAY, TRXPOS.SSAX, TRXPOS.DIRX, TRXPOS.DSAX, TRXPOS.DSAY);
|
||||||
|
|
||||||
fprintf(fp, "TRXREG\n"
|
fprintf(fp, "TRXREG\n"
|
||||||
"\tRRH:%d\n"
|
"\tRRH:%u\n"
|
||||||
"\tRRW:%d\n\n"
|
"\tRRW:%u\n\n"
|
||||||
, TRXREG.RRH, TRXREG.RRW);
|
, TRXREG.RRH, TRXREG.RRW);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
|
@ -131,7 +131,7 @@ public:
|
||||||
uint64 tpf = p->frames > 0 ? p->ticks / p->frames : 0;
|
uint64 tpf = p->frames > 0 ? p->ticks / p->frames : 0;
|
||||||
uint64 ppf = p->frames > 0 ? p->actual / p->frames : 0;
|
uint64 ppf = p->frames > 0 ? p->actual / p->frames : 0;
|
||||||
|
|
||||||
printf("[%014llx]%c %6.2f%% %5.2f%% f %4lld t %12lld p %12lld w %12lld tpp %4lld tpf %9lld ppf %9lld\n",
|
printf("[%014llx]%c %6.2f%% %5.2f%% f %4llu t %12llu p %12llu w %12lld tpp %4llu tpf %9llu ppf %9llu\n",
|
||||||
(uint64)key, m_map.find(key) == m_map.end() ? '*' : ' ',
|
(uint64)key, m_map.find(key) == m_map.end() ? '*' : ' ',
|
||||||
(float)(tpf * 10000 / 34000000) / 100,
|
(float)(tpf * 10000 / 34000000) / 100,
|
||||||
(float)(tpf * 10000 / ttpf) / 100,
|
(float)(tpf * 10000 / ttpf) / 100,
|
||||||
|
|
|
@ -747,7 +747,7 @@ void GSRendererCS::Write(GSOffset* off, const GSVector4i& r)
|
||||||
ctx->UpdateSubresource(m_vm, 0, &box, m_mem.m_vm8 + page * PAGE_SIZE, 0, 0);
|
ctx->UpdateSubresource(m_vm, 0, &box, m_mem.m_vm8 + page * PAGE_SIZE, 0, 0);
|
||||||
*/
|
*/
|
||||||
if(0)
|
if(0)
|
||||||
printf("[%lld] write %05x %d %d (%d)\n", __rdtsc(), off->bp, off->bw, off->psm, page);
|
printf("[%lld] write %05x %u %u (%u)\n", __rdtsc(), off->bp, off->bw, off->psm, page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -807,7 +807,7 @@ void GSRendererCS::Read(GSOffset* off, const GSVector4i& r, bool invalidate)
|
||||||
ctx->Unmap(m_pb, 0);
|
ctx->Unmap(m_pb, 0);
|
||||||
|
|
||||||
if(0)
|
if(0)
|
||||||
printf("[%lld] read %05x %d %d (%d)\n", __rdtsc(), off->bp, off->bw, off->psm, page);
|
printf("[%lld] read %05x %u %u (%u)\n", __rdtsc(), off->bp, off->bw, off->psm, page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ void GSRendererSW::VSync(int field)
|
||||||
|
|
||||||
if(0) if(LOG)
|
if(0) if(LOG)
|
||||||
{
|
{
|
||||||
fprintf(s_fp, "%lld\n", m_perfmon.GetFrame());
|
fprintf(s_fp, "%llu\n", m_perfmon.GetFrame());
|
||||||
|
|
||||||
GSVector4i dr = GetDisplayRect();
|
GSVector4i dr = GetDisplayRect();
|
||||||
GSVector4i fr = GetFrameRect();
|
GSVector4i fr = GetFrameRect();
|
||||||
|
@ -117,7 +117,7 @@ void GSRendererSW::VSync(int field)
|
||||||
if(i == 0 && !m_regs->PMODE.EN1) continue;
|
if(i == 0 && !m_regs->PMODE.EN1) continue;
|
||||||
if(i == 1 && !m_regs->PMODE.EN2) continue;
|
if(i == 1 && !m_regs->PMODE.EN2) continue;
|
||||||
|
|
||||||
fprintf(s_fp, "DISPFB[%d] BP=%05x BW=%d PSM=%d DBX=%d DBY=%d\n",
|
fprintf(s_fp, "DISPFB[%d] BP=%05x BW=%d PSM=%d DBX=%d DBY=%d\n",
|
||||||
i,
|
i,
|
||||||
m_regs->DISP[i].DISPFB.Block(),
|
m_regs->DISP[i].DISPFB.Block(),
|
||||||
m_regs->DISP[i].DISPFB.FBW,
|
m_regs->DISP[i].DISPFB.FBW,
|
||||||
|
@ -126,7 +126,7 @@ void GSRendererSW::VSync(int field)
|
||||||
m_regs->DISP[i].DISPFB.DBY
|
m_regs->DISP[i].DISPFB.DBY
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "DISPLAY[%d] DX=%d DY=%d DW=%d DH=%d MAGH=%d MAGV=%d\n",
|
fprintf(s_fp, "DISPLAY[%d] DX=%d DY=%d DW=%d DH=%d MAGH=%d MAGV=%d\n",
|
||||||
i,
|
i,
|
||||||
m_regs->DISP[i].DISPLAY.DX,
|
m_regs->DISP[i].DISPLAY.DX,
|
||||||
m_regs->DISP[i].DISPLAY.DY,
|
m_regs->DISP[i].DISPLAY.DY,
|
||||||
|
@ -137,7 +137,7 @@ void GSRendererSW::VSync(int field)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(s_fp, "PMODE EN1=%d EN2=%d CRTMD=%d MMOD=%d AMOD=%d SLBG=%d ALP=%d\n",
|
fprintf(s_fp, "PMODE EN1=%u EN2=%u CRTMD=%u MMOD=%u AMOD=%u SLBG=%u ALP=%u\n",
|
||||||
m_regs->PMODE.EN1,
|
m_regs->PMODE.EN1,
|
||||||
m_regs->PMODE.EN2,
|
m_regs->PMODE.EN2,
|
||||||
m_regs->PMODE.CRTMD,
|
m_regs->PMODE.CRTMD,
|
||||||
|
@ -147,7 +147,7 @@ void GSRendererSW::VSync(int field)
|
||||||
m_regs->PMODE.ALP
|
m_regs->PMODE.ALP
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "SMODE1 CLKSEL=%d CMOD=%d EX=%d GCONT=%d LC=%d NVCK=%d PCK2=%d PEHS=%d PEVS=%d PHS=%d PRST=%d PVS=%d RC=%d SINT=%d SLCK=%d SLCK2=%d SPML=%d T1248=%d VCKSEL=%d VHP=%d XPCK=%d\n",
|
fprintf(s_fp, "SMODE1 CLKSEL=%u CMOD=%u EX=%u GCONT=%u LC=%u NVCK=%u PCK2=%u PEHS=%u PEVS=%u PHS=%u PRST=%u PVS=%u RC=%u SINT=%u SLCK=%u SLCK2=%u SPML=%u T1248=%u VCKSEL=%u VHP=%u XPCK=%u\n",
|
||||||
m_regs->SMODE1.CLKSEL,
|
m_regs->SMODE1.CLKSEL,
|
||||||
m_regs->SMODE1.CMOD,
|
m_regs->SMODE1.CMOD,
|
||||||
m_regs->SMODE1.EX,
|
m_regs->SMODE1.EX,
|
||||||
|
@ -171,33 +171,33 @@ void GSRendererSW::VSync(int field)
|
||||||
m_regs->SMODE1.XPCK
|
m_regs->SMODE1.XPCK
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "SMODE2 INT=%d FFMD=%d DPMS=%d\n",
|
fprintf(s_fp, "SMODE2 INT=%u FFMD=%u DPMS=%u\n",
|
||||||
m_regs->SMODE2.INT,
|
m_regs->SMODE2.INT,
|
||||||
m_regs->SMODE2.FFMD,
|
m_regs->SMODE2.FFMD,
|
||||||
m_regs->SMODE2.DPMS
|
m_regs->SMODE2.DPMS
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "SRFSH %08x_%08x\n",
|
fprintf(s_fp, "SRFSH %08x_%08x\n",
|
||||||
m_regs->SRFSH.u32[0],
|
m_regs->SRFSH.u32[0],
|
||||||
m_regs->SRFSH.u32[1]
|
m_regs->SRFSH.u32[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "SYNCH1 %08x_%08x\n",
|
fprintf(s_fp, "SYNCH1 %08x_%08x\n",
|
||||||
m_regs->SYNCH1.u32[0],
|
m_regs->SYNCH1.u32[0],
|
||||||
m_regs->SYNCH1.u32[1]
|
m_regs->SYNCH1.u32[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "SYNCH2 %08x_%08x\n",
|
fprintf(s_fp, "SYNCH2 %08x_%08x\n",
|
||||||
m_regs->SYNCH2.u32[0],
|
m_regs->SYNCH2.u32[0],
|
||||||
m_regs->SYNCH2.u32[1]
|
m_regs->SYNCH2.u32[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "SYNCV %08x_%08x\n",
|
fprintf(s_fp, "SYNCV %08x_%08x\n",
|
||||||
m_regs->SYNCV.u32[0],
|
m_regs->SYNCV.u32[0],
|
||||||
m_regs->SYNCV.u32[1]
|
m_regs->SYNCV.u32[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
fprintf(s_fp, "CSR %08x_%08x\n",
|
fprintf(s_fp, "CSR %08x_%08x\n",
|
||||||
m_regs->CSR.u32[0],
|
m_regs->CSR.u32[0],
|
||||||
m_regs->CSR.u32[1]
|
m_regs->CSR.u32[1]
|
||||||
);
|
);
|
||||||
|
@ -648,7 +648,7 @@ void GSRendererSW::Queue(shared_ptr<GSRasterizerData>& item)
|
||||||
{
|
{
|
||||||
GSScanlineGlobalData& gd = ((SharedData*)item.get())->global;
|
GSScanlineGlobalData& gd = ((SharedData*)item.get())->global;
|
||||||
|
|
||||||
fprintf(s_fp, "[%d] queue %05x %d (%d) %05x %d (%d) %05x %d %dx%d (%d %d %d) | %d %d %d\n",
|
fprintf(s_fp, "[%d] queue %05x %d (%d) %05x %d (%d) %05x %d %dx%d (%d %d %d) | %u %d %d\n",
|
||||||
sd->counter,
|
sd->counter,
|
||||||
m_context->FRAME.Block(), m_context->FRAME.PSM, gd.sel.fwrite,
|
m_context->FRAME.Block(), m_context->FRAME.PSM, gd.sel.fwrite,
|
||||||
m_context->ZBUF.Block(), m_context->ZBUF.PSM, gd.sel.zwrite,
|
m_context->ZBUF.Block(), m_context->ZBUF.PSM, gd.sel.zwrite,
|
||||||
|
@ -708,14 +708,14 @@ void GSRendererSW::Sync(int reason)
|
||||||
|
|
||||||
int pixels = m_rl->GetPixels();
|
int pixels = m_rl->GetPixels();
|
||||||
|
|
||||||
if(LOG) {fprintf(s_fp, "sync n=%d r=%d t=%lld p=%d %c\n", s_n, reason, t, pixels, t > 10000000 ? '*' : ' '); fflush(s_fp);}
|
if(LOG) {fprintf(s_fp, "sync n=%d r=%d t=%llu p=%d %c\n", s_n, reason, t, pixels, t > 10000000 ? '*' : ' '); fflush(s_fp);}
|
||||||
|
|
||||||
m_perfmon.Put(GSPerfMon::Fillrate, pixels);
|
m_perfmon.Put(GSPerfMon::Fillrate, pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSRendererSW::InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r)
|
void GSRendererSW::InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r)
|
||||||
{
|
{
|
||||||
if(LOG) {fprintf(s_fp, "w %05x %d %d, %d %d %d %d\n", BITBLTBUF.DBP, BITBLTBUF.DBW, BITBLTBUF.DPSM, r.x, r.y, r.z, r.w); fflush(s_fp);}
|
if(LOG) {fprintf(s_fp, "w %05x %u %u, %d %d %d %d\n", BITBLTBUF.DBP, BITBLTBUF.DBW, BITBLTBUF.DPSM, r.x, r.y, r.z, r.w); fflush(s_fp);}
|
||||||
|
|
||||||
GSOffset* off = m_mem.GetOffset(BITBLTBUF.DBP, BITBLTBUF.DBW, BITBLTBUF.DPSM);
|
GSOffset* off = m_mem.GetOffset(BITBLTBUF.DBP, BITBLTBUF.DBW, BITBLTBUF.DPSM);
|
||||||
|
|
||||||
|
@ -741,7 +741,7 @@ void GSRendererSW::InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const GS
|
||||||
|
|
||||||
void GSRendererSW::InvalidateLocalMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r, bool clut)
|
void GSRendererSW::InvalidateLocalMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r, bool clut)
|
||||||
{
|
{
|
||||||
if(LOG) {fprintf(s_fp, "%s %05x %d %d, %d %d %d %d\n", clut ? "rp" : "r", BITBLTBUF.SBP, BITBLTBUF.SBW, BITBLTBUF.SPSM, r.x, r.y, r.z, r.w); fflush(s_fp);}
|
if(LOG) {fprintf(s_fp, "%s %05x %u %u, %d %d %d %d\n", clut ? "rp" : "r", BITBLTBUF.SBP, BITBLTBUF.SBW, BITBLTBUF.SPSM, r.x, r.y, r.z, r.w); fflush(s_fp);}
|
||||||
|
|
||||||
if(!m_rl->IsSynced())
|
if(!m_rl->IsSynced())
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ GSShaderOGL::GSShaderOGL(bool debug) :
|
||||||
|
|
||||||
GSShaderOGL::~GSShaderOGL()
|
GSShaderOGL::~GSShaderOGL()
|
||||||
{
|
{
|
||||||
printf("Delete %d Shaders, %d Programs, %d Pipelines\n",
|
printf("Delete %zu Shaders, %zu Programs, %zu Pipelines\n",
|
||||||
m_shad_to_delete.size(), m_prog_to_delete.size(), m_pipe_to_delete.size());
|
m_shad_to_delete.size(), m_prog_to_delete.size(), m_pipe_to_delete.size());
|
||||||
|
|
||||||
for (auto s : m_shad_to_delete) glDeleteShader(s);
|
for (auto s : m_shad_to_delete) glDeleteShader(s);
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace PboPool {
|
||||||
m_size = size;
|
m_size = size;
|
||||||
|
|
||||||
if (m_size > m_pbo_size) {
|
if (m_size > m_pbo_size) {
|
||||||
fprintf(stderr, "BUG: PBO too small %d but need %d\n", m_pbo_size, m_size);
|
fprintf(stderr, "BUG: PBO too small %u but need %u\n", m_pbo_size, m_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: texsubimage will access currently bound buffer
|
// Note: texsubimage will access currently bound buffer
|
||||||
|
|
|
@ -109,7 +109,7 @@ class GSBufferOGL {
|
||||||
size_t current_chunk = offset >> 21;
|
size_t current_chunk = offset >> 21;
|
||||||
#ifdef ENABLE_OGL_DEBUG_FENCE
|
#ifdef ENABLE_OGL_DEBUG_FENCE
|
||||||
fprintf(stderr, "%x: Wrap buffer\n", m_target);
|
fprintf(stderr, "%x: Wrap buffer\n", m_target);
|
||||||
fprintf(stderr, "%x: Insert a fence in chunk %d\n", m_target, current_chunk);
|
fprintf(stderr, "%x: Insert a fence in chunk %zu\n", m_target, current_chunk);
|
||||||
#endif
|
#endif
|
||||||
ASSERT(current_chunk > 0 && current_chunk < 5);
|
ASSERT(current_chunk > 0 && current_chunk < 5);
|
||||||
if (m_fence[current_chunk] == 0) {
|
if (m_fence[current_chunk] == 0) {
|
||||||
|
|
Loading…
Reference in New Issue