diff --git a/panda/src/pgraphnodes/computeNode.I b/panda/src/pgraphnodes/computeNode.I index f841af6309..726193e8b1 100644 --- a/panda/src/pgraphnodes/computeNode.I +++ b/panda/src/pgraphnodes/computeNode.I @@ -41,6 +41,17 @@ add_dispatch(int num_groups_x, int num_groups_y, int num_groups_z) { add_dispatch(num_groups); } +//////////////////////////////////////////////////////////////////// +// Function: ComputeNode::clear_dispatches +// Access: Published +// Description: Removes all dispatch commands. +//////////////////////////////////////////////////////////////////// +INLINE void ComputeNode:: +clear_dispatches() { + Dispatcher::CDWriter cdata(_dispatcher->_cycler); + cdata->_dispatches.clear(); +} + //////////////////////////////////////////////////////////////////// // Function: ComputeNode::get_num_dispatches // Access: Published diff --git a/panda/src/pgraphnodes/computeNode.h b/panda/src/pgraphnodes/computeNode.h index d6b835d6ce..94f2086c10 100644 --- a/panda/src/pgraphnodes/computeNode.h +++ b/panda/src/pgraphnodes/computeNode.h @@ -36,6 +36,8 @@ PUBLISHED: INLINE int get_num_dispatches() const; INLINE const LVecBase3i &get_dispatch(int i) const; + INLINE void clear_dispatches(); + MAKE_SEQ(get_dispatches, get_num_dispatches, get_dispatch); public: