PostProcessing: Fix assertion on some shader/texture formats

This commit is contained in:
Stenzek 2023-12-28 15:30:56 +10:00
parent 63bc3883ea
commit 958b033a66
No known key found for this signature in database
3 changed files with 10 additions and 5 deletions

View file

@ -284,9 +284,10 @@ std::unique_ptr<MemoryCard> MemoryCard::Open(std::string_view filename)
mc->m_filename = filename;
if (!mc->LoadFromFile())
{
Log_InfoPrintf("Memory card at '%s' could not be read, formatting.", mc->m_filename.c_str());
Host::AddFormattedOSDMessage(5.0f, TRANSLATE("OSDMessage", "Memory card at '%s' could not be read, formatting."),
mc->m_filename.c_str());
Log_InfoFmt("Memory card at '{}' could not be read, formatting.", mc->m_filename);
Host::AddIconOSDMessage(fmt::format("memory_card_{}", filename), ICON_FA_SD_CARD,
fmt::format(TRANSLATE_FS("OSDMessage", "Memory card '{}' could not be read, formatting."),
Path::GetFileName(filename), Host::OSD_INFO_DURATION));
mc->Format();
}

View file

@ -4698,8 +4698,10 @@ void System::ToggleSoftwareRendering()
const GPURenderer new_renderer = g_gpu->IsHardwareRenderer() ? GPURenderer::Software : g_settings.gpu_renderer;
Host::AddKeyedFormattedOSDMessage("SoftwareRendering", 5.0f, TRANSLATE("OSDMessage", "Switching to %s renderer..."),
Settings::GetRendererDisplayName(new_renderer));
Host::AddIconOSDMessage("SoftwareRendering", ICON_FA_PAINT_ROLLER,
fmt::format(TRANSLATE_FS("OSDMessage", "Switching to {} renderer..."),
Settings::GetRendererDisplayName(new_renderer)),
Host::OSD_QUICK_DURATION);
RecreateGPU(new_renderer);
ResetPerformanceCounters();
}

View file

@ -33,6 +33,8 @@ const char* GPUTexture::GetFormatName(Format format)
"R8", // R8
"D16", // D16
"R16", // R16
"R16I", // R16I
"R16U", // R16U
"R16F", // R16F
"R32I", // R32I
"R32U", // R32U