mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 02:33:43 +01:00
Vulkan: Track tags on emu textures.
This commit is contained in:
1 parent
3445a82567
commit
5f27a2e60a
4 files changed
+11
No files matched your search
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user