VK: scale auto shader compiler workers on wide CPUs
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.9, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.9, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.9, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.9, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (0, 51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (1, 8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (aarch64, clang, clangarm64, ARM64, windows-11-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (x86_64, clang, clang64, X64, windows-2025) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run

This commit is contained in:
jfleezy23 2026-03-15 01:53:07 -07:00 committed by kd-11
parent 1627757608
commit 5274210ba8

View file

@ -216,16 +216,27 @@ namespace vk
return {};
}
void initialize_pipe_compiler(int num_worker_threads)
{
if (num_worker_threads == 0)
{
// Select optimal number of compiler threads
const auto hw_threads = utils::get_thread_count();
if (hw_threads > 12)
{
num_worker_threads = 6;
}
void initialize_pipe_compiler(int num_worker_threads)
{
if (num_worker_threads == 0)
{
// Select a conservative but modern default for async pipeline compilation.
// Older heuristics topped out too early on high-core CPUs and left large
// shader bursts queued longer than necessary.
const auto hw_threads = utils::get_thread_count();
if (hw_threads >= 24)
{
num_worker_threads = 12;
}
else if (hw_threads >= 16)
{
num_worker_threads = 8;
}
else if (hw_threads > 12)
{
num_worker_threads = 6;
}
else if (hw_threads > 8)
{
num_worker_threads = 4;
@ -234,11 +245,14 @@ namespace vk
{
num_worker_threads = 2;
}
else
{
num_worker_threads = 1;
}
}
else
{
num_worker_threads = 1;
}
rsx_log.notice("Async pipeline compiler auto-selected %d worker(s) for %u host thread(s).",
num_worker_threads, hw_threads);
}
ensure(num_worker_threads >= 1);
ensure(g_render_device); // "Cannot initialize pipe compiler before creating a logical device"