trunk/src/emu/video/poly.h
| r31550 | r31551 | |
| 41 | 41 | //************************************************************************** |
| 42 | 42 | |
| 43 | 43 | // keep statistics |
| 44 | | #define KEEP_STATISTICS 0 |
| 44 | #define KEEP_POLY_STATISTICS 0 |
| 45 | 45 | |
| 46 | 46 | // turn this on to log the reasons for any long waits |
| 47 | 47 | #define LOG_WAITS 0 |
| r31550 | r31551 | |
| 268 | 268 | UINT32 m_triangles; // number of triangles queued |
| 269 | 269 | UINT32 m_quads; // number of quads queued |
| 270 | 270 | UINT64 m_pixels; // number of pixels rendered |
| 271 | | #if KEEP_STATISTICS |
| 271 | #if KEEP_POLY_STATISTICS |
| 272 | 272 | UINT32 m_conflicts[WORK_MAX_THREADS]; // number of conflicts found, per thread |
| 273 | 273 | UINT32 m_resolved[WORK_MAX_THREADS]; // number of conflicts resolved, per thread |
| 274 | 274 | #endif |
| r31550 | r31551 | |
| 292 | 292 | m_quads(0), |
| 293 | 293 | m_pixels(0) |
| 294 | 294 | { |
| 295 | | #if KEEP_STATISTICS |
| 295 | #if KEEP_POLY_STATISTICS |
| 296 | 296 | memset(m_conflicts, 0, sizeof(m_conflicts)); |
| 297 | 297 | memset(m_resolved, 0, sizeof(m_resolved)); |
| 298 | 298 | #endif |
| r31550 | r31551 | |
| 319 | 319 | m_quads(0), |
| 320 | 320 | m_pixels(0) |
| 321 | 321 | { |
| 322 | | #if KEEP_STATISTICS |
| 322 | #if KEEP_POLY_STATISTICS |
| 323 | 323 | memset(m_conflicts, 0, sizeof(m_conflicts)); |
| 324 | 324 | memset(m_resolved, 0, sizeof(m_resolved)); |
| 325 | 325 | #endif |
| r31550 | r31551 | |
| 340 | 340 | template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys> |
| 341 | 341 | poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::~poly_manager() |
| 342 | 342 | { |
| 343 | | #if KEEP_STATISTICS |
| 343 | #if KEEP_POLY_STATISTICS |
| 344 | 344 | { |
| 345 | 345 | // accumulate stats over the entire collection |
| 346 | 346 | int conflicts = 0, resolved = 0; |
| r31550 | r31551 | |
| 401 | 401 | new_count_next = orig_count_next | (unitnum << 16); |
| 402 | 402 | } while (compare_exchange32((volatile INT32 *)&prevunit.count_next, orig_count_next, new_count_next) != orig_count_next); |
| 403 | 403 | |
| 404 | | #if KEEP_STATISTICS |
| 404 | #if KEEP_POLY_STATISTICS |
| 405 | 405 | // track resolved conflicts |
| 406 | 406 | polygon.m_owner->m_conflicts[threadid]++; |
| 407 | 407 | if (orig_count_next != 0) |