2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:09:55 +00:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-05-04 04:24:21 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-06-20 11:42:16 +00:00
|
|
|
#include <array>
|
|
|
|
|
2008-07-12 17:40:22 +00:00
|
|
|
struct Statistics
|
|
|
|
{
|
2019-07-11 03:11:14 +00:00
|
|
|
int num_pixel_shaders_created;
|
|
|
|
int num_pixel_shaders_alive;
|
|
|
|
int num_vertex_shaders_created;
|
|
|
|
int num_vertex_shaders_alive;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-07-11 03:11:14 +00:00
|
|
|
int num_textures_created;
|
|
|
|
int num_textures_uploaded;
|
|
|
|
int num_textures_alive;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-07-11 03:11:14 +00:00
|
|
|
int num_vertex_loaders;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-06-20 11:42:16 +00:00
|
|
|
std::array<float, 6> proj;
|
|
|
|
std::array<float, 16> gproj;
|
|
|
|
std::array<float, 16> g2proj;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2008-08-30 19:19:40 +00:00
|
|
|
struct ThisFrame
|
|
|
|
{
|
2019-07-11 03:11:14 +00:00
|
|
|
int num_bp_loads;
|
|
|
|
int num_cp_loads;
|
|
|
|
int num_xf_loads;
|
|
|
|
|
|
|
|
int num_bp_loads_in_dl;
|
|
|
|
int num_cp_loads_in_dl;
|
|
|
|
int num_xf_loads_in_dl;
|
|
|
|
|
|
|
|
int num_prims;
|
|
|
|
int num_dl_prims;
|
|
|
|
int num_shader_changes;
|
|
|
|
|
|
|
|
int num_primitive_joins;
|
|
|
|
int num_draw_calls;
|
|
|
|
|
|
|
|
int num_dlists_called;
|
|
|
|
|
|
|
|
int bytes_vertex_streamed;
|
|
|
|
int bytes_index_streamed;
|
|
|
|
int bytes_uniform_streamed;
|
|
|
|
|
|
|
|
int num_triangles_clipped;
|
|
|
|
int num_triangles_in;
|
|
|
|
int num_triangles_rejected;
|
|
|
|
int num_triangles_culled;
|
|
|
|
int num_drawn_objects;
|
|
|
|
int rasterized_pixels;
|
|
|
|
int num_triangles_drawn;
|
|
|
|
int num_vertices_loaded;
|
|
|
|
int tev_pixels_in;
|
|
|
|
int tev_pixels_out;
|
|
|
|
|
|
|
|
int num_efb_peeks;
|
|
|
|
int num_efb_pokes;
|
2008-08-30 19:19:40 +00:00
|
|
|
};
|
2019-07-11 03:11:14 +00:00
|
|
|
ThisFrame this_frame;
|
2008-10-22 20:54:40 +00:00
|
|
|
void ResetFrame();
|
2019-07-11 03:24:35 +00:00
|
|
|
void SwapDL();
|
|
|
|
void Display() const;
|
|
|
|
void DisplayProj() const;
|
2008-07-12 17:40:22 +00:00
|
|
|
};
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2019-07-11 03:34:50 +00:00
|
|
|
extern Statistics g_stats;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2008-07-12 17:40:22 +00:00
|
|
|
#define STATISTICS
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2008-07-12 17:40:22 +00:00
|
|
|
#ifdef STATISTICS
|
|
|
|
#define INCSTAT(a) (a)++;
|
|
|
|
#define ADDSTAT(a, b) (a) += (b);
|
2008-10-22 20:54:40 +00:00
|
|
|
#define SETSTAT(a, x) (a) = (int)(x);
|
2008-07-12 17:40:22 +00:00
|
|
|
#else
|
|
|
|
#define INCSTAT(a) ;
|
|
|
|
#define ADDSTAT(a, b) ;
|
|
|
|
#define SETSTAT(a, x) ;
|
|
|
|
#endif
|