mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
log instead of printf
This commit is contained in:
parent
38cbd3e03a
commit
a72136419c
@ -240,7 +240,7 @@ MTL::PrimitiveType GetMtlPrimitiveType(LattePrimitiveMode primitiveMode)
|
|||||||
case Latte::LATTE_VGT_PRIMITIVE_TYPE::E_PRIMITIVE_TYPE::LINE_LOOP:
|
case Latte::LATTE_VGT_PRIMITIVE_TYPE::E_PRIMITIVE_TYPE::LINE_LOOP:
|
||||||
return MTL::PrimitiveTypeLineStrip; // line loops are emulated as line strips with an extra connecting strip at the end
|
return MTL::PrimitiveTypeLineStrip; // line loops are emulated as line strips with an extra connecting strip at the end
|
||||||
case Latte::LATTE_VGT_PRIMITIVE_TYPE::E_PRIMITIVE_TYPE::LINE_STRIP_ADJACENT: // Tropical Freeze level 3-6
|
case Latte::LATTE_VGT_PRIMITIVE_TYPE::E_PRIMITIVE_TYPE::LINE_STRIP_ADJACENT: // Tropical Freeze level 3-6
|
||||||
debug_printf("Metal doesn't support line strip adjacent primitive, using line strip instead\n");
|
cemuLog_logOnce(LogType::Force, "Metal doesn't support line strip adjacent primitive, using line strip instead");
|
||||||
return MTL::PrimitiveTypeLineStrip;
|
return MTL::PrimitiveTypeLineStrip;
|
||||||
case Latte::LATTE_VGT_PRIMITIVE_TYPE::E_PRIMITIVE_TYPE::TRIANGLES:
|
case Latte::LATTE_VGT_PRIMITIVE_TYPE::E_PRIMITIVE_TYPE::TRIANGLES:
|
||||||
return MTL::PrimitiveTypeTriangle;
|
return MTL::PrimitiveTypeTriangle;
|
||||||
|
@ -32,7 +32,7 @@ bool MetalLayerHandle::AcquireDrawable()
|
|||||||
m_drawable = m_layer->nextDrawable();
|
m_drawable = m_layer->nextDrawable();
|
||||||
if (!m_drawable)
|
if (!m_drawable)
|
||||||
{
|
{
|
||||||
debug_printf("layer %p failed to acquire next drawable\n", this);
|
cemuLog_log(LogType::Force, "layer {} failed to acquire next drawable", (void*)this);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ void MetalPipelineCompiler::InitFromStateRender(const LatteFetchShader* fetchSha
|
|||||||
layout->setStepFunction(MTL::VertexStepFunctionPerInstance);
|
layout->setStepFunction(MTL::VertexStepFunctionPerInstance);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
debug_printf("unimplemented vertex fetch type %u\n", (uint32)fetchType.value());
|
cemuLog_log(LogType::Force, "unimplemented vertex fetch type {}", (uint32)fetchType.value());
|
||||||
cemu_assert(false);
|
cemu_assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ MetalRenderer::MetalRenderer()
|
|||||||
MTL::Library* utilityLibrary = m_device->newLibrary(ToNSString(utilityShaderSource), nullptr, &error);
|
MTL::Library* utilityLibrary = m_device->newLibrary(ToNSString(utilityShaderSource), nullptr, &error);
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
debug_printf("failed to create utility library (error: %s)\n", error->localizedDescription()->utf8String());
|
cemuLog_log(LogType::Force, "failed to create utility library (error: {})", error->localizedDescription()->utf8String());
|
||||||
error->release();
|
error->release();
|
||||||
throw;
|
throw;
|
||||||
return;
|
return;
|
||||||
@ -454,7 +454,7 @@ void MetalRenderer::ImguiEnd()
|
|||||||
|
|
||||||
if (m_encoderType != MetalEncoderType::Render)
|
if (m_encoderType != MetalEncoderType::Render)
|
||||||
{
|
{
|
||||||
debug_printf("no render command encoder, cannot draw ImGui\n");
|
cemuLog_logOnce(LogType::Force, "no render command encoder, cannot draw ImGui");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -850,7 +850,7 @@ void MetalRenderer::draw_beginSequence()
|
|||||||
LatteSHRC_UpdateActiveShaders();
|
LatteSHRC_UpdateActiveShaders();
|
||||||
if (LatteGPUState.activeShaderHasError)
|
if (LatteGPUState.activeShaderHasError)
|
||||||
{
|
{
|
||||||
debug_printf("Skipping drawcalls due to shader error\n");
|
cemuLog_logOnce(LogType::Force, "Skipping drawcalls due to shader error\n");
|
||||||
m_state.m_skipDrawSequence = true;
|
m_state.m_skipDrawSequence = true;
|
||||||
cemu_assert_debug(false);
|
cemu_assert_debug(false);
|
||||||
return;
|
return;
|
||||||
@ -863,14 +863,14 @@ void MetalRenderer::draw_beginSequence()
|
|||||||
LatteGPUState.repeatTextureInitialization = false;
|
LatteGPUState.repeatTextureInitialization = false;
|
||||||
if (!LatteMRT::UpdateCurrentFBO())
|
if (!LatteMRT::UpdateCurrentFBO())
|
||||||
{
|
{
|
||||||
debug_printf("Rendertarget invalid\n");
|
cemuLog_logOnce(LogType::Force, "Rendertarget invalid\n");
|
||||||
m_state.m_skipDrawSequence = true;
|
m_state.m_skipDrawSequence = true;
|
||||||
return; // no render target
|
return; // no render target
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasValidFramebufferAttached && !streamoutEnable)
|
if (!hasValidFramebufferAttached && !streamoutEnable)
|
||||||
{
|
{
|
||||||
debug_printf("Drawcall with no color buffer or depth buffer attached\n");
|
cemuLog_logOnce(LogType::Force, "Drawcall with no color buffer or depth buffer attached\n");
|
||||||
m_state.m_skipDrawSequence = true;
|
m_state.m_skipDrawSequence = true;
|
||||||
return; // no render target
|
return; // no render target
|
||||||
}
|
}
|
||||||
@ -1241,7 +1241,7 @@ void MetalRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
|
|||||||
verticesPerPrimitive = 3;
|
verticesPerPrimitive = 3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
debug_printf("invalid primitive mode %u\n", (uint32)primitiveMode);
|
cemuLog_log(LogType::Force, "unimplemented geometry shader primitive mode {}", (uint32)primitiveMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1804,7 +1804,7 @@ void MetalRenderer::BindStageResources(MTL::RenderCommandEncoder* renderCommandE
|
|||||||
uint32 binding = shader->resourceMapping.getTextureBaseBindingPoint() + i;
|
uint32 binding = shader->resourceMapping.getTextureBaseBindingPoint() + i;
|
||||||
if (binding >= MAX_MTL_TEXTURES)
|
if (binding >= MAX_MTL_TEXTURES)
|
||||||
{
|
{
|
||||||
debug_printf("invalid texture binding %u\n", binding);
|
cemuLog_logOnce(LogType::Force, "invalid texture binding {}", binding);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1952,7 +1952,7 @@ void MetalRenderer::BindStageResources(MTL::RenderCommandEncoder* renderCommandE
|
|||||||
uint32 binding = shader->resourceMapping.uniformBuffersBindingPoint[i];
|
uint32 binding = shader->resourceMapping.uniformBuffersBindingPoint[i];
|
||||||
if (binding >= MAX_MTL_BUFFERS)
|
if (binding >= MAX_MTL_BUFFERS)
|
||||||
{
|
{
|
||||||
debug_printf("invalid buffer binding%u\n", binding);
|
cemuLog_logOnce(LogType::Force, "invalid buffer binding {}", binding);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user