D3D12: Migrate logging over to fmt
Migrates the logging over to the fmt-capable logger.
This commit is contained in:
parent
a9ef7e0e43
commit
d7834bd6b4
|
@ -148,7 +148,7 @@ void BoundingBox::Flush()
|
|||
const u32 copy_size = (end - start) * sizeof(ValueType);
|
||||
if (!m_upload_buffer.ReserveMemory(copy_size, sizeof(ValueType)))
|
||||
{
|
||||
WARN_LOG(VIDEO, "Executing command list while waiting for space in bbox stream buffer");
|
||||
WARN_LOG_FMT(VIDEO, "Executing command list while waiting for space in bbox stream buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
if (!m_upload_buffer.ReserveMemory(copy_size, sizeof(ValueType)))
|
||||
{
|
||||
|
|
|
@ -152,7 +152,7 @@ bool DXContext::CreateDevice(u32 adapter_index, bool enable_debug_layer)
|
|||
HRESULT hr = m_dxgi_factory->EnumAdapters(adapter_index, &adapter);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Adapter %u not found, using default", adapter_index);
|
||||
ERROR_LOG_FMT(VIDEO, "Adapter {} not found, using default", adapter_index);
|
||||
adapter = nullptr;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ bool DXContext::CreateDevice(u32 adapter_index, bool enable_debug_layer)
|
|||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Debug layer requested but not available.");
|
||||
ERROR_LOG_FMT(VIDEO, "Debug layer requested but not available.");
|
||||
enable_debug_layer = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,8 +210,8 @@ std::unique_ptr<DXPipeline> DXPipeline::Create(const AbstractPipelineConfig& con
|
|||
HRESULT hr = g_dx_context->GetDevice()->CreateGraphicsPipelineState(&desc, IID_PPV_ARGS(&pso));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN_LOG(VIDEO, "CreateGraphicsPipelineState() %sfailed with HRESULT %08X",
|
||||
cache_data ? "with cache data " : "", hr);
|
||||
WARN_LOG_FMT(VIDEO, "CreateGraphicsPipelineState() {}failed with HRESULT {:08X}",
|
||||
cache_data ? "with cache data " : "", hr);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ AbstractPipeline::CacheData DXPipeline::GetCacheData() const
|
|||
HRESULT hr = m_pipeline->GetCachedBlob(&blob);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN_LOG(VIDEO, "ID3D12Pipeline::GetCachedBlob() failed with HRESULT %08X", hr);
|
||||
WARN_LOG_FMT(VIDEO, "ID3D12Pipeline::GetCachedBlob() failed with HRESULT {:08X}", hr);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,8 @@ void DXTexture::Load(u32 level, u32 width, u32 height, u32 row_length, const u8*
|
|||
if (!g_dx_context->GetTextureUploadBuffer().ReserveMemory(
|
||||
upload_size, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT))
|
||||
{
|
||||
WARN_LOG(VIDEO, "Executing command list while waiting for space in texture upload buffer");
|
||||
WARN_LOG_FMT(VIDEO,
|
||||
"Executing command list while waiting for space in texture upload buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
if (!g_dx_context->GetTextureUploadBuffer().ReserveMemory(
|
||||
upload_size, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT))
|
||||
|
|
|
@ -148,7 +148,7 @@ bool SamplerHeapManager::Lookup(const SamplerState& ss, D3D12_CPU_DESCRIPTOR_HAN
|
|||
{
|
||||
// We can clear at any time because the descriptors are copied prior to execution.
|
||||
// It's still not free, since we have to recreate all our samplers again.
|
||||
WARN_LOG(VIDEO, "Out of samplers, resetting CPU heap");
|
||||
WARN_LOG_FMT(VIDEO, "Out of samplers, resetting CPU heap");
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -653,8 +653,8 @@ void Renderer::UpdateDescriptorTables()
|
|||
const bool uav_update_failed = (m_dirty_bits & DirtyState_PS_UAV) && !UpdateUAVDescriptorTable();
|
||||
if (texture_update_failed || sampler_update_failed || uav_update_failed)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Executing command list while waiting for temporary %s",
|
||||
texture_update_failed ? "descriptors" : "samplers");
|
||||
WARN_LOG_FMT(VIDEO, "Executing command list while waiting for temporary {}",
|
||||
texture_update_failed ? "descriptors" : "samplers");
|
||||
ExecuteCommandList(false);
|
||||
SetRootSignatures();
|
||||
SetDescriptorHeaps();
|
||||
|
|
|
@ -80,7 +80,7 @@ void VertexManager::ResetBuffer(u32 vertex_stride)
|
|||
if (!has_vbuffer_allocation || !has_ibuffer_allocation)
|
||||
{
|
||||
// Flush any pending commands first, so that we can wait on the fences
|
||||
WARN_LOG(VIDEO, "Executing command list while waiting for space in vertex/index buffer");
|
||||
WARN_LOG_FMT(VIDEO, "Executing command list while waiting for space in vertex/index buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
|
||||
// Attempt to allocate again, this may cause a fence wait
|
||||
|
@ -182,7 +182,7 @@ bool VertexManager::ReserveConstantStorage()
|
|||
}
|
||||
|
||||
// The only places that call constant updates are safe to have state restored.
|
||||
WARN_LOG(VIDEO, "Executing command list while waiting for space in uniform buffer");
|
||||
WARN_LOG_FMT(VIDEO, "Executing command list while waiting for space in uniform buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
|
||||
// Since we are on a new command buffer, all constants have been invalidated, and we need
|
||||
|
@ -244,7 +244,7 @@ void VertexManager::UploadUtilityUniforms(const void* data, u32 data_size)
|
|||
if (!m_uniform_stream_buffer.ReserveMemory(data_size,
|
||||
D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT))
|
||||
{
|
||||
WARN_LOG(VIDEO, "Executing command buffer while waiting for ext space in uniform buffer");
|
||||
WARN_LOG_FMT(VIDEO, "Executing command buffer while waiting for ext space in uniform buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
|
|||
if (!m_texel_stream_buffer.ReserveMemory(data_size, elem_size))
|
||||
{
|
||||
// Try submitting cmdbuffer.
|
||||
WARN_LOG(VIDEO, "Submitting command buffer while waiting for space in texel buffer");
|
||||
WARN_LOG_FMT(VIDEO, "Submitting command buffer while waiting for space in texel buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
if (!m_texel_stream_buffer.ReserveMemory(data_size, elem_size))
|
||||
{
|
||||
|
@ -296,7 +296,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
|
|||
if (!m_texel_stream_buffer.ReserveMemory(reserve_size, elem_size))
|
||||
{
|
||||
// Try submitting cmdbuffer.
|
||||
WARN_LOG(VIDEO, "Submitting command buffer while waiting for space in texel buffer");
|
||||
WARN_LOG_FMT(VIDEO, "Submitting command buffer while waiting for space in texel buffer");
|
||||
Renderer::GetInstance()->ExecuteCommandList(false);
|
||||
if (!m_texel_stream_buffer.ReserveMemory(reserve_size, elem_size))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue