/*---------------------------------------------------------------------------* Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ // -------------------------------------------------- // windows/gx2.h // // Conglomeration include file for GX2 files that are also built on the PC. // // This should only be included by Windows Projects! // // This file should probably be moved to a different directory. // (One for common private include files for gfx tools; it doesn't exist yet.) // // -------------------------------------------------- #ifndef __WINDOWS_GX2_H__ #define __WINDOWS_GX2_H__ // This PC header file replaces the following cafe headers #define __OS_H__ #define __OSTIME_H__ #define __MEM_H__ #define MEM_HEAPCOMMON_H__ #define _CAFE_GX2_UBMHELPER_H_ // Public header needed by all Cafe projects: #include // Include our PC stub functionality #include #include // We need these on the PC #include #include #include #define __func__ __FUNCTION__ #define ALIGNVAR(x) // Provide replacement for PPC native instruction // if you get a compile error here, you need to force CPP compilation, /TP inline u32 __cntlzw(u32 val) { u32 cnt = 32; while (val) { val >>=1; cnt--; } return cnt; } // In some cases, need this: #define __bytereversed // Make GX2 easier to build on the PC #define GX2_OFFLINE_COMPILE #define GX2_SURFACE_STANDALONE #define GX2_DIRECT_CALLBACK #define GX2_DONT_USE_WG #define GX2_USE_INFINITELY_FAST_HARDWARE #define GX2_PERFORMANCE_DISABLED #define _GX2CreateUBMDevice(u32) // It's now safe to include cafe/gx2.h #include // This is part of GX2_SURFACE_STANDALONE #define GPU_V1 0 #define GPU_V2 1 #define GPU_Cafe 2 // Context utility structure. typedef struct { u32 gbTilingConfig; // Used to change default register value. Set to zero to use default u32 gpu; // Target gpu void* addrLib; // address library handle BOOL bugFix2197; // Apply fix for bug 2197 in GX2CalcSurfaceSizeAndAlignment } gx2UtilsContext; // Other details: extern void* gAddrLibHandle; extern gx2UtilsContext gContext; extern gx2UtilsContext* gContextPtr; BOOL InitAddressLib(u32 gpu, u32 gbAddrConfigValue); BOOL DestroyAddressLib(); // We might find the capture interface helpful #undef GX2DebugCaptureInit #define GX2DebugCaptureInit(initAttribs) #endif // __WINDOWS_GX2_H__