From 7dc0eabbbb27068d7b40ebc78ca2124346eb38ff Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 2 May 2006 01:47:59 +0000 Subject: [PATCH] fix compilation errors without threading --- panda/src/display/graphicsEngine.cxx | 2 +- panda/src/gobj/geom.h | 4 ++++ panda/src/gobj/geomPrimitive.h | 5 +++++ panda/src/gobj/geomVertexArrayData.h | 4 ++++ panda/src/gobj/geomVertexData.h | 4 ++++ panda/src/pgraph/pandaNode.h | 5 +++++ panda/src/pipeline/pipelineCyclerDummyImpl.I | 18 +++++++++--------- 7 files changed, 32 insertions(+), 10 deletions(-) diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index fb6462d36e..b6116f4295 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -51,7 +51,7 @@ PStatCollector GraphicsEngine::_wait_pcollector("Wait:Thread sync"); PStatCollector GraphicsEngine::_cycle_pcollector("App:Cycle"); -PStatCollector GraphicsEngine::_app_pcollector("App:Show code:General"); +PStatCollector GraphicsEngine::_app_pcollector("App:xxx:General"); PStatCollector GraphicsEngine::_render_frame_pcollector("App:render_frame"); PStatCollector GraphicsEngine::_do_frame_pcollector("*:do_frame"); PStatCollector GraphicsEngine::_yield_pcollector("App:Yield"); diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index 65841c15e5..510b5066e8 100644 --- a/panda/src/gobj/geom.h +++ b/panda/src/gobj/geom.h @@ -352,7 +352,11 @@ public: private: const Geom *_object; Thread *_current_thread; +#ifdef DO_PIPELINING CPT(Geom::CData) _cdata; +#else + const Geom::CData *_cdata; +#endif // DO_PIPELINING }; INLINE ostream &operator << (ostream &out, const Geom &obj); diff --git a/panda/src/gobj/geomPrimitive.h b/panda/src/gobj/geomPrimitive.h index 04449913ac..d31d7073f1 100644 --- a/panda/src/gobj/geomPrimitive.h +++ b/panda/src/gobj/geomPrimitive.h @@ -334,7 +334,12 @@ public: private: const GeomPrimitive *_object; Thread *_current_thread; +#ifdef DO_PIPELINING CPT(GeomPrimitive::CData) _cdata; +#else + const GeomPrimitive::CData *_cdata; +#endif // DO_PIPELINING + GeomVertexArrayDataPipelineReader *_vertices_reader; }; diff --git a/panda/src/gobj/geomVertexArrayData.h b/panda/src/gobj/geomVertexArrayData.h index b3bd856a59..d76589f416 100644 --- a/panda/src/gobj/geomVertexArrayData.h +++ b/panda/src/gobj/geomVertexArrayData.h @@ -208,7 +208,11 @@ public: protected: GeomVertexArrayData *_object; Thread *_current_thread; +#ifdef DO_PIPELINING PT(GeomVertexArrayData::CData) _cdata; +#else + GeomVertexArrayData::CData *_cdata; +#endif // DO_PIPELINING }; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/geomVertexData.h b/panda/src/gobj/geomVertexData.h index 35a9df47fb..40c00603ae 100644 --- a/panda/src/gobj/geomVertexData.h +++ b/panda/src/gobj/geomVertexData.h @@ -343,7 +343,11 @@ public: protected: GeomVertexData *_object; Thread *_current_thread; +#ifdef DO_PIPELINING PT(GeomVertexData::CData) _cdata; +#else + GeomVertexData::CData *_cdata; +#endif // DO_PIPELINING }; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/pandaNode.h b/panda/src/pgraph/pandaNode.h index 134bf1ad40..1a3279b172 100644 --- a/panda/src/pgraph/pandaNode.h +++ b/panda/src/pgraph/pandaNode.h @@ -673,7 +673,12 @@ public: private: const PandaNode *_object; Thread *_current_thread; + +#ifdef DO_PIPELINING CPT(PandaNode::CData) _cdata; +#else + const PandaNode::CData *_cdata; +#endif // DO_PIPELINING }; INLINE ostream &operator << (ostream &out, const PandaNode &node) { diff --git a/panda/src/pipeline/pipelineCyclerDummyImpl.I b/panda/src/pipeline/pipelineCyclerDummyImpl.I index 3019b7f687..63cc848195 100644 --- a/panda/src/pipeline/pipelineCyclerDummyImpl.I +++ b/panda/src/pipeline/pipelineCyclerDummyImpl.I @@ -192,7 +192,7 @@ release_read(const CycleData *pointer) const { // stage (but see elevate_read). //////////////////////////////////////////////////////////////////// INLINE CycleData *PipelineCyclerDummyImpl:: -write(Thread *) { +write(Thread *current_thread) { TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::write()", " ", TAU_USER); _write_count++; @@ -252,10 +252,10 @@ write_upstream(bool, Thread *) { // current stage. //////////////////////////////////////////////////////////////////// INLINE CycleData *PipelineCyclerDummyImpl:: -elevate_read(const CycleData *pointer, Thread *) { +elevate_read(const CycleData *pointer, Thread *current_thread) { TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read(const CycleData *)", " ", TAU_USER); release_read(pointer); - return write(); + return write(current_thread); } //////////////////////////////////////////////////////////////////// @@ -267,10 +267,10 @@ elevate_read(const CycleData *pointer, Thread *) { // write_upstream(). //////////////////////////////////////////////////////////////////// INLINE CycleData *PipelineCyclerDummyImpl:: -elevate_read_upstream(const CycleData *pointer, bool force_to_0, Thread *) { +elevate_read_upstream(const CycleData *pointer, bool force_to_0, Thread *current_thread) { TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read_upstream(const CycleData *, bool)", " ", TAU_USER); release_read(pointer); - return write_upstream(force_to_0); + return write_upstream(force_to_0, current_thread); } //////////////////////////////////////////////////////////////////// @@ -416,11 +416,11 @@ write_stage_upstream(int pipeline_stage, bool, Thread *) { // current stage. //////////////////////////////////////////////////////////////////// INLINE CycleData *PipelineCyclerDummyImpl:: -elevate_read_stage(int pipeline_stage, const CycleData *pointer, Thread *) { +elevate_read_stage(int pipeline_stage, const CycleData *pointer, Thread *current_thread) { TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read_stage(int, CycleData *)", " ", TAU_USER); nassertr(pipeline_stage == 0, NULL); release_read(pointer); - return write(); + return write(current_thread); } //////////////////////////////////////////////////////////////////// @@ -434,11 +434,11 @@ elevate_read_stage(int pipeline_stage, const CycleData *pointer, Thread *) { //////////////////////////////////////////////////////////////////// INLINE CycleData *PipelineCyclerDummyImpl:: elevate_read_stage_upstream(int pipeline_stage, const CycleData *pointer, - bool, Thread *) { + bool, Thread *current_thread) { TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read_stage(int, CycleData *)", " ", TAU_USER); nassertr(pipeline_stage == 0, NULL); release_read(pointer); - return write(); + return write(current_thread); } ////////////////////////////////////////////////////////////////////