Update thread names (#1120)

This commit is contained in:
goeiecool9999 2024-03-15 23:06:48 +01:00 committed by GitHub
parent 731713de3a
commit eaa82817dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 29 additions and 12 deletions

View file

@ -8,6 +8,7 @@
#include <glslang/Public/ShaderLang.h>
#include <glslang/SPIRV/GlslangToSpv.h>
#include <util/helpers/helpers.h>
bool s_isLoadingShadersVk{ false };
class FileCache* s_spirvCache{nullptr};
@ -155,6 +156,7 @@ public:
void CompilerThreadFunc()
{
SetThreadName("vkShaderComp");
while (m_threadsActive.load(std::memory_order::relaxed))
{
s_compilationQueueCount.decrementWithWait();

View file

@ -408,6 +408,7 @@ bool VulkanPipelineStableCache::DeserializePipeline(MemStreamReader& memReader,
int VulkanPipelineStableCache::CompilerThread()
{
SetThreadName("plCacheCompiler");
while (m_numCompilationThreads != 0)
{
std::vector<uint8> pipelineData = m_compilationQueue.pop();
@ -421,6 +422,7 @@ int VulkanPipelineStableCache::CompilerThread()
void VulkanPipelineStableCache::WorkerThread()
{
SetThreadName("plCacheWriter");
while (true)
{
CachedPipeline* job;

View file

@ -1986,6 +1986,7 @@ void VulkanRenderer::WaitCommandBufferFinished(uint64 commandBufferId)
void VulkanRenderer::PipelineCacheSaveThread(size_t cache_size)
{
SetThreadName("vkDriverPlCache");
const auto dir = ActiveSettings::GetCachePath("shaderCache/driver/vk");
if (!fs::exists(dir))
{

View file

@ -190,6 +190,7 @@ std::queue<PipelineCompiler*> g_compilePipelineRequests;
void compilePipeline_thread(sint32 threadIndex)
{
SetThreadName("compilePl");
#ifdef _WIN32
// one thread runs at normal priority while the others run at lower priority
if(threadIndex != 0)