mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix race condition during Vulkan startup
This commit is contained in:
1 parent
85ddf03c4b
commit
27650fe3e4
2 files changed
+4
-6
No files matched your search
@@ -256,16 +256,14 @@ void TextureCacheVulkan::DeviceRestore(Draw::DrawContext *draw) {
|
||||
VkResult res = vkCreateSampler(vulkan->GetDevice(), &samp, nullptr, &samplerNearest_);
|
||||
_assert_(res == VK_SUCCESS);
|
||||
|
||||
VkCommandBuffer cmdInit = (VkCommandBuffer)draw_->GetNativeObject(Draw::NativeObject::INIT_COMMANDBUFFER);
|
||||
CompileScalingShader(cmdInit);
|
||||
CompileScalingShader();
|
||||
|
||||
computeShaderManager_.DeviceRestore(draw);
|
||||
}
|
||||
|
||||
void TextureCacheVulkan::NotifyConfigChanged() {
|
||||
TextureCacheCommon::NotifyConfigChanged();
|
||||
VkCommandBuffer cmdInit = (VkCommandBuffer)draw_->GetNativeObject(Draw::NativeObject::INIT_COMMANDBUFFER);
|
||||
CompileScalingShader(cmdInit);
|
||||
CompileScalingShader();
|
||||
}
|
||||
|
||||
static std::string ReadShaderSrc(const Path &filename) {
|
||||
@@ -364,7 +362,7 @@ bool TextureCacheVulkan::CompileMultipassShader(VulkanContext *vulkan, const Tex
|
||||
return true;
|
||||
}
|
||||
|
||||
void TextureCacheVulkan::CompileScalingShader(VkCommandBuffer cmdInit) {
|
||||
void TextureCacheVulkan::CompileScalingShader() {
|
||||
if (!draw_) {
|
||||
// Something is very wrong.
|
||||
return;
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
|
||||
void BuildTexture(TexCacheEntry *const entry) override;
|
||||
|
||||
void CompileScalingShader(VkCommandBuffer cmdInit);
|
||||
void CompileScalingShader();
|
||||
bool CompileMultipassShader(VulkanContext *vulkan, const TextureShaderInfo &shaderInfo, std::string *error);
|
||||
void ClearScalingShaders(VulkanContext *vulkan);
|
||||
bool HasScalingShader() const;
|
||||
|
||||
Reference in new issue
Block a user