9 #ifndef __PDG_WORKITEM_STATETRACKER_H__
10 #define __PDG_WORKITEM_STATETRACKER_H__
28 myWorkItemCount.store(0);
33 myStateCounts[i].store(0);
38 {
return myWorkItemCount.relaxedLoad(); }
41 {
return stateCounter(state).relaxedLoad(); }
45 stateCounter(state).add(1);
46 myWorkItemCount.add(1);
51 stateCounter(state).add(-1);
52 myWorkItemCount.add(-1);
59 stateCounter(prev).add(-1);
60 stateCounter(cur).add(1);
65 {
return myStateCounts[(
int)state]; }
67 {
return myStateCounts[(
int)state]; }
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
PDG_WorkItemStateTracker()
int workItemCount() const
PDG_WorkItemState
Enum of possible work item states.
void updateWorkItem(PDG_WorkItemState prev, PDG_WorkItemState cur)
int stateCount(PDG_WorkItemState state) const
void removeWorkItem(PDG_WorkItemState state)
void addWorkItem(PDG_WorkItemState state)