Skip to content

Commit

Permalink
Vulkan: Only call EndCreate on the texture if it actually exists.. Th…
Browse files Browse the repository at this point in the history
…ough not having one would be bad.
  • Loading branch information
hrydgard committed Dec 3, 2017
1 parent 1cb3564 commit 97bdc72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/Vulkan/TextureCacheVulkan.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 97bdc72

Please sign in to comment.