From f7239243992031d098a5614ae62e4c1e501abaa6 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 1 Sep 2008 22:30:37 +0000 Subject: [PATCH] draw_set_shader_parameters pstats --- panda/src/display/graphicsStateGuardian.cxx | 1 + panda/src/display/graphicsStateGuardian.h | 1 + panda/src/glstuff/glShaderContext_src.cxx | 2 ++ 3 files changed, 4 insertions(+) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 5766fee8db..66c2ab1415 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -89,6 +89,7 @@ PStatCollector GraphicsStateGuardian::_draw_set_state_rescale_normal_pcollector( PStatCollector GraphicsStateGuardian::_draw_set_state_shade_model_pcollector("Draw:Set State:Shade model"); PStatCollector GraphicsStateGuardian::_draw_set_state_blending_pcollector("Draw:Set State:Blending"); PStatCollector GraphicsStateGuardian::_draw_set_state_shader_pcollector("Draw:Set State:Shader"); +PStatCollector GraphicsStateGuardian::_draw_set_state_shader_parameters_pcollector("Draw:Set State:Shader Parameters"); PStatCollector GraphicsStateGuardian::_draw_set_state_texture_pcollector("Draw:Set State:Texture"); PStatCollector GraphicsStateGuardian::_draw_set_state_tex_matrix_pcollector("Draw:Set State:Tex matrix"); PStatCollector GraphicsStateGuardian::_draw_set_state_tex_gen_pcollector("Draw:Set State:Tex gen"); diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 2d8a401e18..a547980859 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -480,6 +480,7 @@ public: static PStatCollector _draw_set_state_shade_model_pcollector; static PStatCollector _draw_set_state_blending_pcollector; static PStatCollector _draw_set_state_shader_pcollector; + static PStatCollector _draw_set_state_shader_parameters_pcollector; static PStatCollector _draw_set_state_texture_pcollector; static PStatCollector _draw_set_state_tex_matrix_pcollector; static PStatCollector _draw_set_state_tex_gen_pcollector; diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index bffc52ed79..0ed61a3b7c 100755 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -15,6 +15,7 @@ #ifdef HAVE_CG #include "Cg/cgGL.h" #endif +#include "pStatTimer.h" #define DEBUG_GL_SHADER 0 @@ -164,6 +165,7 @@ unbind() { void CLP(ShaderContext):: issue_parameters(GSG *gsg, int altered) { #ifdef HAVE_CG + PStatTimer timer(gsg->_draw_set_state_shader_parameters_pcollector); if (_cg_context == 0) { return; }