Use the global curFrame counter. No need for a vector for pushing cmdbufs.

This commit is contained in:
Henrik Rydgård committed 2017-11-01 08:47:50 +01:00
1 parent 90d4296a6a
commit 6a8f72a327
10 files changed
+35 -45

No files matched your search

+8 -1
View File
@@ -550,6 +550,11 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
int h = gstate.getTextureHeight(0);
ReplacedTexture &replaced = replacer_.FindReplacement(cachekey, entry->fullhash, w, h);
if (replaced.GetSize(0, w, h)) {
if (replaceImages) {
// Since we're replacing the texture, we can't replace the image inside.
ReleaseTexture(entry, true);
replaceImages = false;
}
// We're replacing, so we won't scale.
scaleFactor = 1;
entry->status |= TexCacheEntry::STATUS_IS_SCALED;
@@ -586,7 +591,9 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
if (replaced.Valid()) {
actualFmt = ToVulkanFormat(replaced.Format(0));
}
if (!entry->vkTex) {
if (!entry->vkTex) { // Change to "if (true) {" to always recreate.
delete entry->vkTex;
entry->vkTex = new CachedTextureVulkan();
entry->vkTex->texture_ = new VulkanTexture(vulkan_, allocator_);
VulkanTexture *image = entry->vkTex->texture_;