avoid potential conflict between src/emu/video/poly.h and src/osd/windows/winwork.c / src/osd/sdl/sdlwork.c defines (nw)

This commit is contained in:
Oliver Stöneberg 2014-08-07 18:38:33 +00:00
parent 03599dbedb
commit c9e0a4c0d7

View File

@ -41,7 +41,7 @@
//************************************************************************** //**************************************************************************
// keep statistics // keep statistics
#define KEEP_STATISTICS 0 #define KEEP_POLY_STATISTICS 0
// turn this on to log the reasons for any long waits // turn this on to log the reasons for any long waits
#define LOG_WAITS 0 #define LOG_WAITS 0
@ -268,7 +268,7 @@ private:
UINT32 m_triangles; // number of triangles queued UINT32 m_triangles; // number of triangles queued
UINT32 m_quads; // number of quads queued UINT32 m_quads; // number of quads queued
UINT64 m_pixels; // number of pixels rendered UINT64 m_pixels; // number of pixels rendered
#if KEEP_STATISTICS #if KEEP_POLY_STATISTICS
UINT32 m_conflicts[WORK_MAX_THREADS]; // number of conflicts found, per thread UINT32 m_conflicts[WORK_MAX_THREADS]; // number of conflicts found, per thread
UINT32 m_resolved[WORK_MAX_THREADS]; // number of conflicts resolved, per thread UINT32 m_resolved[WORK_MAX_THREADS]; // number of conflicts resolved, per thread
#endif #endif
@ -292,7 +292,7 @@ poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(runnin
m_quads(0), m_quads(0),
m_pixels(0) m_pixels(0)
{ {
#if KEEP_STATISTICS #if KEEP_POLY_STATISTICS
memset(m_conflicts, 0, sizeof(m_conflicts)); memset(m_conflicts, 0, sizeof(m_conflicts));
memset(m_resolved, 0, sizeof(m_resolved)); memset(m_resolved, 0, sizeof(m_resolved));
#endif #endif
@ -319,7 +319,7 @@ poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(screen
m_quads(0), m_quads(0),
m_pixels(0) m_pixels(0)
{ {
#if KEEP_STATISTICS #if KEEP_POLY_STATISTICS
memset(m_conflicts, 0, sizeof(m_conflicts)); memset(m_conflicts, 0, sizeof(m_conflicts));
memset(m_resolved, 0, sizeof(m_resolved)); memset(m_resolved, 0, sizeof(m_resolved));
#endif #endif
@ -340,7 +340,7 @@ poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(screen
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys> template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::~poly_manager() poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::~poly_manager()
{ {
#if KEEP_STATISTICS #if KEEP_POLY_STATISTICS
{ {
// accumulate stats over the entire collection // accumulate stats over the entire collection
int conflicts = 0, resolved = 0; int conflicts = 0, resolved = 0;
@ -401,7 +401,7 @@ void *poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::work_item_cal
new_count_next = orig_count_next | (unitnum << 16); new_count_next = orig_count_next | (unitnum << 16);
} while (compare_exchange32((volatile INT32 *)&prevunit.count_next, orig_count_next, new_count_next) != orig_count_next); } while (compare_exchange32((volatile INT32 *)&prevunit.count_next, orig_count_next, new_count_next) != orig_count_next);
#if KEEP_STATISTICS #if KEEP_POLY_STATISTICS
// track resolved conflicts // track resolved conflicts
polygon.m_owner->m_conflicts[threadid]++; polygon.m_owner->m_conflicts[threadid]++;
if (orig_count_next != 0) if (orig_count_next != 0)