Permalink
Browse files

Vulkan: Only call EndCreate on the texture if it actually exists.. Th…

…ough not having one would be bad.
  • Loading branch information...
hrydgard committed Dec 3, 2017
1 parent 1cb3564 commit 97bdc72d909478349270eb6517ffd1399d5586f5
Showing with 2 additions and 2 deletions.
  1. +2 −2 GPU/Vulkan/TextureCacheVulkan.cpp
@@ -589,6 +589,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
}
if (!allocSuccess) {
ERROR_LOG(G3D, "Failed to create texture (%dx%d)", w, h);
delete entry->vkTex;
entry->vkTex = nullptr;
}
@@ -650,10 +651,9 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
if (replaced.Valid()) {
entry->SetAlphaStatus(TexCacheEntry::Status(replaced.AlphaStatus()));
}
entry->vkTex->texture_->EndCreate(cmdInit);
}
entry->vkTex->texture_->EndCreate(cmdInit);
gstate_c.SetTextureFullAlpha(entry->GetAlphaStatus() == TexCacheEntry::STATUS_ALPHA_FULL);
}

0 comments on commit 97bdc72

Please sign in to comment.