Previous 199869 Revisions Next

r31551 Thursday 7th August, 2014 at 18:38:33 UTC by Oliver Stöneberg
avoid potential conflict between src/emu/video/poly.h and src/osd/windows/winwork.c / src/osd/sdl/sdlwork.c defines (nw)
[src/emu/video]poly.h

trunk/src/emu/video/poly.h
r31550r31551
4141//**************************************************************************
4242
4343// keep statistics
44#define KEEP_STATISTICS                 0
44#define KEEP_POLY_STATISTICS            0
4545
4646// turn this on to log the reasons for any long waits
4747#define LOG_WAITS                       0
r31550r31551
268268   UINT32              m_triangles;                // number of triangles queued
269269   UINT32              m_quads;                    // number of quads queued
270270   UINT64              m_pixels;                   // number of pixels rendered
271#if KEEP_STATISTICS
271#if KEEP_POLY_STATISTICS
272272   UINT32              m_conflicts[WORK_MAX_THREADS]; // number of conflicts found, per thread
273273   UINT32              m_resolved[WORK_MAX_THREADS];   // number of conflicts resolved, per thread
274274#endif
r31550r31551
292292      m_quads(0),
293293      m_pixels(0)
294294{
295#if KEEP_STATISTICS
295#if KEEP_POLY_STATISTICS
296296   memset(m_conflicts, 0, sizeof(m_conflicts));
297297   memset(m_resolved, 0, sizeof(m_resolved));
298298#endif
r31550r31551
319319      m_quads(0),
320320      m_pixels(0)
321321{
322#if KEEP_STATISTICS
322#if KEEP_POLY_STATISTICS
323323   memset(m_conflicts, 0, sizeof(m_conflicts));
324324   memset(m_resolved, 0, sizeof(m_resolved));
325325#endif
r31550r31551
340340template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
341341poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::~poly_manager()
342342{
343#if KEEP_STATISTICS
343#if KEEP_POLY_STATISTICS
344344{
345345   // accumulate stats over the entire collection
346346   int conflicts = 0, resolved = 0;
r31550r31551
401401               new_count_next = orig_count_next | (unitnum << 16);
402402            } while (compare_exchange32((volatile INT32 *)&prevunit.count_next, orig_count_next, new_count_next) != orig_count_next);
403403
404#if KEEP_STATISTICS
404#if KEEP_POLY_STATISTICS
405405            // track resolved conflicts
406406            polygon.m_owner->m_conflicts[threadid]++;
407407            if (orig_count_next != 0)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team