Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS (DX12) 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_DX12_KERNEL_INTERNAL_H)
#define TGS_DX12_KERNEL_INTERNAL_H
#pragma once

#if defined(__clang__)
#pragma clang system_header
#endif

#define TgCOMPILE_PLATFORM_INCLUDE_MSFT_WINDOWS_HEADERS
#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
#define _CRT_RAND_S

#pragma warning(push,3)
#define COBJMACROS
#include <initguid.h>
#include <dxgi1_5.h>
#include <d3d12.h>
#pragma warning(pop)

#undef CDECL

#include TgCOMPILE_DEFAULT_PCH

#include "TgS (DX12) Kernel - Internal - Constants.h"
#include "TgS (DX12) Kernel - Internal - Type.h"
#include "TgS (DX12) Kernel - Internal - Data.h"

#include "TgS (DX12) Kernel - Internal - D3DX.h"

#if defined(__D3DX12_H__)
#error D3DX not allowed in include chain
#endif


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

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

TgEXTN P_D3D12_DEVICE1                      tgKN_GPU_DXGI_Device__Create( P_D3D_FEATURE_LEVEL, P_STg2_KN_GPU_DXGI_Adapter );

TgEXTN TgVOID                               tgKN_GPU_DXGI_Free_Adapter( P_STg2_KN_GPU_DXGI_Adapter );
TgEXTN TgVOID                               tgKN_GPU_DXGI_Free_Output( P_STg2_KN_GPU_DXGI_Output );

TgEXTN TgRESULT                             tgKN_GPU_DXGI_Select_Min_Mode( PC_STg2_KN_GPU_Mode, PCU_STg2_KN_GPU_DXGI_Output, CPC_STg2_KN_GPU_Mode );
TgEXTN TgRESULT                             tgKN_GPU_DXGI_Select_Max_Mode( PC_STg2_KN_GPU_Mode, PCU_STg2_KN_GPU_DXGI_Output, CPC_STg2_KN_GPU_Mode );

#if TgS_STAT_KERNEL || TgS_DEBUG_KERNEL
TgEXTN TgVOID                               tgKN_GPU_DXGI_Output__Adapter( CPCU_STg2_KN_GPU_DXGI_Adapter );
TgEXTN CP_TgCHAR                            tgKN_GPU_DXGI_FMT_To_String( DXGI_FORMAT );
/*# TgS_STAT_KERNEL || TgS_DEBUG_KERNEL */
#endif


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  MSFT Replacement Functions                                                                                                                                            */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

TgEXTN D3D12_CPU_DESCRIPTOR_HANDLE          __ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart( P_D3D12_DESCRIPTOR_HEAP );
TgEXTN D3D12_GPU_DESCRIPTOR_HANDLE          __ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart( P_D3D12_DESCRIPTOR_HEAP );
TgEXTN D3D12_RESOURCE_DESC                  __ID3D12Resource_GetDesc( P_D3D12_RESOURCE );
TgEXTN D3D12_GPU_VIRTUAL_ADDRESS            __ID3D12Resource_GetGPUVirtualAddress( P_D3D12_RESOURCE );

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