From 54b97daf3483b1fcd14f6eb1f7303bdea94b5035 Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Wed, 7 Dec 2005 20:03:27 +0000 Subject: [PATCH] add Draw:Transfer:Create Vertex Buffer pstat collector --- panda/src/display/graphicsStateGuardian.cxx | 2 ++ panda/src/display/graphicsStateGuardian.h | 2 ++ panda/src/dxgsg8/dxIndexBufferContext8.cxx | 2 ++ panda/src/dxgsg8/dxVertexBufferContext8.cxx | 2 ++ 4 files changed, 8 insertions(+) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index c58675e563..39c6121d6a 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -46,6 +46,8 @@ PStatCollector GraphicsStateGuardian::_vertex_buffer_switch_pcollector("Vertex b PStatCollector GraphicsStateGuardian::_index_buffer_switch_pcollector("Vertex buffer switch:Index"); PStatCollector GraphicsStateGuardian::_load_vertex_buffer_pcollector("Draw:Transfer data:Vertex buffer"); PStatCollector GraphicsStateGuardian::_load_index_buffer_pcollector("Draw:Transfer data:Index buffer"); +PStatCollector GraphicsStateGuardian::_create_vertex_buffer_pcollector("Draw:Transfer data:Create Vertex buffer"); +PStatCollector GraphicsStateGuardian::_create_index_buffer_pcollector("Draw:Transfer data:Create Index buffer"); PStatCollector GraphicsStateGuardian::_load_texture_pcollector("Draw:Transfer data:Texture"); PStatCollector GraphicsStateGuardian::_data_transferred_pcollector("Data transferred"); PStatCollector GraphicsStateGuardian::_total_geom_pcollector("Prepared Geoms"); diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 86c0654ec2..8ab2d68d70 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -374,6 +374,8 @@ public: static PStatCollector _index_buffer_switch_pcollector; static PStatCollector _load_vertex_buffer_pcollector; static PStatCollector _load_index_buffer_pcollector; + static PStatCollector _create_vertex_buffer_pcollector; + static PStatCollector _create_index_buffer_pcollector; static PStatCollector _load_texture_pcollector; static PStatCollector _data_transferred_pcollector; static PStatCollector _total_geom_pcollector; diff --git a/panda/src/dxgsg8/dxIndexBufferContext8.cxx b/panda/src/dxgsg8/dxIndexBufferContext8.cxx index 5a3c206e61..022461511a 100644 --- a/panda/src/dxgsg8/dxIndexBufferContext8.cxx +++ b/panda/src/dxgsg8/dxIndexBufferContext8.cxx @@ -68,6 +68,8 @@ create_ibuffer(DXScreenData &scrn) { _ibuffer = NULL; } + PStatTimer timer(GraphicsStateGuardian::_create_index_buffer_pcollector); + D3DFORMAT index_type = DXGraphicsStateGuardian8::get_index_type(get_data()->get_index_type()); diff --git a/panda/src/dxgsg8/dxVertexBufferContext8.cxx b/panda/src/dxgsg8/dxVertexBufferContext8.cxx index d7ca992e35..3c7472a331 100644 --- a/panda/src/dxgsg8/dxVertexBufferContext8.cxx +++ b/panda/src/dxgsg8/dxVertexBufferContext8.cxx @@ -194,6 +194,8 @@ create_vbuffer(DXScreenData &scrn) { _vbuffer = NULL; } + PStatTimer timer(GraphicsStateGuardian::_create_vertex_buffer_pcollector); + HRESULT hr = scrn._d3d_device->CreateVertexBuffer (get_data()->get_data_size_bytes(), D3DUSAGE_WRITEONLY, _fvf, D3DPOOL_MANAGED, &_vbuffer);