14 #ifndef PIPELINECYCLER_H 15 #define PIPELINECYCLER_H 45 template<
class CycleDataType>
55 INLINE
const CycleDataType *
read(
Thread *current_thread)
const;
56 INLINE CycleDataType *
write(
Thread *current_thread);
58 INLINE CycleDataType *
elevate_read(
const CycleDataType *pointer,
Thread *current_thread);
62 INLINE
const CycleDataType *
read_stage(
int pipeline_stage,
Thread *current_thread)
const;
68 INLINE CycleDataType *
cheat()
const;
74 CycleDataType _typed_data;
75 #endif // !DO_PIPELINING 87 #define OPEN_ITERATE_UPSTREAM_ONLY(cycler, current_thread) { \ 88 CyclerHolder cholder(cycler); \ 90 for (pipeline_stage = current_thread->get_pipeline_stage() - 1; \ 91 pipeline_stage >= 0; \ 94 #define CLOSE_ITERATE_UPSTREAM_ONLY(cycler) \ 99 #define OPEN_ITERATE_CURRENT_AND_UPSTREAM(cycler, current_thread) { \ 100 CyclerHolder cholder(cycler); \ 101 int pipeline_stage; \ 102 for (pipeline_stage = current_thread->get_pipeline_stage(); \ 103 pipeline_stage >= 0; \ 106 #define CLOSE_ITERATE_CURRENT_AND_UPSTREAM(cycler) \ 110 #define OPEN_ITERATE_CURRENT_AND_UPSTREAM_NOLOCK(cycler, current_thread) { \ 111 int pipeline_stage; \ 112 for (pipeline_stage = current_thread->get_pipeline_stage(); \ 113 pipeline_stage >= 0; \ 116 #define CLOSE_ITERATE_CURRENT_AND_UPSTREAM_NOLOCK(cycler) \ 120 #define OPEN_ITERATE_ALL_STAGES(cycler) { \ 121 int pipeline_stage; \ 122 for (pipeline_stage = (cycler).get_num_stages() - 1; \ 123 pipeline_stage >= 0; \ 126 #define CLOSE_ITERATE_ALL_STAGES(cycler) \ 129 #else // DO_PIPELINING 134 #define OPEN_ITERATE_UPSTREAM_ONLY(cycler, current_thread) \ 136 const int pipeline_stage = -1; 138 #define CLOSE_ITERATE_UPSTREAM_ONLY(cycler) \ 141 #define OPEN_ITERATE_CURRENT_AND_UPSTREAM(cycler, current_thread) { \ 142 const int pipeline_stage = 0; \ 144 #define CLOSE_ITERATE_CURRENT_AND_UPSTREAM(cycler) \ 147 #define OPEN_ITERATE_CURRENT_AND_UPSTREAM_NOLOCK(cycler, current_thread) { \ 148 const int pipeline_stage = 0; \ 150 #define CLOSE_ITERATE_CURRENT_AND_UPSTREAM_NOLOCK(cycler) \ 153 #define OPEN_ITERATE_ALL_STAGES(cycler) { \ 154 const int pipeline_stage = 0; \ 156 #define CLOSE_ITERATE_ALL_STAGES(cycler) \ 159 #endif // DO_PIPELINING This class maintains different copies of a page of data between stages of the graphics pipeline (or a...
CycleDataType * elevate_read(const CycleDataType *pointer, Thread *current_thread)
See PipelineCyclerBase::elevate_read().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the trivial, non-threaded implementation of PipelineCyclerBase.
CycleDataType * cheat() const
Returns a pointer without counting it.
CycleDataType * elevate_read_stage_upstream(int pipeline_stage, const CycleDataType *pointer, bool force_to_0, Thread *current_thread)
See PipelineCyclerBase::elevate_read_stage_upstream().
const CycleDataType * read_stage(int pipeline_stage, Thread *current_thread) const
See PipelineCyclerBase::read_stage().
CycleDataType * elevate_read_stage(int pipeline_stage, const CycleDataType *pointer, Thread *current_thread)
See PipelineCyclerBase::elevate_read_stage().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CycleDataType * write_stage_upstream(int pipeline_stage, bool force_to_0, Thread *current_thread)
See PipelineCyclerBase::write_stage_upstream().
CycleDataType * write_stage(int pipeline_stage, Thread *current_thread)
See PipelineCyclerBase::write_stage().
This class manages a staged pipeline of data, for instance the render pipeline, so that each stage of...
CycleDataType * write(Thread *current_thread)
See PipelineCyclerBase::write().
CycleDataType * elevate_read_upstream(const CycleDataType *pointer, bool force_to_0, Thread *current_thread)
See PipelineCyclerBase::elevate_read_upstream().
const CycleDataType * read_unlocked(Thread *current_thread) const
See PipelineCyclerBase::read_unlocked().
A thread; that is, a lightweight process.
const CycleDataType * read_stage_unlocked(int pipeline_stage) const
See PipelineCyclerBase::read_stage_unlocked().
CycleDataType * write_upstream(bool force_to_0, Thread *current_thread)
See PipelineCyclerBase::write_upstream().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const CycleDataType * read(Thread *current_thread) const
See PipelineCyclerBase::read().