mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
fix: correct thread count and shadow projection uniform
- Add reserved client thread count to client threads in server generation calculation. - Set projection matrix uniform only for non-shadow rendering.
This commit is contained in:
@@ -110,7 +110,7 @@ inline size_t get_server_gen_threads(RunMode mode) {
|
||||
|
||||
auto update_pool = get_server_compute_treads(mode);
|
||||
|
||||
auto client_pool = get_client_threads(mode);
|
||||
auto client = get_client_threads(mode) + CLIENT_RESERVED_THREADS;
|
||||
|
||||
size_t remain = available;
|
||||
|
||||
@@ -118,7 +118,7 @@ inline size_t get_server_gen_threads(RunMode mode) {
|
||||
|
||||
remain -= std::min(remain, update_pool);
|
||||
|
||||
remain -= std::min(remain, client_pool);
|
||||
remain -= std::min(remain, client);
|
||||
|
||||
return std::max<size_t>(1, remain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user