mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Fix use of uninitialized variable pointed out by valgrind
This commit is contained in:
parent
844a284925
commit
cccd29cc61
@ -27,13 +27,15 @@ Pipeline *Pipeline::_render_pipeline = (Pipeline *)NULL;
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
Pipeline::
|
Pipeline::
|
||||||
Pipeline(const string &name, int num_stages) :
|
Pipeline(const string &name, int num_stages) :
|
||||||
Namable(name)
|
Namable(name),
|
||||||
#ifdef THREADED_PIPELINE
|
#ifdef THREADED_PIPELINE
|
||||||
, _lock("Pipeline")
|
_num_stages(num_stages),
|
||||||
|
_lock("Pipeline")
|
||||||
|
#else
|
||||||
|
_num_stages(1)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef THREADED_PIPELINE
|
#ifdef THREADED_PIPELINE
|
||||||
|
|
||||||
// We maintain all of the cyclers in the world on one of two linked
|
// We maintain all of the cyclers in the world on one of two linked
|
||||||
// lists. Cyclers that are "clean", which is to say, they have the
|
// lists. Cyclers that are "clean", which is to say, they have the
|
||||||
// same value across all pipeline stages, are stored on the _clean
|
// same value across all pipeline stages, are stored on the _clean
|
||||||
@ -56,9 +58,15 @@ Pipeline(const string &name, int num_stages) :
|
|||||||
// This flag is true only during the call to cycle().
|
// This flag is true only during the call to cycle().
|
||||||
_cycling = false;
|
_cycling = false;
|
||||||
|
|
||||||
|
#else
|
||||||
|
if (num_stages != 1) {
|
||||||
|
pipeline_cat.warning()
|
||||||
|
<< "Requested " << num_stages
|
||||||
|
<< " pipeline stages but multithreaded render pipelines not enabled in build.\n";
|
||||||
|
}
|
||||||
#endif // THREADED_PIPELINE
|
#endif // THREADED_PIPELINE
|
||||||
|
|
||||||
set_num_stages(num_stages);
|
nassertv(num_stages >= 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user