Fix: Vulkan: Stalling shader compilation
This PR fixes an issue that shaders compilation could stall. This could be seen in the viewport (sometime not showing first EEVEE render) but was more prominent when running test cases. Pull Request: https://projects.blender.org/blender/blender/pulls/134020
This commit is contained in:
@@ -42,7 +42,7 @@ static std::optional<std::string> cache_dir_get()
|
||||
|
||||
VKShaderCompiler::VKShaderCompiler()
|
||||
{
|
||||
task_pool_ = BLI_task_pool_create(nullptr, TASK_PRIORITY_LOW);
|
||||
task_pool_ = BLI_task_pool_create(nullptr, TASK_PRIORITY_HIGH);
|
||||
cache_dir = cache_dir_get();
|
||||
}
|
||||
|
||||
@@ -269,8 +269,10 @@ void VKShaderCompiler::run(TaskPool *__restrict /*pool*/, void *task_data)
|
||||
if (has_not_succeeded) {
|
||||
shader.compilation_failed = true;
|
||||
}
|
||||
shader.compilation_finished = true;
|
||||
shader.finalize_post();
|
||||
/* Setting compilation finished needs to be the last step. It is used to detect if a compilation
|
||||
* action of a batch has finished. See `VKShaderCompiler::batch_is_ready` */
|
||||
shader.compilation_finished = true;
|
||||
}
|
||||
|
||||
bool VKShaderCompiler::batch_is_ready(BatchHandle handle)
|
||||
|
||||
Reference in New Issue
Block a user