1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: gx_CommandAccess.h 4 5 Copyright (C)2010 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 27192 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_GX_CTR_GX_COMMAND_ACCESS_H_ 17 #define NN_GX_CTR_GX_COMMAND_ACCESS_H_ 18 19 #include <nn/types.h> 20 21 #include <nn/gx/CTR/gx_MacroReg.h> 22 #include <nn/gx/CTR/gx_MacroCommon.h> 23 #include <nn/gx/CTR/gx_MacroFragment.h> 24 #include <nn/gx/CTR/gx_MacroTexture.h> 25 #include <nn/gx/CTR/gx_MacroShader.h> 26 #include <nn/gx/CTR/gx_MacroMisc.h> 27 #include <nn/gx/CTR/gx_MacroOld.h> 28 29 /*-------------------------------------------------------------------------- 30 C API 31 *-------------------------------------------------------------------------*/ 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif // __cplusplus 36 37 /*--------------------------------------------------------------------------* 38 @brief 仮想アドレスから物理アドレスへの変換を行います。 39 40 詳細については対応する C++ の API である 41 nn::gx::CTR::GetPhysicalAddr の説明を参照して下さい。 42 43 @param[in] virtualAddr 変換する論理アドレス 44 @return 変換後の物理アドレス 45 *---------------------------------------------------------------------------*/ 46 uptr nngxGetPhysicalAddr( uptr virtualAddr ); 47 48 /*--------------------------------------------------------------------------* 49 @brief メインメモリ上の頂点バッファ・テクスチャバッファ等の 50 内容の更新をグラフィックスプロセッサ側に反映させます。 51 52 詳細については対応する C++ の API である 53 nn::gx::CTR::UpdateBuffer の説明を参照して下さい。 54 55 @param[in] pBuffer バッファの先頭へのポインタ 56 @param[in] size バッファのサイズ 57 @return なし 58 *---------------------------------------------------------------------------*/ 59 void nngxUpdateBuffer( const void* pBuffer, size_t size ); 60 61 #ifdef __cplusplus 62 } // extern "C" 63 #endif // __cplusplus 64 65 66 /*-------------------------------------------------------------------------- 67 C++ API 68 *-------------------------------------------------------------------------*/ 69 #ifdef __cplusplus 70 namespace nn { 71 namespace gx { 72 namespace CTR { 73 74 /*!--------------------------------------------------------------------------* 75 @brief 仮想アドレスから物理アドレスへの変換を行います。 76 77 @param[in] virtualAddr 変換する論理アドレス 78 @return 変換後の物理アドレス 79 *---------------------------------------------------------------------------*/ GetPhysicalAddr(uptr virtualAddr)80 inline uptr GetPhysicalAddr( uptr virtualAddr ) 81 { 82 return nngxGetPhysicalAddr(virtualAddr); 83 } 84 85 /*!--------------------------------------------------------------------------* 86 @brief メインメモリ上の頂点バッファ・テクスチャバッファ等の 87 内容の更新をグラフィックスプロセッサ側に反映させます。 88 89 @param[in] pBuffer バッファの先頭へのポインタ 90 @param[in] size バッファのサイズ 91 @return なし 92 *---------------------------------------------------------------------------*/ UpdateBuffer(const void * pBuffer,size_t size)93 inline void UpdateBuffer( const void* pBuffer, size_t size ) 94 { 95 nngxUpdateBuffer(pBuffer, size); 96 } 97 98 }}} // namespace nn::gx::CTR 99 #endif // __cplusplus 100 101 102 #endif /* NN_GX_CTR_GX_COMMAND_ACCESS_H_ */ 103