use logging instead of printing

This commit is contained in:
Samuliak 2024-09-30 19:36:13 +02:00
parent 778037f335
commit c65123bbbe
4 changed files with 4 additions and 9 deletions

View File

@ -310,7 +310,7 @@ MTL::VertexFormat GetMtlVertexFormat(uint8 format)
case FMT_2_10_10_10:
return MTL::VertexFormatUInt; // verified to match OpenGL
default:
printf("unsupported vertex format %u\n", (uint32)format);
cemuLog_log(LogType::Force, "unsupported vertex format {}", (uint32)format);
assert_dbg();
return MTL::VertexFormatInvalid;
}

View File

@ -15,7 +15,7 @@ MetalHybridComputePipeline::MetalHybridComputePipeline(class MetalRenderer* mtlR
vertexFunction->release();
if (error)
{
printf("error creating hybrid render pipeline state: %s\n", error->localizedDescription()->utf8String());
cemuLog_log(LogType::Force, "error creating hybrid render pipeline state: {}", error->localizedDescription()->utf8String());
error->release();
}

View File

@ -17,6 +17,7 @@
#include "Cafe/HW/Latte/Core/LatteShader.h"
#include "Cafe/HW/Latte/Core/LatteIndices.h"
#include "Cemu/Logging/CemuDebugLogging.h"
#include "Cemu/Logging/CemuLogging.h"
#include "HW/Latte/Core/LatteConst.h"
#include "HW/Latte/Renderer/Metal/MetalCommon.h"
#include "HW/Latte/Renderer/Metal/MetalLayerHandle.h"
@ -938,12 +939,6 @@ void MetalRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
LatteDecompilerShader* vertexShader = LatteSHRC_GetActiveVertexShader();
LatteDecompilerShader* geometryShader = LatteSHRC_GetActiveGeometryShader();
LatteDecompilerShader* pixelShader = LatteSHRC_GetActivePixelShader();
// TODO: is this even needed? Also, should go to draw_beginSequence
if (!vertexShader || !static_cast<RendererShaderMtl*>(vertexShader->shader)->GetFunction())
{
printf("no vertex function, skipping draw\n");
return;
}
const auto fetchShader = LatteSHRC_GetActiveFetchShader();
bool neverSkipAccurateBarrier = false;

View File

@ -20,7 +20,7 @@ RendererShaderMtl::RendererShaderMtl(MetalRenderer* mtlRenderer, ShaderType type
MTL::Library* library = m_mtlr->GetDevice()->newLibrary(ToNSString(mslCode), nullptr, &error);
if (error)
{
printf("failed to create library (error: %s) -> source:\n%s\n", error->localizedDescription()->utf8String(), mslCode.c_str());
cemuLog_log(LogType::Force, "failed to create library: {}", error->localizedDescription()->utf8String());
error->release();
return;
}