Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Kernel - Internal.h
    »Author«    Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com)
    »Version«   4.51 / »GUID« A9981407-3EC9-42AF-8B6F-8BE6DD919615                                                                                                        */
/*   -------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/*  Copyright: © 2002-2017, Andrew Aye.  All Rights Reserved.
    This software is free for non-commercial use.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
      following conditions are met:
        Redistribution of source code must retain this copyright notice, this list of conditions and the following disclaimers.
        Redistribution in binary form must reproduce this copyright notice, this list of conditions and the following disclaimers in the documentation and other materials
          provided with the distribution.
    The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
    The intellectual property rights of the algorithms used reside with Andrew Aye.
    You may not use this software, in whole or in part, in support of any commercial product without the express written consent of the author.
    There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
#if !defined(TGS_KERNEL_INTERNAL_H)
#define TGS_KERNEL_INTERNAL_H

#if !defined(TGS_PLATFORM_KERNEL_INTERNAL_H)
#error This file should not be included directly - use the correct platform include wrapper
#endif

#include "TgS Kernel.h"
#include "TgS Kernel - Internal - Type.h"
#include "TgS Kernel - Internal - Data.h"


/* == Kernel ============================================================================================================================================================ */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Private Functions                                                                                                                                                     */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#if !defined(TgCOMPILE_FORCE_ANSI)
TgEXTN TgRESULT                             tgKN_PM_Module_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_PM_Module_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_PM_Module_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_PM_Module_Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_PM_Module_Update( C_TgFLOAT32 ); /* #IMPLEMENT */

TgEXTN TgSIZE                               tgKN_PM_Query_Fixed_Memory( TgVOID ); /* #IMPLEMENT */
/*# !defined(TgCOMPILE_FORCE_ANSI) */
#endif

/* -- File Serialization ------------------------------------------------------------------------------------------------------------------------------------------------ */

TgEXTN TgKN_FILE_SYSTEM_ID                  tgKN_Register_File_System( PC_STg2_KN_File_System_DESC );

TgEXTN TgKN_FILE_ID                         tgKN_File__Info_Init( CPCU_STg2_KN_File_Open_Command );
TgEXTN TgVOID                               tgKN_File__Info_Free( C_TgKN_FILE_ID );

TgEXTN TgVOID                               tgKN_FS_Job_Complete( PCU_STg2_KN_File_Job );

                                            /* Input File */
                                            /* 1: Input File */
                                            /* 2: Path */
                                            /* 3: File Name */
                                            /* 4: Cache Size */
TgEXTN TgRESULT                             tgKN_IF__Open( PCU_STg2_Input_File, C_TgKN_FS_MOUNT_ID, C_TgUINT32, C_TgUINT32 );
TgEXTN TgSIZE                               tgKN_IF__Read( PC_STg2_Input, C_TgSIZE, PC_TgVOID, C_TgSIZE );
TgEXTN TgBOOL                               tgKN_IF__End_Of_File( PC_STg2_Input, C_TgSIZE );
TgEXTN TgVOID                               tgKN_IF__Close( PC_STg2_Input );

                                            /* Output File */
                                            /* 1: Output File */
                                            /* 2: Path */
                                            /* 3: File Name */
                                            /* 4: Cache Size */
TgEXTN TgRESULT                             tgKN_OF__Open( PCU_STg2_Output_File, C_TgKN_FS_MOUNT_ID, C_TgUINT32, C_TgUINT32 );
TgEXTN TgSIZE                               tgKN_OF__Write( PC_STg2_Output, C_TgSIZE, CPC_TgVOID, C_TgSIZE );
TgEXTN TgVOID                               tgKN_OF__Close( PC_STg2_Output );

                                            /* File System - HDD */
#if !defined(TgCOMPILE_FORCE_ANSI)
TgEXTN TgSIZE                               tgKN_FS_HDD__Free_Space( C_TgKN_FS_MOUNT_ID );
TgEXTN TgVOID                               tgKN_FS_HDD__Mount( C_TgKN_FS_MOUNT_ID, CPCU_TgCHAR );
TgEXTN TgVOID                               tgKN_FS_HDD__Execute_Job( P_STg2_KN_File_Job );
/*# !defined(TgCOMPILE_FORCE_ANSI) */
#endif


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Private GPU Functions                                                                                                                                                 */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
#if defined(TgCOMPILE_GPU_SUPPORT)

TgEXTN TgRESULT                             tgKN_GPU_Lib_Init( TgVOID ); /* #IMPLEMENT */ /*« Init the resource manager. */
TgEXTN TgRESULT                             tgKN_GPU_Lib_Boot( TgVOID ); /* #IMPLEMENT */ /*« Release/Free context specific resources. */
TgEXTN TgVOID                               tgKN_GPU_Lib_Stop( TgVOID ); /* #IMPLEMENT */ /*« Restore/Init context specific resources. */
TgEXTN TgVOID                               tgKN_GPU_Lib_Free( TgVOID ); /* #IMPLEMENT */ /*« Free the resource manager. */

                                            /* Resource Library */
TgINLINE TgVOID                             tgKN_GPU_RS_LIB_DESC__Check( CPCU_STg2_KN_GPU_RS_LIB_DESC ); /* #IMPLEMENT */
TgINLINE TgVOID                             tgKN_GPU_RSI_LIB_DESC__Check( CPCU_STg2_KN_GPU_RSI_LIB_DESC ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_CXT_DATA__Init( C_TgKN_GPU_CXT_DATA_ID ); /* #IMPLEMENT_REVIEW */
TgEXTN TgVOID                               tgKN_GPU_CXT_DATA__Free( C_TgKN_GPU_CXT_DATA_ID ); /* #IMPLEMENT_REVIEW */


/* -- Resource - GPU ---------------------------------------------------------------------------------------------------------------------------------------------------- */

                                            /* 1: Mount - Kernel File System Mount being used for file access. */
                                            /* 2: Path - Path to file location relative to the mount point. */
                                            /* 3: File Name - File name is assumed to be the name of the resource. */
                                            /* 4: Allocator - Memory allocation method used for the resource. */
                                            /* 5: Max Resource - Max Resource for the Library. */
                                            /* 6: Library - Descriptor for the library for the resource. */
#if !defined(TgS_FINAL)
TgEXTN TgKN_GPU_RS_ID                       tgKN_GPU_RS__File_Load_BIN( C_TgKN_FS_MOUNT_ID, CPC_TgCHAR, CPC_TgCHAR, C_ETgKN_GPU_ALLOCATOR, PCU_STg2_KN_GPU_RS_LIB_DESC ); /* #IMPLEMENT_REVIEW */
#endif
                                            /* 1: Allocator - Memory allocation method used for the resource. */
                                            /* 2: Name Hash - Hash of the unique name (key) for this resource. */
                                            /* 3: Input Stream - The data stream representing the resource. */
TgEXTN TgKN_GPU_RS_ID                       tgKN_GPU_RS__Load_BIN( C_TgKN_FILE_ID, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, PCU_STg2_KN_GPU_RS_LIB_DESC ); /* #IMPLEMENT_REVIEW */
TgEXTN TgSINT32                             tgKN_GPU_RS__Release( C_TgKN_GPU_RS_ID, PCU_STg2_KN_GPU_RS_LIB_DESC ); /* #IMPLEMENT_REVIEW */

                                            /* Resource Interface */
TgEXTN TgKN_GPU_RSI_ID                      tgKN_GPU_RSI__Init( PCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgUINT32, C_TgKN_GPU_RS_ID ); /* #IMPLEMENT_REVIEW */
TgEXTN TgKN_GPU_RSI_ID                      tgKN_GPU_RSI__IncRef( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT_REVIEW */
TgEXTN TgKN_GPU_RSI_ID                      tgKN_GPU_RSI__Hash_Find_And_IncRef( PCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgUINT32, C_TgUINTXX ); /* #IMPLEMENT_REVIEW */
TgEXTN TgSINT32                             tgKN_GPU_RSI__Release( PCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT_REVIEW */


/* -- Resource - GPU - Shader-------------------------------------------------------------------------------------------------------------------------------------------- */
/* Shader resources are contained only at the resource context level. There is no need and no corresponding separation of between raw data and the resource instance. */

TgEXTN TgRESULT                             tgKN_GPU_Shader_Lib_Init( TgVOID ); /* #IMPLEMENT */ /*« Init the resource manager */
TgEXTN TgRESULT                             tgKN_GPU_Shader_Lib_Boot( TgVOID ); /* #IMPLEMENT */ /*« Release/Free context specific resources */
TgEXTN TgVOID                               tgKN_GPU_Shader_Lib_Stop( TgVOID ); /* #IMPLEMENT */ /*« Restore/Init context specific resources */
TgEXTN TgVOID                               tgKN_GPU_Shader_Lib_Free( TgVOID ); /* #IMPLEMENT */ /*« Free the resource manager */

TgEXTN TgSINT32                             tgKN_GPU_CS__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_HS__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_DS__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_VS__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_GS__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_PS__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_CS_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_HS_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_DS_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_VS_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_GS_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PS_LIB__Init( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_CS_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_HS_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_DS_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_VS_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_GS_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PS_LIB__Stop( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_CS_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_HS_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_DS_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_VS_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_GS_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PS_LIB__Free( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_CS_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_HS_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_DS_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_GS_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PS_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_CS_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_HS_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_DS_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_GS_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PS_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */


/* -- Resource - GPU - Input -------------------------------------------------------------------------------------------------------------------------------------------- */

TgEXTN TgVOID                               tgKN_GPU_VT_LIB__Init( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_IL_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_IL_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */


/* -- Resource - GPU - Texture ------------------------------------------------------------------------------------------------------------------------------------------ */
/* Texture resource is the main memory (core) resource of the texture. Texture instance is the local memory resource of a texture that has been registered with the */
/* corresponding resource context which is also mapped to a registration with the underlying hardware or OS render library (system). */

TgEXTN TgRESULT                             tgKN_GPU_TX_LIB_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_GPU_TX_LIB_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_LIB_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_LIB_Free( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_Reset_TextureCache( TgVOID ); /* #IMPLEMENT */

TgEXTN TgSINT32                             tgKN_GPU_TX_IMG__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_TX_CBE__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgSINT32                             tgKN_GPU_TX_VOL__Release( C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_TX_IMG_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_CBE_LIB__Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_VOL_LIB__Init( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_TX_IMG_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_CBE_LIB__Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_VOL_LIB__Stop( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_TX_IMG_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_CBE_LIB__Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_VOL_LIB__Free( TgVOID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_TX_IMG_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_CBE_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_VOL_Inst_LIB__Init( C_TgSINT32 ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_TX_IMG_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_CBE_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_TX_VOL_Inst_LIB__Free( C_TgSINT32 ); /* #IMPLEMENT */


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Platform GPU Functions                                                                                                                                                */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#if !defined(TgCOMPILE_FORCE_ANSI)
TgEXTN TgRESULT                             tgKN_PM_GPU_PM_Module_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_PM_GPU_PM_Module_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_PM_GPU_PM_Module_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_PM_GPU_PM_Module_Free( TgVOID ); /* #IMPLEMENT */
/*# !defined(TgCOMPILE_FORCE_ANSI) */
#endif
TgEXTN TgRESULT                             tgKN_GPU_PM_Module_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_GPU_PM_Module_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Module_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Module_Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_GPU_PM_Module_Update( C_TgFLOAT32 ); /* #IMPLEMENT */

TgEXTN TgRESULT                             tgKN_GPU_PM_Load_Config( TgVOID );
TgEXTN TgRESULT                             tgKN_GPU_PM_Save_Config( TgVOID );

TgEXTN TgSIZE                               tgKN_GPU_PM_Query_Fixed_Memory( TgVOID );

TgEXTN TgRESULT                             tgKN_GPU_PM_Lib_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_GPU_PM_Lib_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Lib_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Lib_Free( TgVOID ); /* #IMPLEMENT */

TgEXTN TgRESULT                             tgKN_GPU_PM_Enumerate( TgVOID );

TgEXTN TgSINT32                             tgKN_GPU_PM_Query_Mode_List( P_STg2_KN_GPU_Mode, C_TgSINT32, C_TgSINT32, C_TgSINT32, C_ETgKN_GPU_TARGET );

TgEXTN TgRESULT                             tgKN_GPU_PM_Context__Init( C_TgKN_GPU_CXT_ID, CPCU_STg2_KN_GPU_Select ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Context__Free( C_TgKN_GPU_CXT_ID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_PM_Render_Context__Flush( C_TgKN_GPU_CXT_DEVC_ID, C_TgKN_GPU_CXT_SWAP_ID );
TgEXTN TgVOID                               tgKN_GPU_PM_Render_Context__Swap_Acquire( C_TgKN_GPU_CXT_ID );
TgEXTN TgRESULT                             tgKN_GPU_PM_Render_Context__Swap( C_TgKN_GPU_CXT_ID );


/* -- Resource - GPU - Shader-------------------------------------------------------------------------------------------------------------------------------------------- */

TgEXTN TgRESULT                             tgKN_GPU_PM_Shader_Lib_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_GPU_PM_Shader_Lib_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Shader_Lib_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_Shader_Lib_Free( TgVOID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_CS__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_CS__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_CS_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_CS_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_HS__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_HS__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_HS_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_HS_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_DS__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_DS__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_DS_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_DS_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_GS__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_GS__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_GS_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_GS_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_PS__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_PS__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_PS_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_PS_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_VS__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_VS__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */

                                              /* Set_VS_Constant - Sends constant data to the vertex shader.  The accepted paradigm */
                                              /* to use these functions is to set the shader first, then use a function to set the */
                                              /* constant data for the shader.  Depending on the platform and implementation details */
                                              /* it is possible that by changing order of operations that the data will not properly */
                                              /* be patched into the shader. Keep in mind that on the DX platforms data is always */
                                              /* sent if 64 byte chunks on 64 byte boundaries. */
/*
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_F4(
                                                C_TgSINT32, C_ETgKN_VS_CONSTANT, C_TgFLOAT32,C_TgFLOAT32,C_TgFLOAT32,C_TgFLOAT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_V1( C_TgSINT32, C_ETgKN_VS_CONSTANT, CPCU_TgVEC_F32_04 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_F34( C_TgSINT32, C_ETgKN_VS_CONSTANT, CPCU_TgMAT_F32_34 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_FN(
                                                C_TgSINT32, C_ETgKN_VS_CONSTANT, CPC_TgFLOAT32, C_TgUINT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_I( C_TgSINT32, C_ETgKN_VS_CONSTANT, C_TgUINT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_B( C_TgSINT32, C_ETgKN_VS_CONSTANT, C_TgUINT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_F44( C_TgSINT32, C_ETgKN_VS_CONSTANT, CPCU_TgMAT_F32_44 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Constant_V4(
                                                C_TgSINT32, C_ETgKN_VS_CONSTANT, CPCU_TgVEC_F32_04, CPCU_TgVEC_F32_04,
                                                CPCU_TgVEC_F32_04, CPCU_TgVEC_F32_04 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Sampler_Cube( C_TgSINT32, C_ETgKN_VS_SAMPLER, C_TgKN_TX_CUBE_ID );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Sampler_Image( C_TgSINT32, C_ETgKN_VS_SAMPLER, C_TgKN_TX_IMG_ID );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VS_Sampler_Volume( C_TgSINT32, C_ETgKN_VS_SAMPLER, C_TgKN_TX_VOL_ID );

                                            // Set_PS_Constant - Similar to the VS constant functions in behavior.  Remember that
                                            // the PS3 does not have pixel shader constants and must patch the constants into the
                                            // pixel shader itself.
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_F4(
                                                C_TgSINT32, C_ETgKN_PS_CONSTANT, C_TgFLOAT32,C_TgFLOAT32,C_TgFLOAT32,C_TgFLOAT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_V1( C_TgSINT32, C_ETgKN_PS_CONSTANT, CPCU_TgVEC_F32_04 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_FN(
                                                C_TgSINT32, C_ETgKN_PS_CONSTANT, CPC_TgFLOAT32, C_TgUINT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_I( C_TgSINT32, C_ETgKN_PS_CONSTANT, C_TgUINT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_B( C_TgSINT32, C_ETgKN_PS_CONSTANT, C_TgUINT32 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_F44( C_TgSINT32, C_ETgKN_PS_CONSTANT, CPCU_TgMAT_F32_44 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Constant_V4(
                                                C_TgSINT32, C_ETgKN_PS_CONSTANT, CPCU_TgVEC_F32_04, CPCU_TgVEC_F32_04,
                                                CPCU_TgVEC_F32_04, CPCU_TgVEC_F32_04 );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Sampler_Cube( C_TgSINT32, C_ETgKN_PS_SAMPLER, C_TgKN_TX_CUBE_ID );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Sampler_Image( C_TgSINT32, C_ETgKN_PS_SAMPLER, C_TgKN_TX_IMG_ID );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Sampler_Volume( C_TgSINT32, C_ETgKN_PS_SAMPLER, C_TgKN_TX_VOL_ID );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS_Sampler_State(
                                                C_TgSINT32, C_ETgKN_PS_SAMPLER, CPCU_STg2_KN_Shader_Sampler_State );

// Stream Control
                                            // 1: Mesh Structure
                                            // 2: Offset into the stream arrays
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VXSM_IL_Mesh_Offset(
                                                C_TgSINT32, CPC_STg2_KN_Mesh, C_TgUINT32, C_ETgKN_IL_TYPE );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VXSM_IL_Mesh( C_TgSINT32, CPC_STg2_KN_Mesh, C_ETgKN_IL_TYPE );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VXSM_IL_Offset( C_TgSINT32, CPC_TgVOID, C_TgSINT32, C_ETgKN_IL_TYPE );
TgEXTN TgVOID                               tgKN_GPU_PM_Set_VXSM_IL( C_TgSINT32, PC_TgVOID, C_ETgKN_IL_TYPE );

TgEXTN TgVOID                               tgKN_GPU_PM_Set_PS( C_TgSINT32, C_ETgKN_PS_TYPE );
*/


/* -- Resource - GPU - Input -------------------------------------------------------------------------------------------------------------------------------------------- */

TgEXTN TgBOOL                               tgKN_GPU_PM_VT__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSINT32, P_STg2_KN_GPU_VT_DESC ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_VT__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSINT32 ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_IL__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_IL__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgKN_GPU_PM_IL__Bind( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID, C_TgKN_GPU_RS_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_IL__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */


/* -- Resource - GPU - Texture ------------------------------------------------------------------------------------------------------------------------------------------ */

TgEXTN TgRESULT                             tgKN_GPU_PM_TX_LIB_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgKN_GPU_PM_TX_LIB_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_LIB_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_LIB_Free( TgVOID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_TX_IMG__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_IMG__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_IMG_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_IMG_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_TX_CBE__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_CBE__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_CBE_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_CBE_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgKN_GPU_PM_TX_VOL__Init( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE, C_ETgKN_GPU_ALLOCATOR, C_TgUINTXX, C_TgKN_FILE_ID, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_VOL__Free( CPCU_STg2_KN_GPU_RS_LIB_DESC, C_TgSIZE ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_VOL_Inst__Init( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgKN_GPU_PM_TX_VOL_Inst__Free( CPCU_STg2_KN_GPU_RSI_LIB_DESC, C_TgKN_GPU_RSI_ID ); /* #IMPLEMENT */


/*# defined(TgCOMPILE_GPU_SUPPORT) */
#endif


/* ====================================================================================================================================================================== */
#endif