MCPcopy Create free account
hub / github.com/RenderKit/embree / getNextRenderThreadWorkState

Method getNextRenderThreadWorkState

kernels/subdiv/tessellation_cache.cpp:61–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 1

threadStateFunction · 0.80

Calls 2

lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected