summaryrefslogtreecommitdiff
path: root/src/video_core/debug_utils
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-07-26 06:55:47 -0300
committerGravatar Yuri Kunde Schlesner2015-07-26 06:55:47 -0300
commit13347997ba59aa578d61d5d1ac723ad00953bd96 (patch)
treea84e55883de37980072ce427ed1ced68fe80036b /src/video_core/debug_utils
parentMerge pull request #990 from lioncash/arm (diff)
downloadyuzu-13347997ba59aa578d61d5d1ac723ad00953bd96.tar.gz
yuzu-13347997ba59aa578d61d5d1ac723ad00953bd96.tar.xz
yuzu-13347997ba59aa578d61d5d1ac723ad00953bd96.zip
VideoCore: #ifdef out some debugging routines
Some disabled debugging functionality was being called from rendering routines in VideoCore. Although disabled, many of them still allocated memory or did some extra work that was enough to show up in a profiler. Gives a slight (~2ms) speedup.
Diffstat (limited to 'src/video_core/debug_utils')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp12
-rw-r--r--src/video_core/debug_utils/debug_utils.h5
2 files changed, 5 insertions, 12 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index c3f8321c6..e9a858411 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -90,10 +90,6 @@ void GeometryDumper::AddTriangle(Vertex& v0, Vertex& v1, Vertex& v2) {
90} 90}
91 91
92void GeometryDumper::Dump() { 92void GeometryDumper::Dump() {
93 // NOTE: Permanently enabling this just trashes the hard disk for no reason.
94 // Hence, this is currently disabled.
95 return;
96
97 static int index = 0; 93 static int index = 0;
98 std::string filename = std::string("geometry_dump") + std::to_string(++index) + ".obj"; 94 std::string filename = std::string("geometry_dump") + std::to_string(++index) + ".obj";
99 95
@@ -116,10 +112,6 @@ void GeometryDumper::Dump() {
116void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data, u32 swizzle_size, 112void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data, u32 swizzle_size,
117 u32 main_offset, const Regs::VSOutputAttributes* output_attributes) 113 u32 main_offset, const Regs::VSOutputAttributes* output_attributes)
118{ 114{
119 // NOTE: Permanently enabling this just trashes hard disks for no reason.
120 // Hence, this is currently disabled.
121 return;
122
123 struct StuffToWrite { 115 struct StuffToWrite {
124 u8* pointer; 116 u8* pointer;
125 u32 size; 117 u32 size;
@@ -565,10 +557,6 @@ TextureInfo TextureInfo::FromPicaRegister(const Regs::TextureConfig& config,
565} 557}
566 558
567void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) { 559void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) {
568 // NOTE: Permanently enabling this just trashes hard disks for no reason.
569 // Hence, this is currently disabled.
570 return;
571
572#ifndef HAVE_PNG 560#ifndef HAVE_PNG
573 return; 561 return;
574#else 562#else
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index 3f109dcb7..81eea30a9 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -157,6 +157,11 @@ extern std::shared_ptr<DebugContext> g_debug_context; // TODO: Get rid of this g
157 157
158namespace DebugUtils { 158namespace DebugUtils {
159 159
160#define PICA_DUMP_GEOMETRY 0
161#define PICA_DUMP_SHADERS 0
162#define PICA_DUMP_TEXTURES 0
163#define PICA_LOG_TEV 0
164
160// Simple utility class for dumping geometry data to an OBJ file 165// Simple utility class for dumping geometry data to an OBJ file
161class GeometryDumper { 166class GeometryDumper {
162public: 167public: