Vulkan: Track tags on emu textures.

This commit is contained in:
Unknown W. Brackets committed 2018-04-06 21:43:18 -07:00
1 parent 3445a82567
commit 5f27a2e60a
4 files changed
+11

No files matched your search

+5
View File
@@ -317,6 +317,7 @@ void TextureCacheVulkan::BindTexture(TexCacheEntry *entry) {
return;
}
entry->vkTex->Touch();
imageView_ = entry->vkTex->GetImageView();
SamplerCacheKey key{};
UpdateSamplingParams(*entry, key);
@@ -580,6 +581,10 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
break;
}
char texName[128]{};
snprintf(texName, sizeof(texName), "Texture%08x", entry->addr);
image->SetTag(texName);
bool allocSuccess = image->CreateDirect(cmdInit, w * scaleFactor, h * scaleFactor, maxLevel + 1, actualFmt, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, mapping);
if (!allocSuccess && !lowMemoryMode_) {
WARN_LOG_REPORT(G3D, "Texture cache ran out of GPU memory; switching to low memory mode");