From 34692ab826abc8f8faa61bdb2280b742424528f1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 7 Dec 2013 15:14:29 -0500 Subject: Remove unnecessary Src/ folders --- Source/Core/VideoCommon/Statistics.cpp | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Source/Core/VideoCommon/Statistics.cpp (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp new file mode 100644 index 0000000000..0c69499355 --- /dev/null +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -0,0 +1,99 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include + +#include "Statistics.h" +#include "VertexLoaderManager.h" + +Statistics stats; + +template +void Xchg(T& a, T&b) +{ + T c = a; + a = b; + b = c; +} + +void Statistics::ResetFrame() +{ + memset(&thisFrame, 0, sizeof(ThisFrame)); +} + +void Statistics::SwapDL() +{ + Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims); + Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads); + Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads); + Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); +} + +char *Statistics::ToString(char *ptr) +{ + char *p = ptr; + ptr+=sprintf(ptr,"Textures created: %i\n",stats.numTexturesCreated); + ptr+=sprintf(ptr,"Textures alive: %i\n",stats.numTexturesAlive); + ptr+=sprintf(ptr,"pshaders created: %i\n",stats.numPixelShadersCreated); + ptr+=sprintf(ptr,"pshaders alive: %i\n",stats.numPixelShadersAlive); + ptr+=sprintf(ptr,"pshaders (unique, delete cache first): %i\n",stats.numUniquePixelShaders); + ptr+=sprintf(ptr,"vshaders created: %i\n",stats.numVertexShadersCreated); + ptr+=sprintf(ptr,"vshaders alive: %i\n",stats.numVertexShadersAlive); + ptr+=sprintf(ptr,"dlists called: %i\n",stats.numDListsCalled); + ptr+=sprintf(ptr,"dlists called(f): %i\n",stats.thisFrame.numDListsCalled); + ptr+=sprintf(ptr,"dlists alive: %i\n",stats.numDListsAlive); + ptr+=sprintf(ptr,"Primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins); + ptr+=sprintf(ptr,"Draw calls: %i\n",stats.thisFrame.numDrawCalls); + ptr+=sprintf(ptr,"Indexed draw calls: %i\n",stats.thisFrame.numIndexedDrawCalls); + ptr+=sprintf(ptr,"Buffer splits: %i\n",stats.thisFrame.numBufferSplits); + ptr+=sprintf(ptr,"Primitives: %i\n",stats.thisFrame.numPrims); + ptr+=sprintf(ptr,"Primitives (DL): %i\n",stats.thisFrame.numDLPrims); + ptr+=sprintf(ptr,"XF loads: %i\n",stats.thisFrame.numXFLoads); + ptr+=sprintf(ptr,"XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL); + ptr+=sprintf(ptr,"CP loads: %i\n",stats.thisFrame.numCPLoads); + ptr+=sprintf(ptr,"CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL); + ptr+=sprintf(ptr,"BP loads: %i\n",stats.thisFrame.numBPLoads); + ptr+=sprintf(ptr,"BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL); + ptr+=sprintf(ptr,"Vertex streamed: %i kB\n",stats.thisFrame.bytesVertexStreamed/1024); + ptr+=sprintf(ptr,"Index streamed: %i kB\n",stats.thisFrame.bytesIndexStreamed/1024); + ptr+=sprintf(ptr,"Uniform streamed: %i kB\n",stats.thisFrame.bytesUniformStreamed/1024); + ptr+=sprintf(ptr,"Vertex Loaders: %i\n",stats.numVertexLoaders); + + std::string text1; + VertexLoaderManager::AppendListToString(&text1); + + // TODO : at some point text1 just becomes too huge and overflows, we can't even read the added stuff + // since it gets added at the far bottom of the screen anyway (actually outside the rendering window) + // we should really reset the list instead of using substr + if (text1.size() + ptr - p > 8170) + text1 = text1.substr(0, 8170 - (ptr - p)); + + ptr+=sprintf(ptr,"%s",text1.c_str()); + + return ptr; +} + +// Is this really needed? +char *Statistics::ToStringProj(char *ptr) +{ + char *p = ptr; + p+=sprintf(p,"Projection #: X for Raw 6=0 (X for Raw 6!=0)\n\n"); + p+=sprintf(p,"Projection 0: %f (%f) Raw 0: %f\n", stats.gproj_0, stats.g2proj_0, stats.proj_0); + p+=sprintf(p,"Projection 1: %f (%f)\n", stats.gproj_1, stats.g2proj_1); + p+=sprintf(p,"Projection 2: %f (%f) Raw 1: %f\n", stats.gproj_2, stats.g2proj_2, stats.proj_1); + p+=sprintf(p,"Projection 3: %f (%f)\n\n", stats.gproj_3, stats.g2proj_3); + p+=sprintf(p,"Projection 4: %f (%f)\n", stats.gproj_4, stats.g2proj_4); + p+=sprintf(p,"Projection 5: %f (%f) Raw 2: %f\n", stats.gproj_5, stats.g2proj_5, stats.proj_2); + p+=sprintf(p,"Projection 6: %f (%f) Raw 3: %f\n", stats.gproj_6, stats.g2proj_6, stats.proj_3); + p+=sprintf(p,"Projection 7: %f (%f)\n\n", stats.gproj_7, stats.g2proj_7); + p+=sprintf(p,"Projection 8: %f (%f)\n", stats.gproj_8, stats.g2proj_8); + p+=sprintf(p,"Projection 9: %f (%f)\n", stats.gproj_9, stats.g2proj_9); + p+=sprintf(p,"Projection 10: %f (%f) Raw 4: %f\n\n", stats.gproj_10, stats.g2proj_10, stats.proj_4); + p+=sprintf(p,"Projection 11: %f (%f) Raw 5: %f\n\n", stats.gproj_11, stats.g2proj_11, stats.proj_5); + p+=sprintf(p,"Projection 12: %f (%f)\n", stats.gproj_12, stats.g2proj_12); + p+=sprintf(p,"Projection 13: %f (%f)\n", stats.gproj_13, stats.g2proj_13); + p+=sprintf(p,"Projection 14: %f (%f)\n", stats.gproj_14, stats.g2proj_14); + p+=sprintf(p,"Projection 15: %f (%f)\n", stats.gproj_15, stats.g2proj_15); + return p; +} -- cgit v1.2.3 From 6d9cd07bb9acd901fb12dd2445f15f2516bc4021 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 4 Feb 2014 19:35:27 -0500 Subject: [VideoCommon] Eliminate the function Xchg in Statistics.cpp. std::swap does the same thing. --- Source/Core/VideoCommon/Statistics.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 0c69499355..81219201bc 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -3,20 +3,13 @@ // Refer to the license.txt file included. #include +#include #include "Statistics.h" #include "VertexLoaderManager.h" Statistics stats; -template -void Xchg(T& a, T&b) -{ - T c = a; - a = b; - b = c; -} - void Statistics::ResetFrame() { memset(&thisFrame, 0, sizeof(ThisFrame)); @@ -24,10 +17,10 @@ void Statistics::ResetFrame() void Statistics::SwapDL() { - Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims); - Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads); - Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads); - Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); + std::swap(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims); + std::swap(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads); + std::swap(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads); + std::swap(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); } char *Statistics::ToString(char *ptr) -- cgit v1.2.3 From 2afe2152712981e21d6bda6f029292ed2b1cf91e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Feb 2014 05:18:15 -0500 Subject: Convert all includes to relative paths. --- Source/Core/VideoCommon/Statistics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 81219201bc..d1d6312e41 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -5,8 +5,8 @@ #include #include -#include "Statistics.h" -#include "VertexLoaderManager.h" +#include "VideoCommon/Statistics.h" +#include "VideoCommon/VertexLoaderManager.h" Statistics stats; -- cgit v1.2.3 From 1583ce9363822408ae50046edaf973f3c5889ba9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 25 May 2014 20:52:58 -0400 Subject: Use strings instead of arbitrary buffers for video statistics --- Source/Core/VideoCommon/Statistics.cpp | 113 +++++++++++++++++---------------- 1 file changed, 58 insertions(+), 55 deletions(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index d1d6312e41..303972fc90 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -2,9 +2,10 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include +#include #include +#include "Common/StringUtil.h" #include "VideoCommon/Statistics.h" #include "VideoCommon/VertexLoaderManager.h" @@ -23,70 +24,72 @@ void Statistics::SwapDL() std::swap(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); } -char *Statistics::ToString(char *ptr) +std::string Statistics::ToString() { - char *p = ptr; - ptr+=sprintf(ptr,"Textures created: %i\n",stats.numTexturesCreated); - ptr+=sprintf(ptr,"Textures alive: %i\n",stats.numTexturesAlive); - ptr+=sprintf(ptr,"pshaders created: %i\n",stats.numPixelShadersCreated); - ptr+=sprintf(ptr,"pshaders alive: %i\n",stats.numPixelShadersAlive); - ptr+=sprintf(ptr,"pshaders (unique, delete cache first): %i\n",stats.numUniquePixelShaders); - ptr+=sprintf(ptr,"vshaders created: %i\n",stats.numVertexShadersCreated); - ptr+=sprintf(ptr,"vshaders alive: %i\n",stats.numVertexShadersAlive); - ptr+=sprintf(ptr,"dlists called: %i\n",stats.numDListsCalled); - ptr+=sprintf(ptr,"dlists called(f): %i\n",stats.thisFrame.numDListsCalled); - ptr+=sprintf(ptr,"dlists alive: %i\n",stats.numDListsAlive); - ptr+=sprintf(ptr,"Primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins); - ptr+=sprintf(ptr,"Draw calls: %i\n",stats.thisFrame.numDrawCalls); - ptr+=sprintf(ptr,"Indexed draw calls: %i\n",stats.thisFrame.numIndexedDrawCalls); - ptr+=sprintf(ptr,"Buffer splits: %i\n",stats.thisFrame.numBufferSplits); - ptr+=sprintf(ptr,"Primitives: %i\n",stats.thisFrame.numPrims); - ptr+=sprintf(ptr,"Primitives (DL): %i\n",stats.thisFrame.numDLPrims); - ptr+=sprintf(ptr,"XF loads: %i\n",stats.thisFrame.numXFLoads); - ptr+=sprintf(ptr,"XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL); - ptr+=sprintf(ptr,"CP loads: %i\n",stats.thisFrame.numCPLoads); - ptr+=sprintf(ptr,"CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL); - ptr+=sprintf(ptr,"BP loads: %i\n",stats.thisFrame.numBPLoads); - ptr+=sprintf(ptr,"BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL); - ptr+=sprintf(ptr,"Vertex streamed: %i kB\n",stats.thisFrame.bytesVertexStreamed/1024); - ptr+=sprintf(ptr,"Index streamed: %i kB\n",stats.thisFrame.bytesIndexStreamed/1024); - ptr+=sprintf(ptr,"Uniform streamed: %i kB\n",stats.thisFrame.bytesUniformStreamed/1024); - ptr+=sprintf(ptr,"Vertex Loaders: %i\n",stats.numVertexLoaders); + std::string str; + str += StringFromFormat("Textures created: %i\n",stats.numTexturesCreated); + str += StringFromFormat("Textures alive: %i\n", stats.numTexturesAlive); + str += StringFromFormat("pshaders created: %i\n", stats.numPixelShadersCreated); + str += StringFromFormat("pshaders alive: %i\n",stats.numPixelShadersAlive); + str += StringFromFormat("pshaders (unique, delete cache first): %i\n",stats.numUniquePixelShaders); + str += StringFromFormat("vshaders created: %i\n",stats.numVertexShadersCreated); + str += StringFromFormat("vshaders alive: %i\n",stats.numVertexShadersAlive); + str += StringFromFormat("dlists called: %i\n",stats.numDListsCalled); + str += StringFromFormat("dlists called(f): %i\n",stats.thisFrame.numDListsCalled); + str += StringFromFormat("dlists alive: %i\n",stats.numDListsAlive); + str += StringFromFormat("Primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins); + str += StringFromFormat("Draw calls: %i\n",stats.thisFrame.numDrawCalls); + str += StringFromFormat("Indexed draw calls: %i\n",stats.thisFrame.numIndexedDrawCalls); + str += StringFromFormat("Buffer splits: %i\n",stats.thisFrame.numBufferSplits); + str += StringFromFormat("Primitives: %i\n",stats.thisFrame.numPrims); + str += StringFromFormat("Primitives (DL): %i\n",stats.thisFrame.numDLPrims); + str += StringFromFormat("XF loads: %i\n",stats.thisFrame.numXFLoads); + str += StringFromFormat("XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL); + str += StringFromFormat("CP loads: %i\n",stats.thisFrame.numCPLoads); + str += StringFromFormat("CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL); + str += StringFromFormat("BP loads: %i\n",stats.thisFrame.numBPLoads); + str += StringFromFormat("BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL); + str += StringFromFormat("Vertex streamed: %i kB\n",stats.thisFrame.bytesVertexStreamed/1024); + str += StringFromFormat("Index streamed: %i kB\n",stats.thisFrame.bytesIndexStreamed/1024); + str += StringFromFormat("Uniform streamed: %i kB\n",stats.thisFrame.bytesUniformStreamed/1024); + str += StringFromFormat("Vertex Loaders: %i\n",stats.numVertexLoaders); - std::string text1; - VertexLoaderManager::AppendListToString(&text1); + std::string vertex_list; + VertexLoaderManager::AppendListToString(&vertex_list); // TODO : at some point text1 just becomes too huge and overflows, we can't even read the added stuff // since it gets added at the far bottom of the screen anyway (actually outside the rendering window) // we should really reset the list instead of using substr - if (text1.size() + ptr - p > 8170) - text1 = text1.substr(0, 8170 - (ptr - p)); + if (vertex_list.size() + str.size() > 8170) + vertex_list = vertex_list.substr(0, 8170 - str.size()); - ptr+=sprintf(ptr,"%s",text1.c_str()); + str += vertex_list; - return ptr; + return str; } // Is this really needed? -char *Statistics::ToStringProj(char *ptr) +std::string Statistics::ToStringProj() { - char *p = ptr; - p+=sprintf(p,"Projection #: X for Raw 6=0 (X for Raw 6!=0)\n\n"); - p+=sprintf(p,"Projection 0: %f (%f) Raw 0: %f\n", stats.gproj_0, stats.g2proj_0, stats.proj_0); - p+=sprintf(p,"Projection 1: %f (%f)\n", stats.gproj_1, stats.g2proj_1); - p+=sprintf(p,"Projection 2: %f (%f) Raw 1: %f\n", stats.gproj_2, stats.g2proj_2, stats.proj_1); - p+=sprintf(p,"Projection 3: %f (%f)\n\n", stats.gproj_3, stats.g2proj_3); - p+=sprintf(p,"Projection 4: %f (%f)\n", stats.gproj_4, stats.g2proj_4); - p+=sprintf(p,"Projection 5: %f (%f) Raw 2: %f\n", stats.gproj_5, stats.g2proj_5, stats.proj_2); - p+=sprintf(p,"Projection 6: %f (%f) Raw 3: %f\n", stats.gproj_6, stats.g2proj_6, stats.proj_3); - p+=sprintf(p,"Projection 7: %f (%f)\n\n", stats.gproj_7, stats.g2proj_7); - p+=sprintf(p,"Projection 8: %f (%f)\n", stats.gproj_8, stats.g2proj_8); - p+=sprintf(p,"Projection 9: %f (%f)\n", stats.gproj_9, stats.g2proj_9); - p+=sprintf(p,"Projection 10: %f (%f) Raw 4: %f\n\n", stats.gproj_10, stats.g2proj_10, stats.proj_4); - p+=sprintf(p,"Projection 11: %f (%f) Raw 5: %f\n\n", stats.gproj_11, stats.g2proj_11, stats.proj_5); - p+=sprintf(p,"Projection 12: %f (%f)\n", stats.gproj_12, stats.g2proj_12); - p+=sprintf(p,"Projection 13: %f (%f)\n", stats.gproj_13, stats.g2proj_13); - p+=sprintf(p,"Projection 14: %f (%f)\n", stats.gproj_14, stats.g2proj_14); - p+=sprintf(p,"Projection 15: %f (%f)\n", stats.gproj_15, stats.g2proj_15); - return p; + std::string projections; + + projections += "Projection #: X for Raw 6=0 (X for Raw 6!=0)\n\n"; + projections += StringFromFormat("Projection 0: %f (%f) Raw 0: %f\n", stats.gproj_0, stats.g2proj_0, stats.proj_0); + projections += StringFromFormat("Projection 1: %f (%f)\n", stats.gproj_1, stats.g2proj_1); + projections += StringFromFormat("Projection 2: %f (%f) Raw 1: %f\n", stats.gproj_2, stats.g2proj_2, stats.proj_1); + projections += StringFromFormat("Projection 3: %f (%f)\n\n", stats.gproj_3, stats.g2proj_3); + projections += StringFromFormat("Projection 4: %f (%f)\n", stats.gproj_4, stats.g2proj_4); + projections += StringFromFormat("Projection 5: %f (%f) Raw 2: %f\n", stats.gproj_5, stats.g2proj_5, stats.proj_2); + projections += StringFromFormat("Projection 6: %f (%f) Raw 3: %f\n", stats.gproj_6, stats.g2proj_6, stats.proj_3); + projections += StringFromFormat("Projection 7: %f (%f)\n\n", stats.gproj_7, stats.g2proj_7); + projections += StringFromFormat("Projection 8: %f (%f)\n", stats.gproj_8, stats.g2proj_8); + projections += StringFromFormat("Projection 9: %f (%f)\n", stats.gproj_9, stats.g2proj_9); + projections += StringFromFormat("Projection 10: %f (%f) Raw 4: %f\n\n", stats.gproj_10, stats.g2proj_10, stats.proj_4); + projections += StringFromFormat("Projection 11: %f (%f) Raw 5: %f\n\n", stats.gproj_11, stats.g2proj_11, stats.proj_5); + projections += StringFromFormat("Projection 12: %f (%f)\n", stats.gproj_12, stats.g2proj_12); + projections += StringFromFormat("Projection 13: %f (%f)\n", stats.gproj_13, stats.g2proj_13); + projections += StringFromFormat("Projection 14: %f (%f)\n", stats.gproj_14, stats.g2proj_14); + projections += StringFromFormat("Projection 15: %f (%f)\n", stats.gproj_15, stats.g2proj_15); + + return projections; } -- cgit v1.2.3 From f1ddd3c66a3a04c455d7ae41cb98e0f7c554c41c Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 2 Jun 2014 19:36:09 +0200 Subject: VideoCommon: remove unused stats --- Source/Core/VideoCommon/Statistics.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 303972fc90..b0923210fa 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -31,16 +31,11 @@ std::string Statistics::ToString() str += StringFromFormat("Textures alive: %i\n", stats.numTexturesAlive); str += StringFromFormat("pshaders created: %i\n", stats.numPixelShadersCreated); str += StringFromFormat("pshaders alive: %i\n",stats.numPixelShadersAlive); - str += StringFromFormat("pshaders (unique, delete cache first): %i\n",stats.numUniquePixelShaders); str += StringFromFormat("vshaders created: %i\n",stats.numVertexShadersCreated); str += StringFromFormat("vshaders alive: %i\n",stats.numVertexShadersAlive); - str += StringFromFormat("dlists called: %i\n",stats.numDListsCalled); - str += StringFromFormat("dlists called(f): %i\n",stats.thisFrame.numDListsCalled); - str += StringFromFormat("dlists alive: %i\n",stats.numDListsAlive); + str += StringFromFormat("dlists called: %i\n",stats.thisFrame.numDListsCalled); str += StringFromFormat("Primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins); str += StringFromFormat("Draw calls: %i\n",stats.thisFrame.numDrawCalls); - str += StringFromFormat("Indexed draw calls: %i\n",stats.thisFrame.numIndexedDrawCalls); - str += StringFromFormat("Buffer splits: %i\n",stats.thisFrame.numBufferSplits); str += StringFromFormat("Primitives: %i\n",stats.thisFrame.numPrims); str += StringFromFormat("Primitives (DL): %i\n",stats.thisFrame.numDLPrims); str += StringFromFormat("XF loads: %i\n",stats.thisFrame.numXFLoads); -- cgit v1.2.3 From 7db5a4b22db6cc7cea987a38d1d8ce9b0a594394 Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 2 Jun 2014 20:11:46 +0200 Subject: Statistics: Reformat stats string --- Source/Core/VideoCommon/Statistics.cpp | 39 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index b0923210fa..9857c7c39d 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -27,27 +27,28 @@ void Statistics::SwapDL() std::string Statistics::ToString() { std::string str; - str += StringFromFormat("Textures created: %i\n",stats.numTexturesCreated); + str += StringFromFormat("Textures created: %i\n", stats.numTexturesCreated); str += StringFromFormat("Textures alive: %i\n", stats.numTexturesAlive); str += StringFromFormat("pshaders created: %i\n", stats.numPixelShadersCreated); - str += StringFromFormat("pshaders alive: %i\n",stats.numPixelShadersAlive); - str += StringFromFormat("vshaders created: %i\n",stats.numVertexShadersCreated); - str += StringFromFormat("vshaders alive: %i\n",stats.numVertexShadersAlive); - str += StringFromFormat("dlists called: %i\n",stats.thisFrame.numDListsCalled); - str += StringFromFormat("Primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins); - str += StringFromFormat("Draw calls: %i\n",stats.thisFrame.numDrawCalls); - str += StringFromFormat("Primitives: %i\n",stats.thisFrame.numPrims); - str += StringFromFormat("Primitives (DL): %i\n",stats.thisFrame.numDLPrims); - str += StringFromFormat("XF loads: %i\n",stats.thisFrame.numXFLoads); - str += StringFromFormat("XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL); - str += StringFromFormat("CP loads: %i\n",stats.thisFrame.numCPLoads); - str += StringFromFormat("CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL); - str += StringFromFormat("BP loads: %i\n",stats.thisFrame.numBPLoads); - str += StringFromFormat("BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL); - str += StringFromFormat("Vertex streamed: %i kB\n",stats.thisFrame.bytesVertexStreamed/1024); - str += StringFromFormat("Index streamed: %i kB\n",stats.thisFrame.bytesIndexStreamed/1024); - str += StringFromFormat("Uniform streamed: %i kB\n",stats.thisFrame.bytesUniformStreamed/1024); - str += StringFromFormat("Vertex Loaders: %i\n",stats.numVertexLoaders); + str += StringFromFormat("pshaders alive: %i\n", stats.numPixelShadersAlive); + str += StringFromFormat("vshaders created: %i\n", stats.numVertexShadersCreated); + str += StringFromFormat("vshaders alive: %i\n", stats.numVertexShadersAlive); + str += StringFromFormat("shaders changes: %i\n", stats.thisFrame.numShaderChanges); + str += StringFromFormat("dlists called: %i\n", stats.thisFrame.numDListsCalled); + str += StringFromFormat("Primitive joins: %i\n", stats.thisFrame.numPrimitiveJoins); + str += StringFromFormat("Draw calls: %i\n", stats.thisFrame.numDrawCalls); + str += StringFromFormat("Primitives: %i\n", stats.thisFrame.numPrims); + str += StringFromFormat("Primitives (DL): %i\n", stats.thisFrame.numDLPrims); + str += StringFromFormat("XF loads: %i\n", stats.thisFrame.numXFLoads); + str += StringFromFormat("XF loads (DL): %i\n", stats.thisFrame.numXFLoadsInDL); + str += StringFromFormat("CP loads: %i\n", stats.thisFrame.numCPLoads); + str += StringFromFormat("CP loads (DL): %i\n", stats.thisFrame.numCPLoadsInDL); + str += StringFromFormat("BP loads: %i\n", stats.thisFrame.numBPLoads); + str += StringFromFormat("BP loads (DL): %i\n", stats.thisFrame.numBPLoadsInDL); + str += StringFromFormat("Vertex streamed: %i kB\n", stats.thisFrame.bytesVertexStreamed/1024); + str += StringFromFormat("Index streamed: %i kB\n", stats.thisFrame.bytesIndexStreamed/1024); + str += StringFromFormat("Uniform streamed: %i kB\n", stats.thisFrame.bytesUniformStreamed/1024); + str += StringFromFormat("Vertex Loaders: %i\n", stats.numVertexLoaders); std::string vertex_list; VertexLoaderManager::AppendListToString(&vertex_list); -- cgit v1.2.3 From 4639d3b1bc3a882461645e0356c894c7d79a28f8 Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 17 Jan 2015 10:29:10 +0100 Subject: TexCache: also incude textures within the render target pool --- Source/Core/VideoCommon/Statistics.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 9857c7c39d..949b50558f 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -28,6 +28,7 @@ std::string Statistics::ToString() { std::string str; str += StringFromFormat("Textures created: %i\n", stats.numTexturesCreated); + str += StringFromFormat("Textures uploaded: %i\n", stats.numTexturesUploaded); str += StringFromFormat("Textures alive: %i\n", stats.numTexturesAlive); str += StringFromFormat("pshaders created: %i\n", stats.numPixelShadersCreated); str += StringFromFormat("pshaders alive: %i\n", stats.numPixelShadersAlive); -- cgit v1.2.3 From 93b16a4a2d5f3e6d467d1315c461aff12852b26c Mon Sep 17 00:00:00 2001 From: Stevoisiak Date: Sun, 15 Feb 2015 14:43:31 -0500 Subject: Formatting/Whitespace Cleanup Various fixes to formatting and whitespace --- Source/Core/VideoCommon/Statistics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 949b50558f..1bdbbb7bb3 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -46,9 +46,9 @@ std::string Statistics::ToString() str += StringFromFormat("CP loads (DL): %i\n", stats.thisFrame.numCPLoadsInDL); str += StringFromFormat("BP loads: %i\n", stats.thisFrame.numBPLoads); str += StringFromFormat("BP loads (DL): %i\n", stats.thisFrame.numBPLoadsInDL); - str += StringFromFormat("Vertex streamed: %i kB\n", stats.thisFrame.bytesVertexStreamed/1024); - str += StringFromFormat("Index streamed: %i kB\n", stats.thisFrame.bytesIndexStreamed/1024); - str += StringFromFormat("Uniform streamed: %i kB\n", stats.thisFrame.bytesUniformStreamed/1024); + str += StringFromFormat("Vertex streamed: %i kB\n", stats.thisFrame.bytesVertexStreamed / 1024); + str += StringFromFormat("Index streamed: %i kB\n", stats.thisFrame.bytesIndexStreamed / 1024); + str += StringFromFormat("Uniform streamed: %i kB\n", stats.thisFrame.bytesUniformStreamed / 1024); str += StringFromFormat("Vertex Loaders: %i\n", stats.numVertexLoaders); std::string vertex_list; -- cgit v1.2.3 From cefcb0ace9d363b3679b4e93bcc9ec05f1e5f4f8 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 18 May 2015 01:08:10 +0200 Subject: Update license headers to GPLv2+ --- Source/Core/VideoCommon/Statistics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 1bdbbb7bb3..0c9dafe9c7 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -1,5 +1,5 @@ // Copyright 2013 Dolphin Emulator Project -// Licensed under GPLv2 +// Licensed under GPLv2+ // Refer to the license.txt file included. #include -- cgit v1.2.3 From 30ebb2459eb97ba544547183854775df8460b475 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 24 May 2015 06:55:12 +0200 Subject: Set copyright year to when a file was created --- Source/Core/VideoCommon/Statistics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/Statistics.cpp') diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 0c9dafe9c7..04164cdaed 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -1,4 +1,4 @@ -// Copyright 2013 Dolphin Emulator Project +// Copyright 2008 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. -- cgit v1.2.3