wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
debug.h
Go to the documentation of this file.
1#pragma once
2#include <wut.h>
3#include "surface.h"
4
11#ifdef __cplusplus
12extern "C" {
13#endif
14
16
21
31
41
43{
45 uint32_t version;
46
48 void (*onShutdown)();
49
51 void (*setAllocator)();
52
55 void (*onCaptureStart)(const char *filename);
56
58 void (*onCaptureEnd)();
59
62
64 void (*onAlloc)(void *ptr, uint32_t size, uint32_t align);
65
67 void (*onFree)(void *ptr);
68
70 void (*onUnknownMemory)(void *ptr, uint32_t size);
71
73 void (*setOutputSurface)(GX2Surface *surface);
74
76 void (*onSwapScanBuffers)(GX2Surface *surface);
77
81 void (*submitToRing)(void *unk1,
82 uint32_t unk2,
83 uint32_t *unk3,
84 uint64_t *outSubmitTimestamp);
85};
86WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x00, version);
87WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x04, onShutdown);
88WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x08, setAllocator);
89WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x0C, onCaptureStart);
90WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x10, onCaptureEnd);
91WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x14, isCaptureEnabled);
92WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x18, onAlloc);
93WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x1C, onFree);
94WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x20, onUnknownMemory);
95WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x24, setOutputSurface);
96WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x28, onSwapScanBuffers);
97WUT_CHECK_OFFSET(GX2DebugCaptureInterface, 0x2C, submitToRing);
98WUT_CHECK_SIZE(GX2DebugCaptureInterface, 0x30);
99
100BOOL
102
103
119void
120GX2DebugCaptureStart(const char *filename,
122
123
130void
132
133
142void
143GX2DebugCaptureFrame(const char* filename);
144
145
154void
155GX2DebugCaptureFrames(const char* filename,
156 uint32_t count);
157
158#ifdef __cplusplus
159}
160#endif
161
GX2DebugCaptureInterfaceVersion
Definition debug.h:18
void GX2DebugCaptureStart(const char *filename, GX2DebugCaptureStartFlags flags)
Starts a debug capture.
BOOL _GX2DebugSetCaptureInterface(GX2DebugCaptureInterface *interface)
GX2DebugCaptureStartFlags
Options for GX2DebugCaptureStart.
Definition debug.h:24
void GX2DebugCaptureEnd(GX2DebugCaptureEndFlags flags)
Ends a debug capture.
void GX2DebugCaptureFrames(const char *filename, uint32_t count)
Will capture count frames.
GX2DebugCaptureEndFlags
Options for GX2DebugCaptureEnd.
Definition debug.h:34
void GX2DebugCaptureFrame(const char *filename)
Will capture the next frame.
@ GX2_DEBUG_CAPTURE_INTERFACE_VERSION
Definition debug.h:19
@ GX2_DEBUG_CAPTURE_START_FLAGS_NONE
When set GX2DebugCaptureStart will call GX2DrawDone before the capture is started.
Definition debug.h:26
@ GX2_DEBUG_CAPTURE_START_FLAGS_DISABLE_GX2DRAWDONE
When set GX2DebugCaptureStart will NOT call GX2DrawDone.
Definition debug.h:29
@ GX2_DEBUG_CAPTURE_END_FLAGS_NONE
When set GX2DebugCaptureEnd will call GX2Flush before the capture is completed.
Definition debug.h:36
@ GX2_DEBUG_CAPTURE_END_FLAGS_DISABLE_GX2FLUSH
When set GX2DebugCaptureEnd will NOT call GX2Flush.
Definition debug.h:39
BOOL(* isCaptureEnabled)()
Check if capture is enabled.
Definition debug.h:61
void(* onCaptureEnd)()
Called from GX2DebugCaptureEnd.
Definition debug.h:58
void(* onFree)(void *ptr)
Called when GX2 memory is freed.
Definition debug.h:67
void(* onCaptureStart)(const char *filename)
Called from GX2DebugCaptureStart, the filename is first argument passed in to GX2DebugCaptureStart.
Definition debug.h:55
void(* onAlloc)(void *ptr, uint32_t size, uint32_t align)
Called when GX2 memory is allocated.
Definition debug.h:64
void(* onUnknownMemory)(void *ptr, uint32_t size)
UNKNOWN: Called when something happens with some memory.
Definition debug.h:70
void(* setOutputSurface)(GX2Surface *surface)
Called from GX2DebugCaptureStart with the TV scan buffer.
Definition debug.h:73
void(* setAllocator)()
Called from GX2DebugSetCaptureInterface with the default gx2 allocators.
Definition debug.h:51
uint32_t version
Must be set to GX2_DEBUG_CAPTURE_INTERFACE_VERSION.
Definition debug.h:45
void(* submitToRing)(void *unk1, uint32_t unk2, uint32_t *unk3, uint64_t *outSubmitTimestamp)
Called when a command buffer is ready to be submitted to ring buffer.
Definition debug.h:81
void(* onSwapScanBuffers)(GX2Surface *surface)
Called from GX2SwapScanBuffers with the TV scan buffer.
Definition debug.h:76
void(* onShutdown)()
Called from GX2Shutdown.
Definition debug.h:48
int32_t BOOL
Definition wut_types.h:7