diff options
| author | 2020-11-20 04:46:53 -0500 | |
|---|---|---|
| committer | 2020-11-20 04:46:56 -0500 | |
| commit | 01db5cf20313125e2a88a6df1bb1696c0f08f346 (patch) | |
| tree | 8a997d0dda619b2abf2ea8759178dcaf45e9ae83 | |
| parent | async_shaders: Simplify implementation of GetCompletedWork() (diff) | |
| download | yuzu-01db5cf20313125e2a88a6df1bb1696c0f08f346.tar.gz yuzu-01db5cf20313125e2a88a6df1bb1696c0f08f346.tar.xz yuzu-01db5cf20313125e2a88a6df1bb1696c0f08f346.zip | |
async_shaders: emplace threads into the worker thread vector
Same behavior, but constructs the threads in place instead of moving
them.
| -rw-r--r-- | src/video_core/shader/async_shaders.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/shader/async_shaders.cpp b/src/video_core/shader/async_shaders.cpp index 85cda31c0..6920afdf2 100644 --- a/src/video_core/shader/async_shaders.cpp +++ b/src/video_core/shader/async_shaders.cpp | |||
| @@ -43,8 +43,8 @@ void AsyncShaders::AllocateWorkers() { | |||
| 43 | // Create workers | 43 | // Create workers |
| 44 | for (std::size_t i = 0; i < num_workers; i++) { | 44 | for (std::size_t i = 0; i < num_workers; i++) { |
| 45 | context_list.push_back(emu_window.CreateSharedContext()); | 45 | context_list.push_back(emu_window.CreateSharedContext()); |
| 46 | worker_threads.push_back( | 46 | worker_threads.emplace_back(&AsyncShaders::ShaderCompilerThread, this, |
| 47 | std::thread(&AsyncShaders::ShaderCompilerThread, this, context_list[i].get())); | 47 | context_list[i].get()); |
| 48 | } | 48 | } |
| 49 | } | 49 | } |
| 50 | 50 | ||