Files
dolphin/Source/Core/VideoCommon/Statistics.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

97 lines
2.0 KiB
C++
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2008-12-08 04:46:09 +00:00
#pragma once
#include <array>
#include <vector>
#include "VideoCommon/BPFunctions.h"
2008-07-12 17:40:22 +00:00
struct Statistics
{
int num_pixel_shaders_created;
int num_pixel_shaders_alive;
int num_vertex_shaders_created;
int num_vertex_shaders_alive;
2008-12-08 04:46:09 +00:00
int num_textures_created;
int num_textures_uploaded;
int num_textures_alive;
2008-12-08 04:46:09 +00:00
int num_vertex_loaders;
2008-12-08 04:46:09 +00:00
std::array<float, 6> proj;
std::array<float, 16> gproj;
std::array<float, 16> g2proj;
2009-02-15 20:49:59 +00:00
std::vector<BPFunctions::ScissorResult> scissors;
size_t current_scissor = 0; // 0 => all, otherwise index + 1
int scissor_scale = 10;
int scissor_expected_count = 0;
bool allow_duplicate_scissors = false;
bool show_scissors = true;
bool show_raw_scissors = true;
bool show_viewports = false;
bool show_text = true;
struct ThisFrame
{
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;
2008-12-08 04:46:09 +00:00
int num_primitive_joins;
int num_draw_calls;
2008-12-08 04:46:09 +00:00
int num_dlists_called;
int bytes_vertex_streamed;
int bytes_index_streamed;
int bytes_uniform_streamed;
2015-10-09 20:50:36 +02:00
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;
2019-03-04 01:25:33 +00:00
int num_efb_peeks;
int num_efb_pokes;
};
ThisFrame this_frame;
void ResetFrame();
void SwapDL();
void AddScissorRect();
void Display() const;
void DisplayProj() const;
void DisplayScissor();
2008-07-12 17:40:22 +00:00
};
2008-12-08 04:46:09 +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);
#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