GPUDevice: Move debug messages over to fmt

This commit is contained in:
Stenzek
2023-09-21 00:42:27 +10:00
parent 184b0a1a52
commit b678fcd874
16 changed files with 68 additions and 102 deletions

View File

@ -781,18 +781,13 @@ float D3D11Device::GetAndResetAccumulatedGPUTime()
return value;
}
void D3D11Device::PushDebugGroup(const char* fmt, ...)
void D3D11Device::PushDebugGroup(const char* name)
{
#ifdef _DEBUG
if (!m_annotation)
return;
std::va_list ap;
va_start(ap, fmt);
std::string str(StringUtil::StdStringFromFormatV(fmt, ap));
va_end(ap);
m_annotation->BeginEvent(StringUtil::UTF8StringToWideString(str).c_str());
m_annotation->BeginEvent(StringUtil::UTF8StringToWideString(name).c_str());
#endif
}
@ -806,18 +801,13 @@ void D3D11Device::PopDebugGroup()
#endif
}
void D3D11Device::InsertDebugMessage(const char* fmt, ...)
void D3D11Device::InsertDebugMessage(const char* msg)
{
#ifdef _DEBUG
if (!m_annotation)
return;
std::va_list ap;
va_start(ap, fmt);
std::string str(StringUtil::StdStringFromFormatV(fmt, ap));
va_end(ap);
m_annotation->SetMarker(StringUtil::UTF8StringToWideString(str).c_str());
m_annotation->SetMarker(StringUtil::UTF8StringToWideString(msg).c_str());
#endif
}