| 59 | } |
| 60 | |
| 61 | void SharedLazyTessellationCache::getNextRenderThreadWorkState() |
| 62 | { |
| 63 | const size_t id = numRenderThreads.fetch_add(1); |
| 64 | if (id >= NUM_PREALLOC_THREAD_WORK_STATES) init_t_state = new ThreadWorkState(true); |
| 65 | else init_t_state = &threadWorkState[id]; |
| 66 | |
| 67 | /* critical section for updating link list with new thread state */ |
| 68 | linkedlist_mtx.lock(); |
| 69 | init_t_state->next = current_t_state; |
| 70 | current_t_state = init_t_state; |
| 71 | linkedlist_mtx.unlock(); |
| 72 | } |
| 73 | |
| 74 | void SharedLazyTessellationCache::waitForUsersLessEqual(ThreadWorkState *const t_state, |
| 75 | const unsigned int users) |
no test coverage detected