mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
Fix various compiler warnings given by Clang (#170)
This commit is contained in:
parent
4d1be950e3
commit
4eaa600b57
@ -242,7 +242,7 @@ LatteParsedGSCopyShader* LatteGSCopyShaderParser_parse(uint8* programData, uint3
|
||||
// verify if all registers are exported
|
||||
for(sint32 i=0; i<shaderContext->numParam; i++)
|
||||
{
|
||||
if( shaderContext->paramMapping[i].exportParam == 0xFFFF )
|
||||
if( shaderContext->paramMapping[i].exportParam == 0xFF )
|
||||
debugBreakpoint();
|
||||
}
|
||||
return shaderContext;
|
||||
|
@ -76,23 +76,23 @@ typedef struct
|
||||
struct
|
||||
{
|
||||
// CPU
|
||||
volatile uint64 lastCycleCount;
|
||||
volatile uint64 skippedCycles;
|
||||
volatile uint32 recompilerLeaveCount; // increased everytime the recompiler switches back to interpreter
|
||||
volatile uint32 threadLeaveCount; // increased everytime a thread gives up it's timeslice
|
||||
uint64 lastCycleCount;
|
||||
uint64 skippedCycles;
|
||||
uint32 recompilerLeaveCount; // increased everytime the recompiler switches back to interpreter
|
||||
uint32 threadLeaveCount; // increased everytime a thread gives up it's timeslice
|
||||
// GPU
|
||||
volatile uint32 lastUpdate;
|
||||
volatile uint32 frameCounter;
|
||||
volatile uint32 drawCallCounter;
|
||||
volatile uint32 shaderBindCount;
|
||||
volatile uint64 vertexDataUploaded; // amount of vertex data uploaded to GPU (bytes)
|
||||
volatile uint64 vertexDataCached; // amount of vertex data reused from GPU cache (bytes)
|
||||
volatile uint64 uniformBankUploadedData; // amount of uniform buffer data (excluding remapped uniforms) uploaded to GPU
|
||||
volatile uint64 uniformBankUploadedCount; // number of separate uploads for uniformBankDataUploaded
|
||||
volatile uint64 indexDataUploaded;
|
||||
volatile uint64 indexDataCached;
|
||||
uint32 lastUpdate;
|
||||
uint32 frameCounter;
|
||||
uint32 drawCallCounter;
|
||||
uint32 shaderBindCount;
|
||||
uint64 vertexDataUploaded; // amount of vertex data uploaded to GPU (bytes)
|
||||
uint64 vertexDataCached; // amount of vertex data reused from GPU cache (bytes)
|
||||
uint64 uniformBankUploadedData; // amount of uniform buffer data (excluding remapped uniforms) uploaded to GPU
|
||||
uint64 uniformBankUploadedCount; // number of separate uploads for uniformBankDataUploaded
|
||||
uint64 indexDataUploaded;
|
||||
uint64 indexDataCached;
|
||||
}cycle[PERFORMANCE_MONITOR_TRACK_CYCLES];
|
||||
volatile sint32 cycleIndex;
|
||||
sint32 cycleIndex;
|
||||
// new stats
|
||||
LattePerfStatTimer gpuTime_frameTime;
|
||||
LattePerfStatTimer gpuTime_shaderCreate;
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include "Cafe/Filesystem/fsc.h"
|
||||
#include "Cafe/HW/Espresso/PPCState.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
static_assert(sizeof(acpMetaXml_t) == 0x3440);
|
||||
static_assert(offsetof(acpMetaXml_t, title_id) == 0x0000);
|
||||
static_assert(offsetof(acpMetaXml_t, boss_id) == 0x0008);
|
||||
@ -85,7 +87,7 @@ namespace iosu
|
||||
return;
|
||||
const char* text = subElement->GetText();
|
||||
uint64 value;
|
||||
if (sscanf(text, "%llx", &value) == 0)
|
||||
if (sscanf(text, "%" SCNx64, &value) == 0)
|
||||
return;
|
||||
*v = _swapEndianU64(value);
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "Cafe/OS/libs/coreinit/coreinit_Thread.h"
|
||||
#include "util/helpers/fspinlock.h"
|
||||
|
||||
|
@ -470,7 +470,7 @@ namespace coreinit
|
||||
// mark current block as free
|
||||
block->isFree = _swapEndianU32(1);
|
||||
// attempt to merge with previous block
|
||||
if (_swapEndianU32(block->previousBlock) != NULL)
|
||||
if (_swapEndianU32(block->previousBlock) != MPTR_NULL)
|
||||
{
|
||||
MPTR previousBlockMPTR = _swapEndianU32(block->previousBlock);
|
||||
MEMBlockHeapTrackDEPR* previousBlock = (MEMBlockHeapTrackDEPR*)memory_getPointerFromVirtualOffset(previousBlockMPTR);
|
||||
@ -494,7 +494,7 @@ namespace coreinit
|
||||
}
|
||||
}
|
||||
// attempt to merge with next block
|
||||
if (_swapEndianU32(block->nextBlock) != NULL)
|
||||
if (_swapEndianU32(block->nextBlock) != MPTR_NULL)
|
||||
{
|
||||
MPTR nextBlockMPTR = _swapEndianU32(block->nextBlock);
|
||||
MEMBlockHeapTrackDEPR* nextBlock = (MEMBlockHeapTrackDEPR*)memory_getPointerFromVirtualOffset(nextBlockMPTR);
|
||||
|
@ -34,7 +34,7 @@ namespace coreinit
|
||||
{
|
||||
debug_printf("coreinitVirtualMemory_alloc(): Unable to allocate memory\n");
|
||||
debugBreakpoint();
|
||||
return NULL;
|
||||
return MPTR_NULL;
|
||||
}
|
||||
// check for overlapping regions
|
||||
OSVirtMemory* virtMemItr = virtualMemoryList;
|
||||
@ -66,7 +66,7 @@ namespace coreinit
|
||||
return currentAddress;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return MPTR_NULL;
|
||||
}
|
||||
|
||||
void coreinitExport_OSGetAvailPhysAddrRange(PPCInterpreter_t* hCPU)
|
||||
|
@ -99,7 +99,7 @@ namespace snd_core
|
||||
}
|
||||
coreinit::OSInitMutexEx(__AXAppFrameCallbackMutex.GetPtr(), NULL);
|
||||
for (sint32 i = 0; i < AX_DEV_COUNT; i++)
|
||||
__AXDeviceFinalMixCallback[i] = NULL;
|
||||
__AXDeviceFinalMixCallback[i] = MPTR_NULL;
|
||||
}
|
||||
|
||||
sint32 AXRegisterAppFrameCallback(MPTR funcAddr)
|
||||
|
@ -3,11 +3,9 @@
|
||||
// printf-style macros that are only active in non-release builds
|
||||
|
||||
#ifdef PUBLIC_RELEASE
|
||||
#define debug_printf //
|
||||
#define debug_puts //
|
||||
#define debug_printf(...)
|
||||
static void debugBreakpoint() { }
|
||||
#else
|
||||
#define debug_printf printf
|
||||
#define debug_puts puts
|
||||
#define debug_printf(...) printf(__VA_ARGS__)
|
||||
static void debugBreakpoint() {}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user