Files
AnyPS5/core/libs/tests/GuestRazorCpu.cpp
T
Celegans12andClaude Opus 5.5 e30336c815 feat(razor): implement sceRazorCpuPushMarkerStatic and sceRazorCpuPopMarker
Ghost of Yotei (PPSA26344) imports both functions, so its import
resolution failed at startup. Markers only feed an attached Razor
capture. AnyPS5 hosts none and sceRazorCpuIsCapturing reports 0, so,
like the other libSceRazorCpu exports, both do nothing and return 0.

The push signature comes from the title's calls (a string literal,
0x80ffffff, 2). TechnicalDebt lists both functions with the assumed
signatures. guest_razor_cpu covers nested and unbalanced markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:53:15 +02:00

32 lines
1.1 KiB
C++

#include "prx/libc/include/general/VabiMacros.hpp"
#include <cstdint>
#include <cstdlib>
extern "C" {
std::uint32_t APS5_VABI sceRazorCpuIsCapturing(void);
int APS5_VABI sceRazorCpuJobManagerDispatch(const void* args);
int APS5_VABI sceRazorCpuJobManagerJob(const void* args);
int APS5_VABI sceRazorCpuJobManagerSequence(const void* args);
int APS5_VABI sceRazorCpuPushMarkerStatic(const char* name, std::uint32_t color, std::uint32_t flags);
int APS5_VABI sceRazorCpuPopMarker(void);
}
namespace {
void Require(bool value) { if (!value) std::abort(); }
}
int main() {
Require(sceRazorCpuIsCapturing() == 0);
Require(sceRazorCpuJobManagerDispatch(nullptr) == 0);
Require(sceRazorCpuJobManagerJob(nullptr) == 0);
Require(sceRazorCpuJobManagerSequence(nullptr) == 0);
Require(sceRazorCpuPushMarkerStatic("outer", 0x80ffffffu, 2) == 0);
Require(sceRazorCpuPushMarkerStatic("inner", 0x80ffffffu, 2) == 0);
Require(sceRazorCpuPopMarker() == 0);
Require(sceRazorCpuPopMarker() == 0);
Require(sceRazorCpuPushMarkerStatic("unbalanced", 0x80ffffffu, 2) == 0);
Require(sceRazorCpuIsCapturing() == 0);
}