summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWStatistics.h
blob: 6b343ca44b3b30b068f916c614d6439a8e5ad682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2009 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include "Common/CommonTypes.h"
#include "VideoBackends/Software/SWVideoConfig.h"

#pragma once

struct SWStatistics
{
	struct ThisFrame
	{
		u32 numDrawnObjects;
		u32 numPrimatives;
		u32 numVerticesLoaded;
		u32 numVerticesOut;

		u32 numTrianglesIn;
		u32 numTrianglesRejected;
		u32 numTrianglesCulled;
		u32 numTrianglesClipped;
		u32 numTrianglesDrawn;

		u32 rasterizedPixels;
		u32 tevPixelsIn;
		u32 tevPixelsOut;
	};

	u32 frameCount;
	SWStatistics();

	ThisFrame thisFrame;
	void ResetFrame();
};

extern SWStatistics swstats;

#if (STATISTICS)
#define INCSTAT(a) (a)++;
#define ADDSTAT(a,b) (a)+=(b);
#define SETSTAT(a,x) (a)=(int)(x);
#else
#define INCSTAT(a) ;
#define ADDSTAT(a,b) ;
#define SETSTAT(a,x) ;
#endif