Bump CI clang version to 15 + workaround for unsafe fiber optimizations (#982)

This commit is contained in:
Exzap 2023-09-29 17:17:28 +02:00 committed by GitHub
parent 8a4abb8bbb
commit 8bb7ce098c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 150 additions and 132 deletions

View file

@ -4,8 +4,8 @@
#include "GX2.h"
#include "Cafe/HW/Latte/Core/Latte.h"
#include "Cafe/OS/libs/coreinit/coreinit_Time.h"
#include "Cafe/OS/libs/coreinit/coreinit_Thread.h"
#include "Cafe/CafeSystem.h"
#include "Cafe/HW/Latte/Core/LattePM4.h"
#include "GX2_Command.h"
@ -68,7 +68,7 @@ void gx2Export_GX2SwapScanBuffers(PPCInterpreter_t* hCPU)
// Orochi Warriors seems to call GX2SwapScanBuffers on arbitrary threads/cores. The PM4 commands should go through to the GPU as long as there is no active display list and no other core is submitting commands simultaneously
// right now, we work around this by avoiding the infinite loop below (request counter incremented, but PM4 not sent)
uint32 coreIndex = PPCInterpreter_getCoreIndex(ppcInterpreterCurrentInstance);
uint32 coreIndex = coreinit::OSGetCoreId();
if (GX2::sGX2MainCoreIndex == coreIndex)
LatteGPUState.sharedArea->flipRequestCountBE = _swapEndianU32(_swapEndianU32(LatteGPUState.sharedArea->flipRequestCountBE) + 1);
@ -332,7 +332,7 @@ uint64 Latte_GetTime()
void _GX2SubmitToTCL()
{
uint32 coreIndex = PPCInterpreter_getCoreIndex(ppcInterpreterCurrentInstance);
uint32 coreIndex = PPCInterpreter_getCoreIndex(PPCInterpreter_getCurrentInstance());
// do nothing if called from non-main GX2 core
if (GX2::sGX2MainCoreIndex != coreIndex)
{
@ -373,7 +373,7 @@ uint32 _GX2GetUnflushedBytes(uint32 coreIndex)
*/
void GX2ReserveCmdSpace(uint32 reservedFreeSpaceInU32)
{
uint32 coreIndex = PPCInterpreter_getCoreIndex(ppcInterpreterCurrentInstance);
uint32 coreIndex = coreinit::OSGetCoreId();
// if we are in a display list then do nothing
if( gx2WriteGatherPipe.displayListStart[coreIndex] != MPTR_NULL )
return;