mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: print the bandwidth of uniform
This commit is contained in:
parent
f2f59544d2
commit
47a0026b60
|
@ -1666,7 +1666,11 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
|
|||
fprintf(stderr, "Standard deviatin by frame: %fms\n", sd/(float)frame_number);
|
||||
}
|
||||
#ifdef ENABLE_OGL_DEBUG_MEM_BW
|
||||
fprintf(stderr, "memory bandwith. T: %f KB/f. V: %f KB/f\n", (float)g_texture_upload_byte/(float)frame_number/1024, (float)g_vertex_upload_byte/(float)frame_number/1024);
|
||||
fprintf(stderr, "memory bandwith. T: %f KB/f. V: %f KB/f. U: %f KB/f\n",
|
||||
(float)g_texture_upload_byte/(float)frame_number/1024,
|
||||
(float)g_vertex_upload_byte/(float)frame_number/1024,
|
||||
(float)g_uniform_upload_byte/(float)frame_number/1024
|
||||
);
|
||||
#endif
|
||||
|
||||
for(auto i = packets.begin(); i != packets.end(); i++)
|
||||
|
|
|
@ -35,6 +35,7 @@ static uint32 g_frame_count = 1;
|
|||
#ifdef ENABLE_OGL_DEBUG_MEM_BW
|
||||
uint32 g_texture_upload_byte = 0;
|
||||
uint32 g_vertex_upload_byte = 0;
|
||||
uint32 g_uniform_upload_byte = 0;
|
||||
#endif
|
||||
|
||||
static const uint32 g_merge_cb_index = 10;
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
|
||||
#include "GLState.h"
|
||||
|
||||
#ifdef ENABLE_OGL_DEBUG_MEM_BW
|
||||
extern uint32 g_uniform_upload_byte;
|
||||
#endif
|
||||
|
||||
|
||||
class GSUniformBufferOGL {
|
||||
GLuint buffer; // data object
|
||||
GLuint index; // GLSL slot
|
||||
|
@ -66,6 +71,9 @@ public:
|
|||
// synchronous whereas glBufferSubData could be asynchronous.
|
||||
// TODO: investigate the extension ARB_invalidate_subdata
|
||||
gl_BufferSubData(GL_UNIFORM_BUFFER, 0, size, src);
|
||||
#ifdef ENABLE_OGL_DEBUG_MEM_BW
|
||||
g_uniform_upload_byte += size;
|
||||
#endif
|
||||
}
|
||||
|
||||
~GSUniformBufferOGL() {
|
||||
|
|
Loading…
Reference in New Issue