mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Remove std::string from VulkanTexture
This commit is contained in:
1 parent
c05ec8b520
commit
40ae99073b
4 files changed
+19
-23
No files matched your search
@@ -482,7 +482,10 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
||||
VkCommandBuffer cmdInit = (VkCommandBuffer)draw_->GetNativeObject(Draw::NativeObject::INIT_COMMANDBUFFER);
|
||||
|
||||
delete entry->vkTex;
|
||||
entry->vkTex = new VulkanTexture(vulkan);
|
||||
|
||||
char texName[64]{};
|
||||
snprintf(texName, sizeof(texName), "tex_%08x_%s", entry->addr, GeTextureFormatToString((GETextureFormat)entry->format, gstate.getClutPaletteFormat()));
|
||||
entry->vkTex = new VulkanTexture(vulkan, texName);
|
||||
VulkanTexture *image = entry->vkTex;
|
||||
|
||||
const VkComponentMapping *mapping;
|
||||
@@ -513,10 +516,6 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
||||
actualFmt = VULKAN_8888_FORMAT;
|
||||
}
|
||||
|
||||
char texName[128]{};
|
||||
snprintf(texName, sizeof(texName), "tex_%08x_%s", entry->addr, GeTextureFormatToString((GETextureFormat)entry->format, gstate.getClutPaletteFormat()));
|
||||
image->SetTag(texName);
|
||||
|
||||
bool allocSuccess = image->CreateDirect(cmdInit, plan.createW, plan.createH, plan.depth, plan.levelsToCreate, actualFmt, imageLayout, usage, 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