Logging migration (forceLogDebug_printf) (#780)

* script changes - no arguments

* script changes with 2 arguments

* script changes with > 2 arguments

* script conversions with 1 argument - pt. 1

* script conversions with 1 argument - pt. 2

* script conversions with 1 argument - pt. 3

* script conversions with 1 argument - pt. 4

* script conversions with 1 argument - pt. 5

Pointer format hunting

* Fixed pointer format

* script conversions with 1 argument - final

* fixed conversion in non utf-8 file

* fixed conversion with capital letter

* actually fixed conversion with capital letter

* fixed another capital lettering issue

* Added conversions with LR removed

* removed LR from logs

* Converted logs that previously contained LR

* converted log that originally specified string length

* fixed log with commas in main text

* fixed multi-line log

* Fixed more logs with commas in main text

* Fixed unformatted pointer

* added conversion with float value

* converted lines with double parameters

* converted missed line

* corrected argument formatting

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>

* Fixed misspellings of "unhandled"

unhandeled -> unhandled

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>

---------

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>
This commit is contained in:
why-keith 2023-04-25 07:43:31 +01:00 committed by GitHub
parent f48ad6a1ca
commit caa57a3cfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 469 additions and 469 deletions

View file

@ -25,13 +25,13 @@ namespace HW_ACR
/* 0x0D00021C | Accesses VI register currently selected by VIADDR */
HWREG::ACR_VI_DATA ACR_VIDATA_R32(PAddr addr)
{
forceLogDebug_printf("ACR_VIDATA read with selected reg %08x", g_acr.viAddr.get_ADDR());
cemuLog_logDebug(LogType::Force, "ACR_VIDATA read with selected reg {:08x}", g_acr.viAddr.get_ADDR());
return HWREG::ACR_VI_DATA();
}
void ACR_VIDATA_W32(PAddr addr, HWREG::ACR_VI_DATA newValue)
{
forceLogDebug_printf("ACR_VIDATA write %08x with selected reg %08x", newValue.get_DATA(), g_acr.viAddr.get_ADDR());
cemuLog_logDebug(LogType::Force, "ACR_VIDATA write {:08x} with selected reg {:08x}", newValue.get_DATA(), g_acr.viAddr.get_ADDR());
}
/* 0x0D000224 | Controls the selected VI register? */

View file

@ -412,7 +412,7 @@ static void PPCInterpreter_DIVW(PPCInterpreter_t* hCPU, uint32 opcode)
sint32 b = hCPU->gpr[rB];
if (b == 0)
{
forceLogDebug_printf("Error: Division by zero! [%08X]\n", (uint32)hCPU->instructionPointer);
cemuLog_logDebug(LogType::Force, "Error: Division by zero! [{:08x}]", (uint32)hCPU->instructionPointer);
b++;
}
hCPU->gpr[rD] = a / b;

View file

@ -237,7 +237,7 @@ public:
lookupHash = ~lookupHash;
}
forceLogDebug_printf("DSI exception at 0x%08x LR 0x%08x DataAddress %08x", hCPU->instructionPointer, hCPU->spr.LR, vAddr);
cemuLog_logDebug(LogType::Force, "DSI exception at 0x{:08x} DataAddress {:08x}", hCPU->instructionPointer, vAddr);
generateDSIException(hCPU, vAddr);
@ -378,12 +378,12 @@ public:
if (pAddr >= 0x01FFF000 && pAddr < 0x02000000)
{
debug_printf("Access u32 boot param block 0x%08x IP %08x LR %08x\n", pAddr, hCPU->instructionPointer, hCPU->spr.LR);
forceLogDebug_printf("Access u32 boot param block 0x%08x (org %08x) IP %08x LR %08x\n", pAddr, address, hCPU->instructionPointer, hCPU->spr.LR);
cemuLog_logDebug(LogType::Force, "Access u32 boot param block 0x{:08x} (org {:08x}) IP {:08x}", pAddr, address, hCPU->instructionPointer);
}
if (pAddr >= 0xFFEB73B0 && pAddr < (0xFFEB73B0+0x40C))
{
debug_printf("Access cached u32 boot param block 0x%08x IP %08x LR %08x\n", pAddr, hCPU->instructionPointer, hCPU->spr.LR);
forceLogDebug_printf("Access cached u32 boot param block 0x%08x (org %08x) IP %08x LR %08x\n", pAddr, address, hCPU->instructionPointer, hCPU->spr.LR);
cemuLog_logDebug(LogType::Force, "Access cached u32 boot param block 0x{:08x} (org {:08x}) IP {:08x}", pAddr, address, hCPU->instructionPointer);
}
if (pAddr >= 0x0c000000 && pAddr < 0x0d100000)

View file

@ -12,7 +12,7 @@
void PPCInterpreter_MFMSR(PPCInterpreter_t* hCPU, uint32 Opcode)
{
forceLogDebug_printf("Rare instruction: MFMSR");
cemuLog_logDebug(LogType::Force, "Rare instruction: MFMSR");
if (hCPU->sprExtended.msr & MSR_PR)
{
PPC_ASSERT(true);
@ -28,7 +28,7 @@ void PPCInterpreter_MFMSR(PPCInterpreter_t* hCPU, uint32 Opcode)
void PPCInterpreter_MTMSR(PPCInterpreter_t* hCPU, uint32 Opcode)
{
forceLogDebug_printf("Rare instruction: MTMSR");
cemuLog_logDebug(LogType::Force, "Rare instruction: MTMSR");
if (hCPU->sprExtended.msr & MSR_PR)
{
PPC_ASSERT(true);
@ -43,7 +43,7 @@ void PPCInterpreter_MTMSR(PPCInterpreter_t* hCPU, uint32 Opcode)
void PPCInterpreter_MTFSB1X(PPCInterpreter_t* hCPU, uint32 Opcode)
{
forceLogDebug_printf("Rare instruction: MTFSB1X");
cemuLog_logDebug(LogType::Force, "Rare instruction: MTFSB1X");
int crbD, n1, n2;
PPC_OPC_TEMPL_X(Opcode, crbD, n1, n2);
if (crbD != 1 && crbD != 2)
@ -212,7 +212,7 @@ void PPCInterpreter_BCLRX(PPCInterpreter_t* hCPU, uint32 Opcode)
if (hCPU->spr.CTR == 0)
{
PPC_ASSERT(true);
forceLogDebug_printf("Decrementer underflow!\n");
cemuLog_logDebug(LogType::Force, "Decrementer underflow!");
}
hCPU->spr.CTR--;
}
@ -331,7 +331,7 @@ void PPCInterpreter_EIEIO(PPCInterpreter_t* hCPU, uint32 Opcode)
void PPCInterpreter_SC(PPCInterpreter_t* hCPU, uint32 Opcode)
{
forceLogDebug_printf("SC executed at 0x%08x", hCPU->instructionPointer);
cemuLog_logDebug(LogType::Force, "SC executed at 0x{:08x}", hCPU->instructionPointer);
// next instruction
PPCInterpreter_nextInstruction(hCPU);
}
@ -352,7 +352,7 @@ void PPCInterpreter_ISYNC(PPCInterpreter_t* hCPU, uint32 Opcode)
void PPCInterpreter_RFI(PPCInterpreter_t* hCPU, uint32 Opcode)
{
forceLogDebug_printf("RFI");
cemuLog_logDebug(LogType::Force, "RFI");
hCPU->sprExtended.msr &= ~(0x87C0FF73 | 0x00040000);
hCPU->sprExtended.msr |= hCPU->sprExtended.srr1 & 0x87c0ff73;
hCPU->sprExtended.msr |= MSR_RI;

View file

@ -163,7 +163,7 @@ void smdpArea_processCommand(smdpArea_t* smdpArea, smdpCommand_t* cmd)
{
cmd->ukn08 = 1;
// cmd->ukn2C ?
forceLogDebug_printf("SMDP command received - todo");
cemuLog_logDebug(LogType::Force, "SMDP command received - todo");
smdpArea_pushResult(smdpArea, memory_getVirtualOffsetFromPointer(cmd));
}
else
@ -242,4 +242,4 @@ void PPCCoreLLE_startSingleCoreScheduler(uint32 entrypoint)
}
}
assert_dbg();
}
}

View file

@ -500,7 +500,7 @@ void PPCRecompiler_init()
codeRegionEnd = (codeRegionEnd + PPC_REC_ALLOC_BLOCK_SIZE - 1) & ~(PPC_REC_ALLOC_BLOCK_SIZE - 1);
uint32 codeRegionSize = codeRegionEnd - PPC_REC_CODE_AREA_START;
forceLogDebug_printf("Allocating recompiler tables for range 0x%08x-0x%08x", PPC_REC_CODE_AREA_START, codeRegionEnd);
cemuLog_logDebug(LogType::Force, "Allocating recompiler tables for range 0x{:08x}-0x{:08x}", PPC_REC_CODE_AREA_START, codeRegionEnd);
for (uint32 i = 0; i < codeRegionSize; i += PPC_REC_ALLOC_BLOCK_SIZE)
{

View file

@ -192,7 +192,7 @@ void _PPCRecRA_checkAndTryExtendRange(ppcImlGenContext_t* ppcImlGenContext, PPCR
{
if (routeDepth >= 64)
{
forceLogDebug_printf("Recompiler RA route maximum depth exceeded for function 0x%08x\n", ppcImlGenContext->functionRef->ppcAddress);
cemuLog_logDebug(LogType::Force, "Recompiler RA route maximum depth exceeded for function 0x{:08x}", ppcImlGenContext->functionRef->ppcAddress);
return;
}
route[routeDepth] = currentSegment;
@ -411,4 +411,4 @@ void PPCRecRA_analyzeRangeDataFlowV2(ppcImlGenContext_t* ppcImlGenContext)
_analyzeRangeDataFlow(subrange);
}
}
}
}

View file

@ -120,7 +120,7 @@ void LatteAsyncCommands_checkAndExecute()
}
else
{
forceLogDebug_printf("Texture not found for readback");
cemuLog_logDebug(LogType::Force, "Texture not found for readback");
}
}
else if (asyncCommand.type == ASYNC_CMD_DELETE_SHADER)
@ -135,4 +135,4 @@ void LatteAsyncCommands_checkAndExecute()
LatteAsyncCommandQueue.pop();
}
swl_gpuAsyncCommands.UnlockWrite();
}
}

View file

@ -304,7 +304,7 @@ public:
{
if ((rangeBegin & 0xF))
{
forceLogDebug_printf("writeStreamout(): RangeBegin not aligned to 16. Begin %08x End %08x", rangeBegin, rangeEnd);
cemuLog_logDebug(LogType::Force, "writeStreamout(): RangeBegin not aligned to 16. Begin {:08x} End {:08x}", rangeBegin, rangeEnd);
rangeBegin = (rangeBegin + 0xF) & ~0xF;
rangeEnd = std::max(rangeBegin, rangeEnd);
}
@ -313,7 +313,7 @@ public:
// todo - add support for 4 byte granularity for streamout writes and cache
// used by Affordable Space Adventures and YWW Level 1-8
// also used by CoD Ghosts (8 byte granularity)
//forceLogDebug_printf("Streamout write size is not aligned to 16 bytes");
//cemuLog_logDebug(LogType::Force, "Streamout write size is not aligned to 16 bytes");
rangeEnd &= ~0xF;
}
//cemu_assert_debug((rangeEnd & 0xF) == 0);

View file

@ -50,12 +50,12 @@ private:
}
if (effectiveWidth < rtEffectiveSize.x)
{
forceLogDebug_printf("Framebuffer has color texture with smaller effective width (%d -> %d)", rtEffectiveSize.x, effectiveWidth);
cemuLog_logDebug(LogType::Force, "Framebuffer has color texture with smaller effective width ({} -> {})", rtEffectiveSize.x, effectiveWidth);
rtEffectiveSize.x = effectiveWidth;
}
if (effectiveHeight < rtEffectiveSize.y)
{
forceLogDebug_printf("Framebuffer has color texture with smaller effective height (%d -> %d)", rtEffectiveSize.y, effectiveHeight);
cemuLog_logDebug(LogType::Force, "Framebuffer has color texture with smaller effective height ({} -> {})", rtEffectiveSize.y, effectiveHeight);
rtEffectiveSize.y = effectiveHeight;
}
numViews++;
@ -72,12 +72,12 @@ private:
}
if (effectiveWidth < rtEffectiveSize.x)
{
forceLogDebug_printf("Framebuffer has depth texture with smaller effective width (%d -> %d)", rtEffectiveSize.x, effectiveWidth);
cemuLog_logDebug(LogType::Force, "Framebuffer has depth texture with smaller effective width ({} -> {})", rtEffectiveSize.x, effectiveWidth);
rtEffectiveSize.x = effectiveWidth;
}
if (effectiveHeight < rtEffectiveSize.y)
{
forceLogDebug_printf("Framebuffer has depth texture with smaller effective height (%d -> %d)", rtEffectiveSize.y, effectiveHeight);
cemuLog_logDebug(LogType::Force, "Framebuffer has depth texture with smaller effective height ({} -> {})", rtEffectiveSize.y, effectiveHeight);
rtEffectiveSize.y = effectiveHeight;
}
numViews++;
@ -145,4 +145,4 @@ public:
private:
static LatteCachedFBO* CreateCachedFBO(uint64 key);
};
};

View file

@ -638,7 +638,7 @@ LatteCMDPtr LatteCP_itDrawIndexAuto(LatteCMDPtr cmd, uint32 nWords, DrawPassCont
{
uint32 vsProgramCode = ((LatteGPUState.contextRegister[mmSQ_PGM_START_ES] & 0xFFFFFF) << 8);
uint32 vsProgramSize = LatteGPUState.contextRegister[mmSQ_PGM_START_ES + 1] << 3;
forceLogDebug_printf("Compute %d %08x %08x (unsupported)\n", count, vsProgramCode, vsProgramSize);
cemuLog_logDebug(LogType::Force, "Compute {} {:08x} {:08x} (unsupported)", count, vsProgramCode, vsProgramSize);
}
else
{

View file

@ -611,7 +611,7 @@ bool LatteMRT::UpdateCurrentFBO()
{
if (_depthBufferSizeWarningCount < 100)
{
forceLogDebug_printf("Depth buffer size too small. Effective size: %dx%d Real size: %dx%d Mismatching texture: %08x %dx%d fmt %04x", effectiveWidth, effectiveHeight, depthBufferView->baseTexture->width, depthBufferView->baseTexture->height, depthBufferView->baseTexture->physAddress, depthBufferView->baseTexture->width, depthBufferView->baseTexture->height, (uint32)depthBufferView->baseTexture->format);
cemuLog_logDebug(LogType::Force, "Depth buffer size too small. Effective size: {}x{} Real size: {}x{} Mismatching texture: {:08x} {}x{} fmt {:04x}", effectiveWidth, effectiveHeight, depthBufferView->baseTexture->width, depthBufferView->baseTexture->height, depthBufferView->baseTexture->physAddress, depthBufferView->baseTexture->width, depthBufferView->baseTexture->height, (uint32)depthBufferView->baseTexture->format);
_depthBufferSizeWarningCount++;
}
}
@ -721,7 +721,7 @@ void LatteRenderTarget_applyTextureColorClear(LatteTexture* texture, uint32 slic
{
if (texture->isDepth)
{
forceLogDebug_printf("Unsupported clear depth as color");
cemuLog_logDebug(LogType::Force, "Unsupported clear depth as color");
}
else
{

View file

@ -283,7 +283,7 @@ void LatteShader_UpdatePSInputs(uint32* contextRegisters)
#ifdef CEMU_DEBUG_ASSERT
if (semanticMask[psSemanticId >> 3] & (1 << (psSemanticId & 7)))
{
forceLogDebug_printf("SemanticId already used");
cemuLog_logDebug(LogType::Force, "SemanticId already used");
}
semanticMask[psSemanticId >> 3] |= (1 << (psSemanticId & 7));
#endif
@ -339,7 +339,7 @@ void LatteShader_CreateRendererShader(LatteDecompilerShader* shader, bool compil
(shader->baseHash == 0x15bc7edf9de2ed30 || shader->baseHash == 0x83a697d61a3b9202 ||
shader->baseHash == 0x97bc44a5028381c6 || shader->baseHash == 0x24838b84d15a1da1))
{
forceLogDebug_printf("Filtered shader to avoid AMD crash");
cemuLog_logDebug(LogType::Force, "Filtered shader to avoid AMD crash");
shader->shader = nullptr;
shader->hasError = true;
return;
@ -357,7 +357,7 @@ void LatteShader_FinishCompilation(LatteDecompilerShader* shader)
{
if (shader->hasError)
{
forceLogDebug_printf("LatteShader_finishCompilation(): Skipped because of error in shader %llx", shader->baseHash);
cemuLog_logDebug(LogType::Force, "LatteShader_finishCompilation(): Skipped because of error in shader {:x}", shader->baseHash);
return;
}
shader->shader->WaitForCompiled();

View file

@ -101,7 +101,7 @@ void LatteSurfaceCopy_copySurfaceNew(MPTR srcPhysAddr, MPTR srcMipAddr, uint32 s
// download destination texture if it matches known accessed formats
if (destinationTexture->width == 8 && destinationTexture->height == 8 && destinationTexture->tileMode == Latte::E_HWTILEMODE::TM_1D_TILED_THIN1)
{
forceLogDebug_printf("Texture readback after copy for Bayonetta 2 (phys: 0x%08x)", destinationTexture->physAddress);
cemuLog_logDebug(LogType::Force, "Texture readback after copy for Bayonetta 2 (phys: 0x{:08x})", destinationTexture->physAddress);
LatteTextureReadback_Initate(destinationView);
}
}
}

View file

@ -302,9 +302,9 @@ void LatteTexture_copyData(LatteTexture* srcTexture, LatteTexture* dstTexture, s
LatteTexture_getEffectiveSize(dstTexture, &effectiveWidth_src, &effectiveHeight_src, NULL, 0);
debug_printf("texture_copyData(): Effective size mismatch\n");
forceLogDebug_printf("texture_copyData(): Effective size mismatch (due to texture rule)");
forceLogDebug_printf("Destination: origResolution %04dx%04d effectiveResolution %04dx%04d fmt %04x mipIndex %d", srcTexture->width, srcTexture->height, effectiveWidth_dst, effectiveHeight_dst, (uint32)dstTexture->format, 0);
forceLogDebug_printf("Source: origResolution %04dx%04d effectiveResolution %04dx%04d fmt %04x mipIndex %d", srcTexture->width, srcTexture->height, effectiveWidth_src, effectiveHeight_src, (uint32)srcTexture->format, 0);
cemuLog_logDebug(LogType::Force, "texture_copyData(): Effective size mismatch (due to texture rule)");
cemuLog_logDebug(LogType::Force, "Destination: origResolution {:04}x{:04} effectiveResolution {:04}x{:04} fmt {:04x} mipIndex {}", srcTexture->width, srcTexture->height, effectiveWidth_dst, effectiveHeight_dst, (uint32)dstTexture->format, 0);
cemuLog_logDebug(LogType::Force, "Source: origResolution {:04}x{:04} effectiveResolution {:04}x{:04} fmt {:04x} mipIndex {}", srcTexture->width, srcTexture->height, effectiveWidth_src, effectiveHeight_src, (uint32)srcTexture->format, 0);
return;
}
catchOpenGLError();
@ -384,7 +384,7 @@ void LatteTexture_CopySlice(LatteTexture* srcTexture, sint32 srcSlice, sint32 sr
cemuLog_log(LogType::Force, "Source: {:08x} origResolution {:4}/{:4} effectiveResolution {:4}/{:4} fmt {:04x} mipIndex {} ratioW/H: {:.4}/{:.4}", srcTexture->physAddress, srcTexture->width, srcTexture->height, effectiveWidth_src, effectiveHeight_src, (uint32)srcTexture->format, srcMip, ratioWidth_src, ratioHeight_src);
cemuLog_log(LogType::Force, "Destination: {:08x} origResolution {:4}/{:4} effectiveResolution {:4}/{:4} fmt {:04x} mipIndex {} ratioW/H: {:.4}/{:.4}", dstTexture->physAddress, dstTexture->width, dstTexture->height, effectiveWidth_dst, effectiveHeight_dst, (uint32)dstTexture->format, dstMip, ratioWidth_dst, ratioHeight_dst);
}
//forceLogDebug_printf("If these textures are not meant to share data you can ignore this");
//cemuLog_logDebug(LogType::Force, "If these textures are not meant to share data you can ignore this");
return;
}
// todo - store 'lastUpdated' value per slice/mip and copy it's value when copying the slice data
@ -877,7 +877,7 @@ VIEWCOMPATIBILITY LatteTexture_CanTextureBeRepresentedAsView(LatteTexture* baseT
if (baseTexture->isDepth && baseTexture->format != format)
{
// depth view with different format
forceLogDebug_printf("_createMapping(): Incompatible depth view format");
cemuLog_logDebug(LogType::Force, "_createMapping(): Incompatible depth view format");
return VIEW_NOT_COMPATIBLE;
}
@ -929,7 +929,7 @@ VIEWCOMPATIBILITY LatteTexture_CanTextureBeRepresentedAsView(LatteTexture* baseT
if (baseTexture->isDepth && baseTexture->format != format)
{
// depth view with different format
forceLogDebug_printf("_createMapping(): Incompatible depth view format");
cemuLog_logDebug(LogType::Force, "_createMapping(): Incompatible depth view format");
return VIEW_NOT_COMPATIBLE;
}
@ -1003,7 +1003,7 @@ LatteTextureView* LatteTexture_CreateMapping(MPTR physAddr, MPTR physMipAddr, si
{
if (format == Latte::E_GX2SURFFMT::INVALID_FORMAT)
{
forceLogDebug_printf("LatteTexture_CreateMapping(): Invalid format");
cemuLog_logDebug(LogType::Force, "LatteTexture_CreateMapping(): Invalid format");
return nullptr;
}
// note: When creating an existing texture, we only allow mip and slice expansion at the end

View file

@ -818,7 +818,7 @@ void LatteTextureLoader_writeReadbackTextureToMemory(LatteTextureDefinition* tex
}
else
{
forceLogDebug_printf("Linear texture readback unsupported for format 0x%04x", (uint32)textureData->format);
cemuLog_logDebug(LogType::Force, "Linear texture readback unsupported for format 0x{:04x}", (uint32)textureData->format);
debugBreakpoint();
}
return;
@ -856,7 +856,7 @@ void LatteTextureLoader_writeReadbackTextureToMemory(LatteTextureDefinition* tex
}
else
{
forceLogDebug_printf("Texture readback unsupported format %04x for tileMode 0x%02x", (uint32)textureData->format, textureData->tileMode);
cemuLog_logDebug(LogType::Force, "Texture readback unsupported format {:04x} for tileMode 0x{:02x}", (uint32)textureData->format, textureData->tileMode);
}
}

View file

@ -932,7 +932,7 @@ void LatteDecompiler_ParseTEXClause(LatteDecompilerShader* shaderContext, LatteD
}
else
{
forceLogDebug_printf("Unsupported tex instruction %d\n", inst0_4);
cemuLog_logDebug(LogType::Force, "Unsupported tex instruction {}", inst0_4);
shaderContext->hasError = true;
break;
}

View file

@ -310,7 +310,7 @@ void LatteDecompiler_analyzeTEXClause(LatteDecompilerShaderContext* shaderContex
{
if (texInstruction.textureFetch.textureIndex < 0 || texInstruction.textureFetch.textureIndex >= LATTE_NUM_MAX_TEX_UNITS)
{
forceLogDebug_printf("Shader %llx has out of bounds texture access (texture %d)", shaderContext->shader->baseHash, (sint32)texInstruction.textureFetch.textureIndex);
cemuLog_logDebug(LogType::Force, "Shader {:16x} has out of bounds texture access (texture {})", shaderContext->shader->baseHash, (sint32)texInstruction.textureFetch.textureIndex);
continue;
}
if( texInstruction.textureFetch.samplerIndex < 0 || texInstruction.textureFetch.samplerIndex >= 0x12 )
@ -984,7 +984,7 @@ void LatteDecompiler_analyze(LatteDecompilerShaderContext* shaderContext, LatteD
cemu_assert_debug(false);
}
if(list_subroutineAddrs.empty() == false)
forceLogDebug_printf("Todo - analyze shader subroutine CF stack");
cemuLog_logDebug(LogType::Force, "Todo - analyze shader subroutine CF stack");
// TF mode
if (shaderContext->options->useTFViaSSBO && shaderContext->output->streamoutBufferWriteMask.any())
{

View file

@ -488,7 +488,7 @@ void LatteDecompiler_emitAttributeDecodeGLSL(LatteDecompilerShader* shaderContex
}
else
{
forceLogDebug_printf("_emitAttributeDecodeGLSL(): Unsupported fmt {:02x} nfa {} signed {} endian {}\n", attrib->format, attrib->nfa, attrib->isSigned, attrib->endianSwap);
cemuLog_logDebug(LogType::Force, "_emitAttributeDecodeGLSL(): Unsupported fmt {:02x} nfa {} signed {} endian {}", attrib->format, attrib->nfa, attrib->isSigned, attrib->endianSwap);
}
}
else

View file

@ -59,7 +59,7 @@ void LatteTextureViewGL::InitAliasView()
if (baseTexture->isDepth)
{
// depth is handled differently
forceLogDebug_printf("Creating depth view");
cemuLog_logDebug(LogType::Force, "Creating depth view");
cemu_assert(format == texture->format); // todo
glInternalFormat = texture->glInternalFormat;
}
@ -73,7 +73,7 @@ void LatteTextureViewGL::InitAliasView()
catchOpenGLError();
if (firstMip >= texture->maxPossibleMipLevels)
{
forceLogDebug_printf("_createNewView: Out of bounds mip level requested");
cemuLog_logDebug(LogType::Force, "_createNewView: Out of bounds mip level requested");
glTextureView(glTexId, glTexTarget, texture->glId_texture, glInternalFormat, texture->maxPossibleMipLevels - 1, numMip, firstSlice, this->numSlice);
}
else
@ -115,4 +115,4 @@ LatteTextureViewGL* LatteTextureViewGL::GetAlternativeView()
if (!m_alternativeView)
m_alternativeView = new LatteTextureViewGL((LatteTextureGL*)baseTexture, dim, format, firstMip, numMip, firstSlice, numSlice, false, true);
return m_alternativeView;
}
}

View file

@ -1075,7 +1075,7 @@ void OpenGLRenderer_texture_loadSlice_normal(LatteTexture* hostTextureGeneric, s
if (mipIndex < hostTexture->maxPossibleMipLevels)
glTexSubImage2D(GL_TEXTURE_2D, mipIndex, 0, 0, effectiveWidth, effectiveHeight, glFormatInfo.glSuppliedFormat, glFormatInfo.glSuppliedFormatType, pixelData);
else
forceLogDebug_printf("2D texture mip level allocated out of range");
cemuLog_logDebug(LogType::Force, "2D texture mip level allocated out of range");
}
}
else if (hostTexture->dim == Latte::E_DIM::DIM_1D)
@ -1201,12 +1201,12 @@ void OpenGLRenderer::texture_clearSlice(LatteTexture* hostTextureGeneric, sint32
{
if (formatInfoGL.glIsCompressed)
{
forceLogDebug_printf("Unsupported clear for compressed texture");
cemuLog_logDebug(LogType::Force, "Unsupported clear for compressed texture");
return; // todo - create integer texture view to clear compressed textures
}
if (hostTextureGeneric->isDepth)
{
forceLogDebug_printf("Unsupported clear for depth texture");
cemuLog_logDebug(LogType::Force, "Unsupported clear for depth texture");
return; // todo - use depth clear
}
@ -1365,7 +1365,7 @@ void OpenGLRenderer::texture_copyImageSubData(LatteTexture* src, sint32 srcMip,
}
else
{
forceLogDebug_printf("_syncSlice() called with unhandled alternative format");
cemuLog_logDebug(LogType::Force, "_syncSlice() called with unhandled alternative format");
return;
}
}

View file

@ -467,7 +467,7 @@ void LatteDrawGL_prepareIndicesWithGPUCache(MPTR indexDataMPTR, _INDEX_TYPE inde
uint32 h = LatteDrawGL_calculateIndexDataHash(memory_getPointerFromPhysicalOffset(indexDataMPTR), cacheEntryItr->physSize);
if (cacheEntryItr->hash != h)
{
forceLogDebug_printf("IndexData hash changed");
cemuLog_logDebug(LogType::Force, "IndexData hash changed");
_decodeAndUploadIndexData(cacheEntryItr);
cacheEntryItr->hash = h;
}
@ -527,7 +527,7 @@ void LatteDrawGL_prepareIndicesWithGPUCache(MPTR indexDataMPTR, _INDEX_TYPE inde
void LatteDraw_handleSpecialState8_clearAsDepth()
{
if (LatteGPUState.contextNew.GetSpecialStateValues()[0] == 0)
forceLogDebug_printf("Special state 8 requires special state 0 but it is not set?");
cemuLog_logDebug(LogType::Force, "Special state 8 requires special state 0 but it is not set?");
// get depth buffer information
uint32 regDepthBuffer = LatteGPUState.contextRegister[mmDB_HTILE_DATA_BASE];
uint32 regDepthSize = LatteGPUState.contextRegister[mmDB_DEPTH_SIZE];

View file

@ -76,7 +76,7 @@ LatteTextureReadbackInfoGL::LatteTextureReadbackInfoGL(LatteTextureView* texture
}
else
{
forceLogDebug_printf("Unsupported texture readback format %04x\n", (uint32)textureView->format);
cemuLog_logDebug(LogType::Force, "Unsupported texture readback format {:04x}", (uint32)textureView->format);
return;
}
}

View file

@ -173,7 +173,7 @@ RendererOutputShader::RendererOutputShader(const std::string& vertex_source, con
}
else
{
forceLogDebug_printf("RendererOutputShader() - todo for Vulkan");
cemuLog_logDebug(LogType::Force, "RendererOutputShader() - todo for Vulkan");
m_attributes[0].m_loc_texture_src_resolution = -1;
m_attributes[0].m_loc_input_resolution = -1;
m_attributes[0].m_loc_output_resolution = -1;

View file

@ -407,6 +407,6 @@ VkSwapchainCreateInfoKHR SwapchainInfoVk::CreateSwapchainCreateInfo(VkSurfaceKHR
createInfo.presentMode = ChoosePresentMode(swapchainSupport.presentModes);
createInfo.clipped = VK_TRUE;
forceLogDebug_printf("vulkan presentation mode: %d", createInfo.presentMode);
cemuLog_logDebug(LogType::Force, "vulkan presentation mode: {}", createInfo.presentMode);
return createInfo;
}

View file

@ -528,7 +528,7 @@ void PipelineCompiler::InitInputAssemblyState(const Latte::LATTE_VGT_PRIMITIVE_T
inputAssembly.primitiveRestartEnable = false;
break;
default:
forceLogDebug_printf("Vulkan-Unsupported: Graphics pipeline with primitive mode %d created", primitiveMode);
cemuLog_logDebug(LogType::Force, "Vulkan-Unsupported: Graphics pipeline with primitive mode {} created", primitiveMode);
cemu_assert_debug(false);
}
}

View file

@ -231,7 +231,7 @@ void VulkanPipelineStableCache::LoadPipelineFromCache(std::span<uint8> fileData)
vertexShader = LatteSHRC_FindVertexShader(cachedPipeline->vsHash.baseHash, cachedPipeline->vsHash.auxHash);
if (!vertexShader)
{
forceLogDebug_printf("Vertex shader not found in cache");
cemuLog_logDebug(LogType::Force, "Vertex shader not found in cache");
return;
}
}
@ -241,7 +241,7 @@ void VulkanPipelineStableCache::LoadPipelineFromCache(std::span<uint8> fileData)
geometryShader = LatteSHRC_FindGeometryShader(cachedPipeline->gsHash.baseHash, cachedPipeline->gsHash.auxHash);
if (!geometryShader)
{
forceLogDebug_printf("Geometry shader not found in cache");
cemuLog_logDebug(LogType::Force, "Geometry shader not found in cache");
return;
}
}
@ -251,7 +251,7 @@ void VulkanPipelineStableCache::LoadPipelineFromCache(std::span<uint8> fileData)
pixelShader = LatteSHRC_FindPixelShader(cachedPipeline->psHash.baseHash, cachedPipeline->psHash.auxHash);
if (!pixelShader)
{
forceLogDebug_printf("Pixel shader not found in cache");
cemuLog_logDebug(LogType::Force, "Pixel shader not found in cache");
return;
}
}
@ -433,4 +433,4 @@ void VulkanPipelineStableCache::WorkerThread()
s_cache->AddFileAsync({ nameA, nameB }, blob.data(), blob.size());
delete job;
}
}
}

View file

@ -1967,7 +1967,7 @@ void VulkanRenderer::SubmitCommandBuffer(VkSemaphore signalSemaphore, VkSemaphor
if (nextCmdBufferIndex == m_commandBufferSyncIndex)
{
// force wait for the next command buffer
forceLogDebug_printf("Vulkan: Waiting for available command buffer...");
cemuLog_logDebug(LogType::Force, "Vulkan: Waiting for available command buffer...");
WaitForNextFinishedCommandBuffer();
}
m_commandBufferIndex = nextCmdBufferIndex;
@ -2085,7 +2085,7 @@ void VulkanRenderer::PipelineCacheSaveThread(size_t cache_size)
file.close();
cache_size = size;
forceLogDebug_printf("pipeline cache saved");
cemuLog_logDebug(LogType::Force, "pipeline cache saved");
}
else
{
@ -2123,7 +2123,7 @@ void VulkanRenderer::CreatePipelineCache()
file.read((char*)cacheData.data(), cacheData.size());
file.close();
forceLogDebug_printf("pipeline cache loaded");
cemuLog_logDebug(LogType::Force, "pipeline cache loaded");
}
}
@ -3168,7 +3168,7 @@ void VulkanRenderer::texture_clearSlice(LatteTexture* hostTexture, sint32 sliceI
auto imageObj = vkTexture->GetImageObj();
imageObj->flagForCurrentCommandBuffer();
forceLogDebug_printf("Compressed texture (%d/%d fmt %04x) unsupported clear", vkTexture->width, vkTexture->height, (uint32)vkTexture->format);
cemuLog_logDebug(LogType::Force, "Compressed texture ({}/{} fmt {:04x}) unsupported clear", vkTexture->width, vkTexture->height, (uint32)vkTexture->format);
VkImageSubresourceLayers subresourceRange{};
subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
@ -3418,7 +3418,7 @@ void VulkanRenderer::texture_copyImageSubData(LatteTexture* src, sint32 srcMip,
if (mipWidth < 4 || mipHeight < 4)
{
forceLogDebug_printf("vkCmdCopyImage - blocked copy for unsupported uncompressed->compressed copy with dst smaller than 4x4");
cemuLog_logDebug(LogType::Force, "vkCmdCopyImage - blocked copy for unsupported uncompressed->compressed copy with dst smaller than 4x4");
return;
}

View file

@ -894,14 +894,14 @@ void VulkanRenderer::surfaceCopy_copySurfaceWithFormatConversion(LatteTexture* s
// todo - if not, we have to use drawcall based copying
if (!LatteTexture_doesEffectiveRescaleRatioMatch(srcTextureVk, texSrcMip, dstTextureVk, texDstMip))
{
forceLogDebug_printf("surfaceCopy_copySurfaceViaDrawcall(): Mismatching dimensions");
cemuLog_logDebug(LogType::Force, "surfaceCopy_copySurfaceViaDrawcall(): Mismatching dimensions");
return;
}
// check if bpp size matches
if (srcTextureVk->GetBPP() != dstTextureVk->GetBPP())
{
forceLogDebug_printf("surfaceCopy_copySurfaceViaDrawcall(): Mismatching BPP");
cemuLog_logDebug(LogType::Force, "surfaceCopy_copySurfaceViaDrawcall(): Mismatching BPP");
return;
}

View file

@ -470,7 +470,7 @@ namespace MMU
auto itr = g_mmioHandlerW32->find(address);
if (itr == g_mmioHandlerW32->end())
{
//forceLogDebug_printf("[MMU] MMIO write u32 0x%08x from unhandeled address 0x%08x", value, address);
//cemuLog_logDebug(LogType::Force, "[MMU] MMIO write u32 0x{:08x} from unhandled address 0x{:08x}", value, address);
return;
}
return itr->second(address, value);
@ -482,7 +482,7 @@ namespace MMU
auto itr = g_mmioHandlerW16->find(address);
if (itr == g_mmioHandlerW16->end())
{
//forceLogDebug_printf("[MMU] MMIO write u16 0x%04x from unhandeled address 0x%08x", (uint32)value, address);
//cemuLog_logDebug(LogType::Force, "[MMU] MMIO write u16 0x{:04x} from unhandled address 0x{:08x}", (uint32)value, address);
return;
}
return itr->second(address, value);
@ -497,7 +497,7 @@ namespace MMU
auto itr = g_mmioHandlerR32->find(address);
if(itr == g_mmioHandlerR32->end())
{
//forceLogDebug_printf("[MMU] MMIO read u32 from unhandeled address 0x%08x", address);
//cemuLog_logDebug(LogType::Force, "[MMU] MMIO read u32 from unhandled address 0x{:08x}", address);
return 0;
}
return itr->second(address);
@ -509,11 +509,11 @@ namespace MMU
auto itr = g_mmioHandlerR16->find(address);
if (itr == g_mmioHandlerR16->end())
{
//forceLogDebug_printf("[MMU] MMIO read u16 from unhandeled address 0x%08x", address);
//cemuLog_logDebug(LogType::Force, "[MMU] MMIO read u16 from unhandled address 0x{:08x}", address);
return 0;
}
return itr->second(address);
}
}
}

View file

@ -87,7 +87,7 @@ namespace HW_SI
HWREG::SICOMCSR SI_COMCSR_R32(PAddr addr)
{
//forceLogDebug_printf("Read SICOMCSR");
//cemuLog_logDebug(LogType::Force, "Read SICOMCSR");
return g_si.registerState.sicomcsr;
}