mirror of https://github.com/PCSX2/pcsx2.git
GS: Fix prim count in SW renderer debug stats
Previously was actually draw count, not prim count
This commit is contained in:
parent
8123cc27db
commit
91f1eca95e
|
@ -80,7 +80,7 @@ public:
|
|||
return m_active->f;
|
||||
}
|
||||
|
||||
void UpdateStats(uint64 frame, uint64 ticks, int actual, int total)
|
||||
void UpdateStats(uint64 frame, uint64 ticks, int actual, int total, int prims)
|
||||
{
|
||||
if (m_active)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ public:
|
|||
m_active->frames++;
|
||||
}
|
||||
|
||||
m_active->prims++;
|
||||
m_active->prims += prims;
|
||||
m_active->ticks += ticks;
|
||||
m_active->actual += actual;
|
||||
m_active->total += total;
|
||||
|
|
|
@ -103,9 +103,9 @@ void GSDrawScanline::BeginDraw(const GSRasterizerData* data)
|
|||
m_sp = m_sp_map[sel];
|
||||
}
|
||||
|
||||
void GSDrawScanline::EndDraw(uint64 frame, uint64 ticks, int actual, int total)
|
||||
void GSDrawScanline::EndDraw(uint64 frame, uint64 ticks, int actual, int total, int prims)
|
||||
{
|
||||
m_ds_map.UpdateStats(frame, ticks, actual, total);
|
||||
m_ds_map.UpdateStats(frame, ticks, actual, total, prims);
|
||||
}
|
||||
|
||||
#ifndef ENABLE_JIT_RASTERIZER
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
// IDrawScanline
|
||||
|
||||
void BeginDraw(const GSRasterizerData* data);
|
||||
void EndDraw(uint64 frame, uint64 ticks, int actual, int total);
|
||||
void EndDraw(uint64 frame, uint64 ticks, int actual, int total, int prims);
|
||||
|
||||
void DrawRect(const GSVector4i& r, const GSVertexSW& v);
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ GSRasterizer::GSRasterizer(IDrawScanline* ds, int id, int threads, GSPerfMon* pe
|
|||
, m_threads(threads)
|
||||
{
|
||||
memset(&m_pixels, 0, sizeof(m_pixels));
|
||||
m_primcount = 0;
|
||||
|
||||
m_thread_height = compute_best_thread_height(threads);
|
||||
|
||||
|
@ -138,6 +139,7 @@ void GSRasterizer::Draw(GSRasterizerData* data)
|
|||
|
||||
m_pixels.actual = 0;
|
||||
m_pixels.total = 0;
|
||||
m_primcount = 0;
|
||||
|
||||
data->start = GetCPUTicks();
|
||||
|
||||
|
@ -249,12 +251,14 @@ void GSRasterizer::Draw(GSRasterizerData* data)
|
|||
|
||||
m_pixels.sum += m_pixels.actual;
|
||||
|
||||
m_ds->EndDraw(data->frame, ticks, m_pixels.actual, m_pixels.total);
|
||||
m_ds->EndDraw(data->frame, ticks, m_pixels.actual, m_pixels.total, m_primcount);
|
||||
}
|
||||
|
||||
template <bool scissor_test>
|
||||
void GSRasterizer::DrawPoint(const GSVertexSW* vertex, int vertex_count, const uint32* index, int index_count)
|
||||
{
|
||||
m_primcount++;
|
||||
|
||||
if (index != NULL)
|
||||
{
|
||||
for (int i = 0; i < index_count; i++, index++)
|
||||
|
@ -299,6 +303,8 @@ void GSRasterizer::DrawPoint(const GSVertexSW* vertex, int vertex_count, const u
|
|||
|
||||
void GSRasterizer::DrawLine(const GSVertexSW* vertex, const uint32* index)
|
||||
{
|
||||
m_primcount++;
|
||||
|
||||
const GSVertexSW& v0 = vertex[index[0]];
|
||||
const GSVertexSW& v1 = vertex[index[1]];
|
||||
|
||||
|
@ -415,6 +421,8 @@ static const uint8 s_ysort[8][4] =
|
|||
|
||||
void GSRasterizer::DrawTriangle(const GSVertexSW* vertex, const uint32* index)
|
||||
{
|
||||
m_primcount++;
|
||||
|
||||
GSVertexSW2 dv[3];
|
||||
GSVertexSW2 edge;
|
||||
GSVertexSW2 dedge;
|
||||
|
@ -606,6 +614,8 @@ void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW2& edge, c
|
|||
|
||||
void GSRasterizer::DrawTriangle(const GSVertexSW* vertex, const uint32* index)
|
||||
{
|
||||
m_primcount++;
|
||||
|
||||
GSVertexSW dv[3];
|
||||
GSVertexSW edge;
|
||||
GSVertexSW dedge;
|
||||
|
@ -799,6 +809,8 @@ void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW& edge, co
|
|||
|
||||
void GSRasterizer::DrawSprite(const GSVertexSW* vertex, const uint32* index)
|
||||
{
|
||||
m_primcount++;
|
||||
|
||||
const GSVertexSW& v0 = vertex[index[0]];
|
||||
const GSVertexSW& v1 = vertex[index[1]];
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
virtual ~IDrawScanline() {}
|
||||
|
||||
virtual void BeginDraw(const GSRasterizerData* data) = 0;
|
||||
virtual void EndDraw(uint64 frame, uint64 ticks, int actual, int total) = 0;
|
||||
virtual void EndDraw(uint64 frame, uint64 ticks, int actual, int total, int prims) = 0;
|
||||
|
||||
#ifdef ENABLE_JIT_RASTERIZER
|
||||
|
||||
|
@ -137,6 +137,7 @@ protected:
|
|||
GSVector4 m_fscissor_y;
|
||||
struct { GSVertexSW* buff; int count; } m_edge;
|
||||
struct { int sum, actual, total; } m_pixels;
|
||||
int m_primcount;
|
||||
|
||||
typedef void (GSRasterizer::*DrawPrimPtr)(const GSVertexSW* v, int count);
|
||||
|
||||
|
|
Loading…
Reference in New Issue