Browse Source

draw_set_shader_parameters pstats

David Rose 17 years ago
parent
commit
f723924399

+ 1 - 0
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");

+ 1 - 0
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;

+ 2 - 0
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;
   }