17 INLINE PipelineCyclerDummyImpl::
25 if (_pipeline ==
nullptr) {
33 INLINE PipelineCyclerDummyImpl::
34 PipelineCyclerDummyImpl(
const PipelineCyclerDummyImpl ©) :
35 _data(copy._data->make_copy()),
36 _pipeline(copy._pipeline),
46 INLINE
void PipelineCyclerDummyImpl::
47 operator = (
const PipelineCyclerDummyImpl ©) {
48 nassertv(_read_count == 0 && _write_count == 0);
49 _data = copy._data->make_copy();
50 _pipeline = copy._pipeline;
56 INLINE PipelineCyclerDummyImpl::
57 ~PipelineCyclerDummyImpl() {
58 nassertv(_read_count == 0 && _write_count == 0 && !_locked);
65 INLINE
void PipelineCyclerDummyImpl::
67 TAU_PROFILE(
"void PipelineCyclerDummyImpl::acquire(Thread *)",
" ", TAU_USER);
75 INLINE
void PipelineCyclerDummyImpl::
77 TAU_PROFILE(
"void PipelineCyclerDummyImpl::release()",
" ", TAU_USER);
91 INLINE
const CycleData *PipelineCyclerDummyImpl::
92 read_unlocked(
Thread *current_thread)
const {
93 TAU_PROFILE(
"const CycleData *PipelineCyclerDummyImpl::read_unlocked()",
" ", TAU_USER);
105 INLINE
const CycleData *PipelineCyclerDummyImpl::
107 TAU_PROFILE(
"const CycleData *PipelineCyclerDummyImpl::read()",
" ", TAU_USER);
110 ((PipelineCyclerDummyImpl *)
this)->_read_count++;
121 INLINE
void PipelineCyclerDummyImpl::
122 increment_read(
const CycleData *pointer)
const {
123 TAU_PROFILE(
"void PipelineCyclerDummyImpl::increment_read(const CycleData *)",
" ", TAU_USER);
126 nassertv(pointer == _data);
127 nassertv(_read_count > 0);
128 ((PipelineCyclerDummyImpl *)
this)->_read_count++;
134 INLINE
void PipelineCyclerDummyImpl::
135 release_read(
const CycleData *pointer)
const {
136 TAU_PROFILE(
"void PipelineCyclerDummyImpl::release_read(const CycleData *)",
" ", TAU_USER);
139 nassertv(pointer == _data);
140 nassertv(_read_count > 0);
141 ((PipelineCyclerDummyImpl *)
this)->_read_count--;
155 INLINE
CycleData *PipelineCyclerDummyImpl::
156 write(
Thread *current_thread) {
157 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::write()",
" ", TAU_USER);
162 nassertr(_read_count == 0, _data);
191 write_upstream(
bool,
Thread *) {
192 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::write_upstream(bool)",
" ", TAU_USER);
202 INLINE
CycleData *PipelineCyclerDummyImpl::
204 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::elevate_read(const CycleData *)",
" ", TAU_USER);
205 release_read(pointer);
206 return write(current_thread);
214 INLINE
CycleData *PipelineCyclerDummyImpl::
215 elevate_read_upstream(
const CycleData *pointer,
bool force_to_0,
Thread *current_thread) {
216 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::elevate_read_upstream(const CycleData *, bool)",
" ", TAU_USER);
217 release_read(pointer);
218 return write_upstream(force_to_0, current_thread);
225 INLINE
void PipelineCyclerDummyImpl::
226 increment_write(
CycleData *pointer)
const {
227 TAU_PROFILE(
"void PipelineCyclerDummyImpl::increment_write(CycleData *)",
" ", TAU_USER);
230 nassertv(pointer == _data);
231 nassertv(_write_count > 0);
232 ((PipelineCyclerDummyImpl *)
this)->_write_count++;
238 INLINE
void PipelineCyclerDummyImpl::
240 TAU_PROFILE(
"void PipelineCyclerDummyImpl::release_write(CycleData *)",
" ", TAU_USER);
241 nassertv(pointer == _data);
242 nassertv(_write_count > 0);
249 INLINE
int PipelineCyclerDummyImpl::
259 INLINE
const CycleData *PipelineCyclerDummyImpl::
260 read_stage_unlocked(
int pipeline_stage)
const {
261 TAU_PROFILE(
"const CycleData *PipelineCyclerDummyImpl::read_stage_unlocked(int)",
" ", TAU_USER);
262 nassertr(pipeline_stage == 0,
nullptr);
274 INLINE
const CycleData *PipelineCyclerDummyImpl::
275 read_stage(
int pipeline_stage,
Thread *)
const {
276 TAU_PROFILE(
"const CycleData *PipelineCyclerDummyImpl::read_stage(int, Thread *)",
" ", TAU_USER);
279 nassertr(pipeline_stage == 0,
nullptr);
280 ((PipelineCyclerDummyImpl *)
this)->_read_count++;
290 INLINE
void PipelineCyclerDummyImpl::
291 release_read_stage(
int pipeline_stage,
const CycleData *pointer)
const {
292 TAU_PROFILE(
"void PipelineCyclerDummyImpl::release_read_stage(int, const CycleData *)",
" ", TAU_USER);
295 nassertv(pipeline_stage == 0);
296 nassertv(pointer == _data);
297 nassertv(_read_count > 0);
298 ((PipelineCyclerDummyImpl *)
this)->_read_count--;
307 INLINE
CycleData *PipelineCyclerDummyImpl::
308 write_stage(
int pipeline_stage,
Thread *) {
309 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::write_stage(int)",
" ", TAU_USER);
310 nassertr(pipeline_stage == 0,
nullptr);
321 INLINE
CycleData *PipelineCyclerDummyImpl::
322 write_stage_upstream(
int pipeline_stage,
bool,
Thread *) {
323 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::write_stage_upstream(int)",
" ", TAU_USER);
324 nassertr(pipeline_stage == 0,
nullptr);
334 INLINE
CycleData *PipelineCyclerDummyImpl::
335 elevate_read_stage(
int pipeline_stage,
const CycleData *pointer,
Thread *current_thread) {
336 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::elevate_read_stage(int, CycleData *)",
" ", TAU_USER);
337 nassertr(pipeline_stage == 0,
nullptr);
338 release_read(pointer);
339 return write(current_thread);
347 INLINE
CycleData *PipelineCyclerDummyImpl::
348 elevate_read_stage_upstream(
int pipeline_stage,
const CycleData *pointer,
349 bool,
Thread *current_thread) {
350 TAU_PROFILE(
"CycleData *PipelineCyclerDummyImpl::elevate_read_stage(int, CycleData *)",
" ", TAU_USER);
351 nassertr(pipeline_stage == 0,
nullptr);
352 release_read(pointer);
353 return write(current_thread);
359 INLINE
void PipelineCyclerDummyImpl::
360 release_write_stage(
int pipeline_stage,
CycleData *pointer) {
361 TAU_PROFILE(
"void PipelineCyclerDummyImpl::release_write_stage(int, CycleData *)",
" ", TAU_USER);
362 nassertv(pipeline_stage == 0 && pointer == _data);
363 nassertv(_write_count > 0);
372 get_parent_type()
const {
373 return _data->get_parent_type();
382 INLINE
CycleData *PipelineCyclerDummyImpl::
391 INLINE
int PipelineCyclerDummyImpl::
392 get_read_count()
const {
401 INLINE
int PipelineCyclerDummyImpl::
402 get_write_count()
const {
A single page of data maintained by a PipelineCycler.
static Pipeline * get_render_pipeline()
Returns a pointer to the global render pipeline.
This class manages a staged pipeline of data, for instance the render pipeline, so that each stage of...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.