mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
support TexMemViewer on opt-4 build
This commit is contained in:
parent
f1e660373d
commit
ff39b33308
@ -7503,11 +7503,9 @@ upload_texture(CLP(TextureContext) *gtc, bool force) {
|
|||||||
gtc->_height = height;
|
gtc->_height = height;
|
||||||
gtc->_depth = depth;
|
gtc->_depth = depth;
|
||||||
|
|
||||||
#ifdef DO_PSTATS
|
|
||||||
if (!image.is_null()) {
|
if (!image.is_null()) {
|
||||||
gtc->update_data_size_bytes(get_texture_memory_size(tex));
|
gtc->update_data_size_bytes(get_texture_memory_size(tex));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (tex->get_post_load_store_cache()) {
|
if (tex->get_post_load_store_cache()) {
|
||||||
tex->set_post_load_store_cache(false);
|
tex->set_post_load_store_cache(false);
|
||||||
|
@ -71,7 +71,6 @@ get_resident() const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void BufferContext::
|
INLINE void BufferContext::
|
||||||
set_active(bool flag) {
|
set_active(bool flag) {
|
||||||
#ifdef DO_PSTATS
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
_residency_state |= BufferResidencyTracker::S_active;
|
_residency_state |= BufferResidencyTracker::S_active;
|
||||||
// Assume that rendering the object automatically makes it
|
// Assume that rendering the object automatically makes it
|
||||||
@ -81,7 +80,6 @@ set_active(bool flag) {
|
|||||||
_residency_state &= ~BufferResidencyTracker::S_active;
|
_residency_state &= ~BufferResidencyTracker::S_active;
|
||||||
}
|
}
|
||||||
set_owning_chain(&_residency->_chains[_residency_state]);
|
set_owning_chain(&_residency->_chains[_residency_state]);
|
||||||
#endif // DO_PSTATS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -93,14 +91,12 @@ set_active(bool flag) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void BufferContext::
|
INLINE void BufferContext::
|
||||||
set_resident(bool flag) {
|
set_resident(bool flag) {
|
||||||
#ifdef DO_PSTATS
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
_residency_state |= BufferResidencyTracker::S_resident;
|
_residency_state |= BufferResidencyTracker::S_resident;
|
||||||
} else {
|
} else {
|
||||||
_residency_state &= ~BufferResidencyTracker::S_resident;
|
_residency_state &= ~BufferResidencyTracker::S_resident;
|
||||||
}
|
}
|
||||||
set_owning_chain(&_residency->_chains[_residency_state]);
|
set_owning_chain(&_residency->_chains[_residency_state]);
|
||||||
#endif // DO_PSTATS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -56,7 +56,6 @@ BufferResidencyTracker::
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void BufferResidencyTracker::
|
void BufferResidencyTracker::
|
||||||
begin_frame(Thread *current_thread) {
|
begin_frame(Thread *current_thread) {
|
||||||
#ifdef DO_PSTATS
|
|
||||||
int this_frame = ClockObject::get_global_clock()->get_frame_count(current_thread);
|
int this_frame = ClockObject::get_global_clock()->get_frame_count(current_thread);
|
||||||
if (_active_frame != this_frame) {
|
if (_active_frame != this_frame) {
|
||||||
_active_frame = this_frame;
|
_active_frame = this_frame;
|
||||||
@ -68,7 +67,6 @@ begin_frame(Thread *current_thread) {
|
|||||||
move_inactive(_chains[S_inactive_resident],
|
move_inactive(_chains[S_inactive_resident],
|
||||||
_chains[S_active_resident]);
|
_chains[S_active_resident]);
|
||||||
}
|
}
|
||||||
#endif // DO_PSTATS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user