mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-28 01:25:09 +00:00
Update shader_manager.cpp
This commit is contained in:
parent
fd9ca88983
commit
6bb0de1a9c
@ -438,7 +438,7 @@ namespace skyline::gpu {
|
||||
Shader::Maxwell::ConvertLegacyToGeneric(program, runtimeInfo);
|
||||
}
|
||||
|
||||
auto future = std::async(std::launch::async, [this, &runtimeInfo, &program, &bindings, hash]() {
|
||||
auto compileShader = [this, &runtimeInfo, &program, &bindings, hash]() {
|
||||
auto spirvEmitted{Shader::Backend::SPIRV::EmitSPIRV(profile, runtimeInfo, program, bindings)};
|
||||
auto spirv{ProcessShaderBinary(true, hash, span<u32>{spirvEmitted}.cast<u8>()).cast<u32>()};
|
||||
|
||||
@ -447,9 +447,14 @@ namespace skyline::gpu {
|
||||
.codeSize = spirv.size_bytes(),
|
||||
};
|
||||
return (*gpu.vkDevice).createShaderModule(createInfo, nullptr, *gpu.vkDevice.getDispatcher());
|
||||
});
|
||||
};
|
||||
|
||||
return future.get();
|
||||
if (*gpu.getState().settings->useAsyncShaders) {
|
||||
auto future = std::async(std::launch::async, compileShader);
|
||||
return future.get();
|
||||
} else {
|
||||
return compileShader();
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderManager::ResetPools() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user