mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_02_18_src
Former-commit-id: 806e6b13801b7d8734d8fec125c5962aa75d6e2a
This commit is contained in:
parent
b0524b2bb5
commit
061a3d0f34
6723
Include/D3D10.h
Normal file
6723
Include/D3D10.h
Normal file
File diff suppressed because it is too large
Load Diff
1775
Include/D3D10_1 - Copia.h
Normal file
1775
Include/D3D10_1 - Copia.h
Normal file
File diff suppressed because it is too large
Load Diff
1775
Include/D3D10_1.h
Normal file
1775
Include/D3D10_1.h
Normal file
File diff suppressed because it is too large
Load Diff
301
Include/D3D10_1shader - Copia.h
Normal file
301
Include/D3D10_1shader - Copia.h
Normal file
@ -0,0 +1,301 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: D3D10_1Shader.h
|
||||
// Content: D3D10.1 Shader Types and APIs
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3D10_1SHADER_H__
|
||||
#define __D3D10_1SHADER_H__
|
||||
|
||||
#include "d3d10shader.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Shader debugging structures
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef enum _D3D10_SHADER_DEBUG_REGTYPE
|
||||
{
|
||||
D3D10_SHADER_DEBUG_REG_INPUT,
|
||||
D3D10_SHADER_DEBUG_REG_OUTPUT,
|
||||
D3D10_SHADER_DEBUG_REG_CBUFFER,
|
||||
D3D10_SHADER_DEBUG_REG_TBUFFER,
|
||||
D3D10_SHADER_DEBUG_REG_TEMP,
|
||||
D3D10_SHADER_DEBUG_REG_TEMPARRAY,
|
||||
D3D10_SHADER_DEBUG_REG_TEXTURE,
|
||||
D3D10_SHADER_DEBUG_REG_SAMPLER,
|
||||
D3D10_SHADER_DEBUG_REG_IMMEDIATECBUFFER,
|
||||
D3D10_SHADER_DEBUG_REG_LITERAL,
|
||||
D3D10_SHADER_DEBUG_REG_UNUSED,
|
||||
D3D11_SHADER_DEBUG_REG_INTERFACE_POINTERS,
|
||||
D3D11_SHADER_DEBUG_REG_UAV,
|
||||
D3D10_SHADER_DEBUG_REG_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D10_SHADER_DEBUG_REGTYPE;
|
||||
|
||||
typedef enum _D3D10_SHADER_DEBUG_SCOPETYPE
|
||||
{
|
||||
D3D10_SHADER_DEBUG_SCOPE_GLOBAL,
|
||||
D3D10_SHADER_DEBUG_SCOPE_BLOCK,
|
||||
D3D10_SHADER_DEBUG_SCOPE_FORLOOP,
|
||||
D3D10_SHADER_DEBUG_SCOPE_STRUCT,
|
||||
D3D10_SHADER_DEBUG_SCOPE_FUNC_PARAMS,
|
||||
D3D10_SHADER_DEBUG_SCOPE_STATEBLOCK,
|
||||
D3D10_SHADER_DEBUG_SCOPE_NAMESPACE,
|
||||
D3D10_SHADER_DEBUG_SCOPE_ANNOTATION,
|
||||
D3D10_SHADER_DEBUG_SCOPE_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D10_SHADER_DEBUG_SCOPETYPE;
|
||||
|
||||
typedef enum _D3D10_SHADER_DEBUG_VARTYPE
|
||||
{
|
||||
D3D10_SHADER_DEBUG_VAR_VARIABLE,
|
||||
D3D10_SHADER_DEBUG_VAR_FUNCTION,
|
||||
D3D10_SHADER_DEBUG_VAR_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D10_SHADER_DEBUG_VARTYPE;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// These are the serialized structures that get written to the file
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_TOKEN_INFO
|
||||
{
|
||||
UINT File; // offset into file list
|
||||
UINT Line; // line #
|
||||
UINT Column; // column #
|
||||
|
||||
UINT TokenLength;
|
||||
UINT TokenId; // offset to LPCSTR of length TokenLength in string datastore
|
||||
} D3D10_SHADER_DEBUG_TOKEN_INFO;
|
||||
|
||||
// Variable list
|
||||
typedef struct _D3D10_SHADER_DEBUG_VAR_INFO
|
||||
{
|
||||
// Index into token list for declaring identifier
|
||||
UINT TokenId;
|
||||
D3D10_SHADER_VARIABLE_TYPE Type;
|
||||
// register and component for this variable, only valid/necessary for arrays
|
||||
UINT Register;
|
||||
UINT Component;
|
||||
// gives the original variable that declared this variable
|
||||
UINT ScopeVar;
|
||||
// this variable's offset in its ScopeVar
|
||||
UINT ScopeVarOffset;
|
||||
} D3D10_SHADER_DEBUG_VAR_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_INPUT_INFO
|
||||
{
|
||||
// index into array of variables of variable to initialize
|
||||
UINT Var;
|
||||
// input, cbuffer, tbuffer
|
||||
D3D10_SHADER_DEBUG_REGTYPE InitialRegisterSet;
|
||||
// set to cbuffer or tbuffer slot, geometry shader input primitive #,
|
||||
// identifying register for indexable temp, or -1
|
||||
UINT InitialBank;
|
||||
// -1 if temp, otherwise gives register in register set
|
||||
UINT InitialRegister;
|
||||
// -1 if temp, otherwise gives component
|
||||
UINT InitialComponent;
|
||||
// initial value if literal
|
||||
UINT InitialValue;
|
||||
} D3D10_SHADER_DEBUG_INPUT_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_SCOPEVAR_INFO
|
||||
{
|
||||
// Index into variable token
|
||||
UINT TokenId;
|
||||
|
||||
D3D10_SHADER_DEBUG_VARTYPE VarType; // variable or function (different namespaces)
|
||||
D3D10_SHADER_VARIABLE_CLASS Class;
|
||||
UINT Rows; // number of rows (matrices)
|
||||
UINT Columns; // number of columns (vectors and matrices)
|
||||
|
||||
// In an array of structures, one struct member scope is provided, and
|
||||
// you'll have to add the array stride times the index to the variable
|
||||
// index you find, then find that variable in this structure's list of
|
||||
// variables.
|
||||
|
||||
// gives a scope to look up struct members. -1 if not a struct
|
||||
UINT StructMemberScope;
|
||||
|
||||
// number of array indices
|
||||
UINT uArrayIndices; // a[3][2][1] has 3 indices
|
||||
// maximum array index for each index
|
||||
// offset to UINT[uArrayIndices] in UINT datastore
|
||||
UINT ArrayElements; // a[3][2][1] has {3, 2, 1}
|
||||
// how many variables each array index moves
|
||||
// offset to UINT[uArrayIndices] in UINT datastore
|
||||
UINT ArrayStrides; // a[3][2][1] has {2, 1, 1}
|
||||
|
||||
UINT uVariables;
|
||||
// index of the first variable, later variables are offsets from this one
|
||||
UINT uFirstVariable;
|
||||
} D3D10_SHADER_DEBUG_SCOPEVAR_INFO;
|
||||
|
||||
// scope data, this maps variable names to debug variables (useful for the watch window)
|
||||
typedef struct _D3D10_SHADER_DEBUG_SCOPE_INFO
|
||||
{
|
||||
D3D10_SHADER_DEBUG_SCOPETYPE ScopeType;
|
||||
UINT Name; // offset to name of scope in strings list
|
||||
UINT uNameLen; // length of name string
|
||||
UINT uVariables;
|
||||
UINT VariableData; // Offset to UINT[uVariables] indexing the Scope Variable list
|
||||
} D3D10_SHADER_DEBUG_SCOPE_INFO;
|
||||
|
||||
// instruction outputs
|
||||
typedef struct _D3D10_SHADER_DEBUG_OUTPUTVAR
|
||||
{
|
||||
// index variable being written to, if -1 it's not going to a variable
|
||||
UINT Var;
|
||||
// range data that the compiler expects to be true
|
||||
UINT uValueMin, uValueMax;
|
||||
INT iValueMin, iValueMax;
|
||||
FLOAT fValueMin, fValueMax;
|
||||
|
||||
BOOL bNaNPossible, bInfPossible;
|
||||
} D3D10_SHADER_DEBUG_OUTPUTVAR;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_OUTPUTREG_INFO
|
||||
{
|
||||
// Only temp, indexable temp, and output are valid here
|
||||
D3D10_SHADER_DEBUG_REGTYPE OutputRegisterSet;
|
||||
// -1 means no output
|
||||
UINT OutputReg;
|
||||
// if a temp array, identifier for which one
|
||||
UINT TempArrayReg;
|
||||
// -1 means masked out
|
||||
UINT OutputComponents[4];
|
||||
D3D10_SHADER_DEBUG_OUTPUTVAR OutputVars[4];
|
||||
// when indexing the output, get the value of this register, then add
|
||||
// that to uOutputReg. If uIndexReg is -1, then there is no index.
|
||||
// find the variable whose register is the sum (by looking in the ScopeVar)
|
||||
// and component matches, then set it. This should only happen for indexable
|
||||
// temps and outputs.
|
||||
UINT IndexReg;
|
||||
UINT IndexComp;
|
||||
} D3D10_SHADER_DEBUG_OUTPUTREG_INFO;
|
||||
|
||||
// per instruction data
|
||||
typedef struct _D3D10_SHADER_DEBUG_INST_INFO
|
||||
{
|
||||
UINT Id; // Which instruction this is in the bytecode
|
||||
UINT Opcode; // instruction type
|
||||
|
||||
// 0, 1, or 2
|
||||
UINT uOutputs;
|
||||
|
||||
// up to two outputs per instruction
|
||||
D3D10_SHADER_DEBUG_OUTPUTREG_INFO pOutputs[2];
|
||||
|
||||
// index into the list of tokens for this instruction's token
|
||||
UINT TokenId;
|
||||
|
||||
// how many function calls deep this instruction is
|
||||
UINT NestingLevel;
|
||||
|
||||
// list of scopes from outer-most to inner-most
|
||||
// Number of scopes
|
||||
UINT Scopes;
|
||||
UINT ScopeInfo; // Offset to UINT[uScopes] specifying indices of the ScopeInfo Array
|
||||
|
||||
// list of variables accessed by this instruction
|
||||
// Number of variables
|
||||
UINT AccessedVars;
|
||||
UINT AccessedVarsInfo; // Offset to UINT[AccessedVars] specifying indices of the ScopeVariableInfo Array
|
||||
} D3D10_SHADER_DEBUG_INST_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_FILE_INFO
|
||||
{
|
||||
UINT FileName; // Offset to LPCSTR for file name
|
||||
UINT FileNameLen; // Length of file name
|
||||
UINT FileData; // Offset to LPCSTR of length FileLen
|
||||
UINT FileLen; // Length of file
|
||||
} D3D10_SHADER_DEBUG_FILE_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_INFO
|
||||
{
|
||||
UINT Size; // sizeof(D3D10_SHADER_DEBUG_INFO)
|
||||
UINT Creator; // Offset to LPCSTR for compiler version
|
||||
UINT EntrypointName; // Offset to LPCSTR for Entry point name
|
||||
UINT ShaderTarget; // Offset to LPCSTR for shader target
|
||||
UINT CompileFlags; // flags used to compile
|
||||
UINT Files; // number of included files
|
||||
UINT FileInfo; // Offset to D3D10_SHADER_DEBUG_FILE_INFO[Files]
|
||||
UINT Instructions; // number of instructions
|
||||
UINT InstructionInfo; // Offset to D3D10_SHADER_DEBUG_INST_INFO[Instructions]
|
||||
UINT Variables; // number of variables
|
||||
UINT VariableInfo; // Offset to D3D10_SHADER_DEBUG_VAR_INFO[Variables]
|
||||
UINT InputVariables; // number of variables to initialize before running
|
||||
UINT InputVariableInfo; // Offset to D3D10_SHADER_DEBUG_INPUT_INFO[InputVariables]
|
||||
UINT Tokens; // number of tokens to initialize
|
||||
UINT TokenInfo; // Offset to D3D10_SHADER_DEBUG_TOKEN_INFO[Tokens]
|
||||
UINT Scopes; // number of scopes
|
||||
UINT ScopeInfo; // Offset to D3D10_SHADER_DEBUG_SCOPE_INFO[Scopes]
|
||||
UINT ScopeVariables; // number of variables declared
|
||||
UINT ScopeVariableInfo; // Offset to D3D10_SHADER_DEBUG_SCOPEVAR_INFO[Scopes]
|
||||
UINT UintOffset; // Offset to the UINT datastore, all UINT offsets are from this offset
|
||||
UINT StringOffset; // Offset to the string datastore, all string offsets are from this offset
|
||||
} D3D10_SHADER_DEBUG_INFO;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3D10ShaderReflection1:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Interface definitions
|
||||
//
|
||||
|
||||
typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1;
|
||||
typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1;
|
||||
|
||||
// {C3457783-A846-47CE-9520-CEA6F66E7447}
|
||||
DEFINE_GUID(IID_ID3D10ShaderReflection1,
|
||||
0xc3457783, 0xa846, 0x47ce, 0x95, 0x20, 0xce, 0xa6, 0xf6, 0x6e, 0x74, 0x47);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D10ShaderReflection1
|
||||
|
||||
DECLARE_INTERFACE_(ID3D10ShaderReflection1, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR Name, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetMovInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
STDMETHOD(GetMovcInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
STDMETHOD(GetConversionInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
STDMETHOD(GetBitwiseInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
|
||||
STDMETHOD(GetGSInputPrimitive)(THIS_ D3D10_PRIMITIVE* pPrim) PURE;
|
||||
STDMETHOD(IsLevel9Shader)(THIS_ BOOL* pbLevel9Shader) PURE;
|
||||
STDMETHOD(IsSampleFrequencyShader)(THIS_ BOOL* pbSampleFrequency) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3D10_1SHADER_H__
|
||||
|
301
Include/D3D10_1shader.h
Normal file
301
Include/D3D10_1shader.h
Normal file
@ -0,0 +1,301 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: D3D10_1Shader.h
|
||||
// Content: D3D10.1 Shader Types and APIs
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3D10_1SHADER_H__
|
||||
#define __D3D10_1SHADER_H__
|
||||
|
||||
#include "d3d10shader.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Shader debugging structures
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef enum _D3D10_SHADER_DEBUG_REGTYPE
|
||||
{
|
||||
D3D10_SHADER_DEBUG_REG_INPUT,
|
||||
D3D10_SHADER_DEBUG_REG_OUTPUT,
|
||||
D3D10_SHADER_DEBUG_REG_CBUFFER,
|
||||
D3D10_SHADER_DEBUG_REG_TBUFFER,
|
||||
D3D10_SHADER_DEBUG_REG_TEMP,
|
||||
D3D10_SHADER_DEBUG_REG_TEMPARRAY,
|
||||
D3D10_SHADER_DEBUG_REG_TEXTURE,
|
||||
D3D10_SHADER_DEBUG_REG_SAMPLER,
|
||||
D3D10_SHADER_DEBUG_REG_IMMEDIATECBUFFER,
|
||||
D3D10_SHADER_DEBUG_REG_LITERAL,
|
||||
D3D10_SHADER_DEBUG_REG_UNUSED,
|
||||
D3D11_SHADER_DEBUG_REG_INTERFACE_POINTERS,
|
||||
D3D11_SHADER_DEBUG_REG_UAV,
|
||||
D3D10_SHADER_DEBUG_REG_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D10_SHADER_DEBUG_REGTYPE;
|
||||
|
||||
typedef enum _D3D10_SHADER_DEBUG_SCOPETYPE
|
||||
{
|
||||
D3D10_SHADER_DEBUG_SCOPE_GLOBAL,
|
||||
D3D10_SHADER_DEBUG_SCOPE_BLOCK,
|
||||
D3D10_SHADER_DEBUG_SCOPE_FORLOOP,
|
||||
D3D10_SHADER_DEBUG_SCOPE_STRUCT,
|
||||
D3D10_SHADER_DEBUG_SCOPE_FUNC_PARAMS,
|
||||
D3D10_SHADER_DEBUG_SCOPE_STATEBLOCK,
|
||||
D3D10_SHADER_DEBUG_SCOPE_NAMESPACE,
|
||||
D3D10_SHADER_DEBUG_SCOPE_ANNOTATION,
|
||||
D3D10_SHADER_DEBUG_SCOPE_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D10_SHADER_DEBUG_SCOPETYPE;
|
||||
|
||||
typedef enum _D3D10_SHADER_DEBUG_VARTYPE
|
||||
{
|
||||
D3D10_SHADER_DEBUG_VAR_VARIABLE,
|
||||
D3D10_SHADER_DEBUG_VAR_FUNCTION,
|
||||
D3D10_SHADER_DEBUG_VAR_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D10_SHADER_DEBUG_VARTYPE;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// These are the serialized structures that get written to the file
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_TOKEN_INFO
|
||||
{
|
||||
UINT File; // offset into file list
|
||||
UINT Line; // line #
|
||||
UINT Column; // column #
|
||||
|
||||
UINT TokenLength;
|
||||
UINT TokenId; // offset to LPCSTR of length TokenLength in string datastore
|
||||
} D3D10_SHADER_DEBUG_TOKEN_INFO;
|
||||
|
||||
// Variable list
|
||||
typedef struct _D3D10_SHADER_DEBUG_VAR_INFO
|
||||
{
|
||||
// Index into token list for declaring identifier
|
||||
UINT TokenId;
|
||||
D3D10_SHADER_VARIABLE_TYPE Type;
|
||||
// register and component for this variable, only valid/necessary for arrays
|
||||
UINT Register;
|
||||
UINT Component;
|
||||
// gives the original variable that declared this variable
|
||||
UINT ScopeVar;
|
||||
// this variable's offset in its ScopeVar
|
||||
UINT ScopeVarOffset;
|
||||
} D3D10_SHADER_DEBUG_VAR_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_INPUT_INFO
|
||||
{
|
||||
// index into array of variables of variable to initialize
|
||||
UINT Var;
|
||||
// input, cbuffer, tbuffer
|
||||
D3D10_SHADER_DEBUG_REGTYPE InitialRegisterSet;
|
||||
// set to cbuffer or tbuffer slot, geometry shader input primitive #,
|
||||
// identifying register for indexable temp, or -1
|
||||
UINT InitialBank;
|
||||
// -1 if temp, otherwise gives register in register set
|
||||
UINT InitialRegister;
|
||||
// -1 if temp, otherwise gives component
|
||||
UINT InitialComponent;
|
||||
// initial value if literal
|
||||
UINT InitialValue;
|
||||
} D3D10_SHADER_DEBUG_INPUT_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_SCOPEVAR_INFO
|
||||
{
|
||||
// Index into variable token
|
||||
UINT TokenId;
|
||||
|
||||
D3D10_SHADER_DEBUG_VARTYPE VarType; // variable or function (different namespaces)
|
||||
D3D10_SHADER_VARIABLE_CLASS Class;
|
||||
UINT Rows; // number of rows (matrices)
|
||||
UINT Columns; // number of columns (vectors and matrices)
|
||||
|
||||
// In an array of structures, one struct member scope is provided, and
|
||||
// you'll have to add the array stride times the index to the variable
|
||||
// index you find, then find that variable in this structure's list of
|
||||
// variables.
|
||||
|
||||
// gives a scope to look up struct members. -1 if not a struct
|
||||
UINT StructMemberScope;
|
||||
|
||||
// number of array indices
|
||||
UINT uArrayIndices; // a[3][2][1] has 3 indices
|
||||
// maximum array index for each index
|
||||
// offset to UINT[uArrayIndices] in UINT datastore
|
||||
UINT ArrayElements; // a[3][2][1] has {3, 2, 1}
|
||||
// how many variables each array index moves
|
||||
// offset to UINT[uArrayIndices] in UINT datastore
|
||||
UINT ArrayStrides; // a[3][2][1] has {2, 1, 1}
|
||||
|
||||
UINT uVariables;
|
||||
// index of the first variable, later variables are offsets from this one
|
||||
UINT uFirstVariable;
|
||||
} D3D10_SHADER_DEBUG_SCOPEVAR_INFO;
|
||||
|
||||
// scope data, this maps variable names to debug variables (useful for the watch window)
|
||||
typedef struct _D3D10_SHADER_DEBUG_SCOPE_INFO
|
||||
{
|
||||
D3D10_SHADER_DEBUG_SCOPETYPE ScopeType;
|
||||
UINT Name; // offset to name of scope in strings list
|
||||
UINT uNameLen; // length of name string
|
||||
UINT uVariables;
|
||||
UINT VariableData; // Offset to UINT[uVariables] indexing the Scope Variable list
|
||||
} D3D10_SHADER_DEBUG_SCOPE_INFO;
|
||||
|
||||
// instruction outputs
|
||||
typedef struct _D3D10_SHADER_DEBUG_OUTPUTVAR
|
||||
{
|
||||
// index variable being written to, if -1 it's not going to a variable
|
||||
UINT Var;
|
||||
// range data that the compiler expects to be true
|
||||
UINT uValueMin, uValueMax;
|
||||
INT iValueMin, iValueMax;
|
||||
FLOAT fValueMin, fValueMax;
|
||||
|
||||
BOOL bNaNPossible, bInfPossible;
|
||||
} D3D10_SHADER_DEBUG_OUTPUTVAR;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_OUTPUTREG_INFO
|
||||
{
|
||||
// Only temp, indexable temp, and output are valid here
|
||||
D3D10_SHADER_DEBUG_REGTYPE OutputRegisterSet;
|
||||
// -1 means no output
|
||||
UINT OutputReg;
|
||||
// if a temp array, identifier for which one
|
||||
UINT TempArrayReg;
|
||||
// -1 means masked out
|
||||
UINT OutputComponents[4];
|
||||
D3D10_SHADER_DEBUG_OUTPUTVAR OutputVars[4];
|
||||
// when indexing the output, get the value of this register, then add
|
||||
// that to uOutputReg. If uIndexReg is -1, then there is no index.
|
||||
// find the variable whose register is the sum (by looking in the ScopeVar)
|
||||
// and component matches, then set it. This should only happen for indexable
|
||||
// temps and outputs.
|
||||
UINT IndexReg;
|
||||
UINT IndexComp;
|
||||
} D3D10_SHADER_DEBUG_OUTPUTREG_INFO;
|
||||
|
||||
// per instruction data
|
||||
typedef struct _D3D10_SHADER_DEBUG_INST_INFO
|
||||
{
|
||||
UINT Id; // Which instruction this is in the bytecode
|
||||
UINT Opcode; // instruction type
|
||||
|
||||
// 0, 1, or 2
|
||||
UINT uOutputs;
|
||||
|
||||
// up to two outputs per instruction
|
||||
D3D10_SHADER_DEBUG_OUTPUTREG_INFO pOutputs[2];
|
||||
|
||||
// index into the list of tokens for this instruction's token
|
||||
UINT TokenId;
|
||||
|
||||
// how many function calls deep this instruction is
|
||||
UINT NestingLevel;
|
||||
|
||||
// list of scopes from outer-most to inner-most
|
||||
// Number of scopes
|
||||
UINT Scopes;
|
||||
UINT ScopeInfo; // Offset to UINT[uScopes] specifying indices of the ScopeInfo Array
|
||||
|
||||
// list of variables accessed by this instruction
|
||||
// Number of variables
|
||||
UINT AccessedVars;
|
||||
UINT AccessedVarsInfo; // Offset to UINT[AccessedVars] specifying indices of the ScopeVariableInfo Array
|
||||
} D3D10_SHADER_DEBUG_INST_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_FILE_INFO
|
||||
{
|
||||
UINT FileName; // Offset to LPCSTR for file name
|
||||
UINT FileNameLen; // Length of file name
|
||||
UINT FileData; // Offset to LPCSTR of length FileLen
|
||||
UINT FileLen; // Length of file
|
||||
} D3D10_SHADER_DEBUG_FILE_INFO;
|
||||
|
||||
typedef struct _D3D10_SHADER_DEBUG_INFO
|
||||
{
|
||||
UINT Size; // sizeof(D3D10_SHADER_DEBUG_INFO)
|
||||
UINT Creator; // Offset to LPCSTR for compiler version
|
||||
UINT EntrypointName; // Offset to LPCSTR for Entry point name
|
||||
UINT ShaderTarget; // Offset to LPCSTR for shader target
|
||||
UINT CompileFlags; // flags used to compile
|
||||
UINT Files; // number of included files
|
||||
UINT FileInfo; // Offset to D3D10_SHADER_DEBUG_FILE_INFO[Files]
|
||||
UINT Instructions; // number of instructions
|
||||
UINT InstructionInfo; // Offset to D3D10_SHADER_DEBUG_INST_INFO[Instructions]
|
||||
UINT Variables; // number of variables
|
||||
UINT VariableInfo; // Offset to D3D10_SHADER_DEBUG_VAR_INFO[Variables]
|
||||
UINT InputVariables; // number of variables to initialize before running
|
||||
UINT InputVariableInfo; // Offset to D3D10_SHADER_DEBUG_INPUT_INFO[InputVariables]
|
||||
UINT Tokens; // number of tokens to initialize
|
||||
UINT TokenInfo; // Offset to D3D10_SHADER_DEBUG_TOKEN_INFO[Tokens]
|
||||
UINT Scopes; // number of scopes
|
||||
UINT ScopeInfo; // Offset to D3D10_SHADER_DEBUG_SCOPE_INFO[Scopes]
|
||||
UINT ScopeVariables; // number of variables declared
|
||||
UINT ScopeVariableInfo; // Offset to D3D10_SHADER_DEBUG_SCOPEVAR_INFO[Scopes]
|
||||
UINT UintOffset; // Offset to the UINT datastore, all UINT offsets are from this offset
|
||||
UINT StringOffset; // Offset to the string datastore, all string offsets are from this offset
|
||||
} D3D10_SHADER_DEBUG_INFO;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3D10ShaderReflection1:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Interface definitions
|
||||
//
|
||||
|
||||
typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1;
|
||||
typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1;
|
||||
|
||||
// {C3457783-A846-47CE-9520-CEA6F66E7447}
|
||||
DEFINE_GUID(IID_ID3D10ShaderReflection1,
|
||||
0xc3457783, 0xa846, 0x47ce, 0x95, 0x20, 0xce, 0xa6, 0xf6, 0x6e, 0x74, 0x47);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D10ShaderReflection1
|
||||
|
||||
DECLARE_INTERFACE_(ID3D10ShaderReflection1, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR Name, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetMovInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
STDMETHOD(GetMovcInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
STDMETHOD(GetConversionInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
STDMETHOD(GetBitwiseInstructionCount)(THIS_ UINT* pCount) PURE;
|
||||
|
||||
STDMETHOD(GetGSInputPrimitive)(THIS_ D3D10_PRIMITIVE* pPrim) PURE;
|
||||
STDMETHOD(IsLevel9Shader)(THIS_ BOOL* pbLevel9Shader) PURE;
|
||||
STDMETHOD(IsSampleFrequencyShader)(THIS_ BOOL* pbSampleFrequency) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3D10_1SHADER_H__
|
||||
|
1455
Include/D3D10effect.h
Normal file
1455
Include/D3D10effect.h
Normal file
File diff suppressed because it is too large
Load Diff
534
Include/D3D10shader.h
Normal file
534
Include/D3D10shader.h
Normal file
@ -0,0 +1,534 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: D3D10Shader.h
|
||||
// Content: D3D10 Shader Types and APIs
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3D10SHADER_H__
|
||||
#define __D3D10SHADER_H__
|
||||
|
||||
#include "d3d10.h"
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// D3D10_TX_VERSION:
|
||||
// --------------
|
||||
// Version token used to create a procedural texture filler in effects
|
||||
// Used by D3D10Fill[]TX functions
|
||||
//---------------------------------------------------------------------------
|
||||
#define D3D10_TX_VERSION(_Major,_Minor) (('T' << 24) | ('X' << 16) | ((_Major) << 8) | (_Minor))
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10SHADER flags:
|
||||
// -----------------
|
||||
// D3D10_SHADER_DEBUG
|
||||
// Insert debug file/line/type/symbol information.
|
||||
//
|
||||
// D3D10_SHADER_SKIP_VALIDATION
|
||||
// Do not validate the generated code against known capabilities and
|
||||
// constraints. This option is only recommended when compiling shaders
|
||||
// you KNOW will work. (ie. have compiled before without this option.)
|
||||
// Shaders are always validated by D3D before they are set to the device.
|
||||
//
|
||||
// D3D10_SHADER_SKIP_OPTIMIZATION
|
||||
// Instructs the compiler to skip optimization steps during code generation.
|
||||
// Unless you are trying to isolate a problem in your code using this option
|
||||
// is not recommended.
|
||||
//
|
||||
// D3D10_SHADER_PACK_MATRIX_ROW_MAJOR
|
||||
// Unless explicitly specified, matrices will be packed in row-major order
|
||||
// on input and output from the shader.
|
||||
//
|
||||
// D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR
|
||||
// Unless explicitly specified, matrices will be packed in column-major
|
||||
// order on input and output from the shader. This is generally more
|
||||
// efficient, since it allows vector-matrix multiplication to be performed
|
||||
// using a series of dot-products.
|
||||
//
|
||||
// D3D10_SHADER_PARTIAL_PRECISION
|
||||
// Force all computations in resulting shader to occur at partial precision.
|
||||
// This may result in faster evaluation of shaders on some hardware.
|
||||
//
|
||||
// D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT
|
||||
// Force compiler to compile against the next highest available software
|
||||
// target for vertex shaders. This flag also turns optimizations off,
|
||||
// and debugging on.
|
||||
//
|
||||
// D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT
|
||||
// Force compiler to compile against the next highest available software
|
||||
// target for pixel shaders. This flag also turns optimizations off,
|
||||
// and debugging on.
|
||||
//
|
||||
// D3D10_SHADER_NO_PRESHADER
|
||||
// Disables Preshaders. Using this flag will cause the compiler to not
|
||||
// pull out static expression for evaluation on the host cpu
|
||||
//
|
||||
// D3D10_SHADER_AVOID_FLOW_CONTROL
|
||||
// Hint compiler to avoid flow-control constructs where possible.
|
||||
//
|
||||
// D3D10_SHADER_PREFER_FLOW_CONTROL
|
||||
// Hint compiler to prefer flow-control constructs where possible.
|
||||
//
|
||||
// D3D10_SHADER_ENABLE_STRICTNESS
|
||||
// By default, the HLSL/Effect compilers are not strict on deprecated syntax.
|
||||
// Specifying this flag enables the strict mode. Deprecated syntax may be
|
||||
// removed in a future release, and enabling syntax is a good way to make sure
|
||||
// your shaders comply to the latest spec.
|
||||
//
|
||||
// D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY
|
||||
// This enables older shaders to compile to 4_0 targets.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define D3D10_SHADER_DEBUG (1 << 0)
|
||||
#define D3D10_SHADER_SKIP_VALIDATION (1 << 1)
|
||||
#define D3D10_SHADER_SKIP_OPTIMIZATION (1 << 2)
|
||||
#define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR (1 << 3)
|
||||
#define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR (1 << 4)
|
||||
#define D3D10_SHADER_PARTIAL_PRECISION (1 << 5)
|
||||
#define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT (1 << 6)
|
||||
#define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT (1 << 7)
|
||||
#define D3D10_SHADER_NO_PRESHADER (1 << 8)
|
||||
#define D3D10_SHADER_AVOID_FLOW_CONTROL (1 << 9)
|
||||
#define D3D10_SHADER_PREFER_FLOW_CONTROL (1 << 10)
|
||||
#define D3D10_SHADER_ENABLE_STRICTNESS (1 << 11)
|
||||
#define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12)
|
||||
#define D3D10_SHADER_IEEE_STRICTNESS (1 << 13)
|
||||
#define D3D10_SHADER_WARNINGS_ARE_ERRORS (1 << 18)
|
||||
|
||||
|
||||
// optimization level flags
|
||||
#define D3D10_SHADER_OPTIMIZATION_LEVEL0 (1 << 14)
|
||||
#define D3D10_SHADER_OPTIMIZATION_LEVEL1 0
|
||||
#define D3D10_SHADER_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15))
|
||||
#define D3D10_SHADER_OPTIMIZATION_LEVEL3 (1 << 15)
|
||||
|
||||
|
||||
|
||||
|
||||
typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO;
|
||||
typedef D3D10_SHADER_MACRO* LPD3D10_SHADER_MACRO;
|
||||
|
||||
|
||||
typedef D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS;
|
||||
typedef D3D10_SHADER_VARIABLE_CLASS* LPD3D10_SHADER_VARIABLE_CLASS;
|
||||
|
||||
typedef D3D_SHADER_VARIABLE_FLAGS D3D10_SHADER_VARIABLE_FLAGS;
|
||||
typedef D3D10_SHADER_VARIABLE_FLAGS* LPD3D10_SHADER_VARIABLE_FLAGS;
|
||||
|
||||
typedef D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE;
|
||||
typedef D3D10_SHADER_VARIABLE_TYPE* LPD3D10_SHADER_VARIABLE_TYPE;
|
||||
|
||||
typedef D3D_SHADER_INPUT_FLAGS D3D10_SHADER_INPUT_FLAGS;
|
||||
typedef D3D10_SHADER_INPUT_FLAGS* LPD3D10_SHADER_INPUT_FLAGS;
|
||||
|
||||
typedef D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE;
|
||||
typedef D3D10_SHADER_INPUT_TYPE* LPD3D10_SHADER_INPUT_TYPE;
|
||||
|
||||
typedef D3D_SHADER_CBUFFER_FLAGS D3D10_SHADER_CBUFFER_FLAGS;
|
||||
typedef D3D10_SHADER_CBUFFER_FLAGS* LPD3D10_SHADER_CBUFFER_FLAGS;
|
||||
|
||||
typedef D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE;
|
||||
typedef D3D10_CBUFFER_TYPE* LPD3D10_CBUFFER_TYPE;
|
||||
|
||||
typedef D3D_NAME D3D10_NAME;
|
||||
|
||||
typedef D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE;
|
||||
|
||||
typedef D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE;
|
||||
|
||||
typedef D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE;
|
||||
|
||||
// ID3D10Include has been made version-neutral and moved to d3dcommon.h.
|
||||
typedef interface ID3DInclude ID3D10Include;
|
||||
typedef interface ID3DInclude* LPD3D10INCLUDE;
|
||||
#define IID_ID3D10Include IID_ID3DInclude
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3D10ShaderReflection:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Structure definitions
|
||||
//
|
||||
|
||||
typedef struct _D3D10_SHADER_DESC
|
||||
{
|
||||
UINT Version; // Shader version
|
||||
LPCSTR Creator; // Creator string
|
||||
UINT Flags; // Shader compilation/parse flags
|
||||
|
||||
UINT ConstantBuffers; // Number of constant buffers
|
||||
UINT BoundResources; // Number of bound resources
|
||||
UINT InputParameters; // Number of parameters in the input signature
|
||||
UINT OutputParameters; // Number of parameters in the output signature
|
||||
|
||||
UINT InstructionCount; // Number of emitted instructions
|
||||
UINT TempRegisterCount; // Number of temporary registers used
|
||||
UINT TempArrayCount; // Number of temporary arrays used
|
||||
UINT DefCount; // Number of constant defines
|
||||
UINT DclCount; // Number of declarations (input + output)
|
||||
UINT TextureNormalInstructions; // Number of non-categorized texture instructions
|
||||
UINT TextureLoadInstructions; // Number of texture load instructions
|
||||
UINT TextureCompInstructions; // Number of texture comparison instructions
|
||||
UINT TextureBiasInstructions; // Number of texture bias instructions
|
||||
UINT TextureGradientInstructions; // Number of texture gradient instructions
|
||||
UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
|
||||
UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
|
||||
UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
|
||||
UINT StaticFlowControlCount; // Number of static flow control instructions used
|
||||
UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
|
||||
UINT MacroInstructionCount; // Number of macro instructions used
|
||||
UINT ArrayInstructionCount; // Number of array instructions used
|
||||
UINT CutInstructionCount; // Number of cut instructions used
|
||||
UINT EmitInstructionCount; // Number of emit instructions used
|
||||
D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology
|
||||
UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count
|
||||
} D3D10_SHADER_DESC;
|
||||
|
||||
typedef struct _D3D10_SHADER_BUFFER_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the constant buffer
|
||||
D3D10_CBUFFER_TYPE Type; // Indicates that this is a CBuffer or TBuffer
|
||||
UINT Variables; // Number of member variables
|
||||
UINT Size; // Size of CB (in bytes)
|
||||
UINT uFlags; // Buffer description flags
|
||||
} D3D10_SHADER_BUFFER_DESC;
|
||||
|
||||
typedef struct _D3D10_SHADER_VARIABLE_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the variable
|
||||
UINT StartOffset; // Offset in constant buffer's backing store
|
||||
UINT Size; // Size of variable (in bytes)
|
||||
UINT uFlags; // Variable flags
|
||||
LPVOID DefaultValue; // Raw pointer to default value
|
||||
} D3D10_SHADER_VARIABLE_DESC;
|
||||
|
||||
typedef struct _D3D10_SHADER_TYPE_DESC
|
||||
{
|
||||
D3D10_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.)
|
||||
D3D10_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.)
|
||||
UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable)
|
||||
UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable)
|
||||
UINT Elements; // Number of elements (0 if not an array)
|
||||
UINT Members; // Number of members (0 if not a structure)
|
||||
UINT Offset; // Offset from the start of structure (0 if not a structure member)
|
||||
} D3D10_SHADER_TYPE_DESC;
|
||||
|
||||
typedef struct _D3D10_SHADER_INPUT_BIND_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the resource
|
||||
D3D10_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.)
|
||||
UINT BindPoint; // Starting bind point
|
||||
UINT BindCount; // Number of contiguous bind points (for arrays)
|
||||
|
||||
UINT uFlags; // Input binding flags
|
||||
D3D10_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture)
|
||||
D3D10_SRV_DIMENSION Dimension; // Dimension (if texture)
|
||||
UINT NumSamples; // Number of samples (0 if not MS texture)
|
||||
} D3D10_SHADER_INPUT_BIND_DESC;
|
||||
|
||||
typedef struct _D3D10_SIGNATURE_PARAMETER_DESC
|
||||
{
|
||||
LPCSTR SemanticName; // Name of the semantic
|
||||
UINT SemanticIndex; // Index of the semantic
|
||||
UINT Register; // Number of member variables
|
||||
D3D10_NAME SystemValueType;// A predefined system value, or D3D10_NAME_UNDEFINED if not applicable
|
||||
D3D10_REGISTER_COMPONENT_TYPE ComponentType;// Scalar type (e.g. uint, float, etc.)
|
||||
BYTE Mask; // Mask to indicate which components of the register
|
||||
// are used (combination of D3D10_COMPONENT_MASK values)
|
||||
BYTE ReadWriteMask; // Mask to indicate whether a given component is
|
||||
// never written (if this is an output signature) or
|
||||
// always read (if this is an input signature).
|
||||
// (combination of D3D10_COMPONENT_MASK values)
|
||||
|
||||
} D3D10_SIGNATURE_PARAMETER_DESC;
|
||||
|
||||
|
||||
//
|
||||
// Interface definitions
|
||||
//
|
||||
|
||||
typedef interface ID3D10ShaderReflectionType ID3D10ShaderReflectionType;
|
||||
typedef interface ID3D10ShaderReflectionType *LPD3D10SHADERREFLECTIONTYPE;
|
||||
|
||||
// {C530AD7D-9B16-4395-A979-BA2ECFF83ADD}
|
||||
DEFINE_GUID(IID_ID3D10ShaderReflectionType,
|
||||
0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D10ShaderReflectionType
|
||||
|
||||
DECLARE_INTERFACE(ID3D10ShaderReflectionType)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_TYPE_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D10ShaderReflectionType*, GetMemberTypeByName)(THIS_ LPCSTR Name) PURE;
|
||||
STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ UINT Index) PURE;
|
||||
};
|
||||
|
||||
typedef interface ID3D10ShaderReflectionVariable ID3D10ShaderReflectionVariable;
|
||||
typedef interface ID3D10ShaderReflectionVariable *LPD3D10SHADERREFLECTIONVARIABLE;
|
||||
|
||||
// {1BF63C95-2650-405d-99C1-3636BD1DA0A1}
|
||||
DEFINE_GUID(IID_ID3D10ShaderReflectionVariable,
|
||||
0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D10ShaderReflectionVariable
|
||||
|
||||
DECLARE_INTERFACE(ID3D10ShaderReflectionVariable)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_VARIABLE_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionType*, GetType)(THIS) PURE;
|
||||
};
|
||||
|
||||
typedef interface ID3D10ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer;
|
||||
typedef interface ID3D10ShaderReflectionConstantBuffer *LPD3D10SHADERREFLECTIONCONSTANTBUFFER;
|
||||
|
||||
// {66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0}
|
||||
DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer,
|
||||
0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D10ShaderReflectionConstantBuffer
|
||||
|
||||
DECLARE_INTERFACE(ID3D10ShaderReflectionConstantBuffer)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_BUFFER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
|
||||
};
|
||||
|
||||
typedef interface ID3D10ShaderReflection ID3D10ShaderReflection;
|
||||
typedef interface ID3D10ShaderReflection *LPD3D10SHADERREFLECTION;
|
||||
|
||||
// {D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA}
|
||||
DEFINE_GUID(IID_ID3D10ShaderReflection,
|
||||
0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D10ShaderReflection
|
||||
|
||||
DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10CompileShader:
|
||||
// ------------------
|
||||
// Compiles a shader.
|
||||
//
|
||||
// Parameters:
|
||||
// pSrcFile
|
||||
// Source file name.
|
||||
// hSrcModule
|
||||
// Module handle. if NULL, current module will be used.
|
||||
// pSrcResource
|
||||
// Resource name in module.
|
||||
// pSrcData
|
||||
// Pointer to source code.
|
||||
// SrcDataLen
|
||||
// Size of source code, in bytes.
|
||||
// pDefines
|
||||
// Optional NULL-terminated array of preprocessor macro definitions.
|
||||
// pInclude
|
||||
// Optional interface pointer to use for handling #include directives.
|
||||
// If this parameter is NULL, #includes will be honored when compiling
|
||||
// from file, and will error when compiling from resource or memory.
|
||||
// pFunctionName
|
||||
// Name of the entrypoint function where execution should begin.
|
||||
// pProfile
|
||||
// Instruction set to be used when generating code. The D3D10 entry
|
||||
// point currently supports only "vs_4_0", "ps_4_0", and "gs_4_0".
|
||||
// Flags
|
||||
// See D3D10_SHADER_xxx flags.
|
||||
// ppShader
|
||||
// Returns a buffer containing the created shader. This buffer contains
|
||||
// the compiled shader code, as well as any embedded debug and symbol
|
||||
// table info. (See D3D10GetShaderConstantTable)
|
||||
// ppErrorMsgs
|
||||
// Returns a buffer containing a listing of errors and warnings that were
|
||||
// encountered during the compile. If you are running in a debugger,
|
||||
// these are the same messages you will see in your debug output.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI D3D10CompileShader(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude,
|
||||
LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10DisassembleShader:
|
||||
// ----------------------
|
||||
// Takes a binary shader, and returns a buffer containing text assembly.
|
||||
//
|
||||
// Parameters:
|
||||
// pShader
|
||||
// Pointer to the shader byte code.
|
||||
// BytecodeLength
|
||||
// Size of the shader byte code in bytes.
|
||||
// EnableColorCode
|
||||
// Emit HTML tags for color coding the output?
|
||||
// pComments
|
||||
// Pointer to a comment string to include at the top of the shader.
|
||||
// ppDisassembly
|
||||
// Returns a buffer containing the disassembled shader.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI D3D10DisassembleShader(CONST void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, LPCSTR pComments, ID3D10Blob** ppDisassembly);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10GetPixelShaderProfile/D3D10GetVertexShaderProfile/D3D10GetGeometryShaderProfile:
|
||||
// -----------------------------------------------------
|
||||
// Returns the name of the HLSL profile best suited to a given device.
|
||||
//
|
||||
// Parameters:
|
||||
// pDevice
|
||||
// Pointer to the device in question
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LPCSTR WINAPI D3D10GetPixelShaderProfile(ID3D10Device *pDevice);
|
||||
|
||||
LPCSTR WINAPI D3D10GetVertexShaderProfile(ID3D10Device *pDevice);
|
||||
|
||||
LPCSTR WINAPI D3D10GetGeometryShaderProfile(ID3D10Device *pDevice);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10ReflectShader:
|
||||
// ------------------
|
||||
// Creates a shader reflection object that can be used to retrieve information
|
||||
// about a compiled shader
|
||||
//
|
||||
// Parameters:
|
||||
// pShaderBytecode
|
||||
// Pointer to a compiled shader (same pointer that is passed into
|
||||
// ID3D10Device::CreateShader)
|
||||
// BytecodeLength
|
||||
// Length of the shader bytecode buffer
|
||||
// ppReflector
|
||||
// [out] Returns a ID3D10ShaderReflection object that can be used to
|
||||
// retrieve shader resource and constant buffer information
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI D3D10ReflectShader(CONST void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10ShaderReflection **ppReflector);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10PreprocessShader
|
||||
// ---------------------
|
||||
// Creates a shader reflection object that can be used to retrieve information
|
||||
// about a compiled shader
|
||||
//
|
||||
// Parameters:
|
||||
// pSrcData
|
||||
// Pointer to source code
|
||||
// SrcDataLen
|
||||
// Size of source code, in bytes
|
||||
// pFileName
|
||||
// Source file name (used for error output)
|
||||
// pDefines
|
||||
// Optional NULL-terminated array of preprocessor macro definitions.
|
||||
// pInclude
|
||||
// Optional interface pointer to use for handling #include directives.
|
||||
// If this parameter is NULL, #includes will be honored when assembling
|
||||
// from file, and will error when assembling from resource or memory.
|
||||
// ppShaderText
|
||||
// Returns a buffer containing a single large string that represents
|
||||
// the resulting formatted token stream
|
||||
// ppErrorMsgs
|
||||
// Returns a buffer containing a listing of errors and warnings that were
|
||||
// encountered during assembly. If you are running in a debugger,
|
||||
// these are the same messages you will see in your debug output.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI D3D10PreprocessShader(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, CONST D3D10_SHADER_MACRO* pDefines,
|
||||
LPD3D10INCLUDE pInclude, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Shader blob manipulation routines
|
||||
// ---------------------------------
|
||||
//
|
||||
// void *pShaderBytecode - a buffer containing the result of an HLSL
|
||||
// compilation. Typically this opaque buffer contains several
|
||||
// discrete sections including the shader executable code, the input
|
||||
// signature, and the output signature. This can typically be retrieved
|
||||
// by calling ID3D10Blob::GetBufferPointer() on the returned blob
|
||||
// from HLSL's compile APIs.
|
||||
//
|
||||
// UINT BytecodeLength - the length of pShaderBytecode. This can
|
||||
// typically be retrieved by calling ID3D10Blob::GetBufferSize()
|
||||
// on the returned blob from HLSL's compile APIs.
|
||||
//
|
||||
// ID3D10Blob **ppSignatureBlob(s) - a newly created buffer that
|
||||
// contains only the signature portions of the original bytecode.
|
||||
// This is a copy; the original bytecode is not modified. You may
|
||||
// specify NULL for this parameter to have the bytecode validated
|
||||
// for the presence of the corresponding signatures without actually
|
||||
// copying them and creating a new blob.
|
||||
//
|
||||
// Returns E_INVALIDARG if any required parameters are NULL
|
||||
// Returns E_FAIL is the bytecode is corrupt or missing signatures
|
||||
// Returns S_OK on success
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HRESULT WINAPI D3D10GetInputSignatureBlob(CONST void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob);
|
||||
HRESULT WINAPI D3D10GetOutputSignatureBlob(CONST void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob);
|
||||
HRESULT WINAPI D3D10GetInputAndOutputSignatureBlob(CONST void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D10GetShaderDebugInfo:
|
||||
// -----------------------
|
||||
// Gets shader debug info. Debug info is generated by D3D10CompileShader and is
|
||||
// embedded in the body of the shader.
|
||||
//
|
||||
// Parameters:
|
||||
// pShaderBytecode
|
||||
// Pointer to the function bytecode
|
||||
// BytecodeLength
|
||||
// Length of the shader bytecode buffer
|
||||
// ppDebugInfo
|
||||
// Buffer used to return debug info. For information about the layout
|
||||
// of this buffer, see definition of D3D10_SHADER_DEBUG_INFO above.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI D3D10GetShaderDebugInfo(CONST void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob** ppDebugInfo);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3D10SHADER_H__
|
||||
|
10227
Include/D3D11.h
Normal file
10227
Include/D3D11.h
Normal file
File diff suppressed because it is too large
Load Diff
1669
Include/D3D11SDKLayers.h
Normal file
1669
Include/D3D11SDKLayers.h
Normal file
File diff suppressed because it is too large
Load Diff
296
Include/D3D11Shader.h
Normal file
296
Include/D3D11Shader.h
Normal file
@ -0,0 +1,296 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: D3D11Shader.h
|
||||
// Content: D3D11 Shader Types and APIs
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3D11SHADER_H__
|
||||
#define __D3D11SHADER_H__
|
||||
|
||||
#include "d3dcommon.h"
|
||||
|
||||
|
||||
typedef enum D3D11_SHADER_VERSION_TYPE
|
||||
{
|
||||
D3D11_SHVER_PIXEL_SHADER = 0,
|
||||
D3D11_SHVER_VERTEX_SHADER = 1,
|
||||
D3D11_SHVER_GEOMETRY_SHADER = 2,
|
||||
|
||||
// D3D11 Shaders
|
||||
D3D11_SHVER_HULL_SHADER = 3,
|
||||
D3D11_SHVER_DOMAIN_SHADER = 4,
|
||||
D3D11_SHVER_COMPUTE_SHADER = 5,
|
||||
} D3D11_SHADER_VERSION_TYPE;
|
||||
|
||||
#define D3D11_SHVER_GET_TYPE(_Version) \
|
||||
(((_Version) >> 16) & 0xffff)
|
||||
#define D3D11_SHVER_GET_MAJOR(_Version) \
|
||||
(((_Version) >> 4) & 0xf)
|
||||
#define D3D11_SHVER_GET_MINOR(_Version) \
|
||||
(((_Version) >> 0) & 0xf)
|
||||
|
||||
typedef D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE;
|
||||
|
||||
typedef D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE;
|
||||
|
||||
|
||||
typedef struct _D3D11_SIGNATURE_PARAMETER_DESC
|
||||
{
|
||||
LPCSTR SemanticName; // Name of the semantic
|
||||
UINT SemanticIndex; // Index of the semantic
|
||||
UINT Register; // Number of member variables
|
||||
D3D_NAME SystemValueType;// A predefined system value, or D3D_NAME_UNDEFINED if not applicable
|
||||
D3D_REGISTER_COMPONENT_TYPE ComponentType;// Scalar type (e.g. uint, float, etc.)
|
||||
BYTE Mask; // Mask to indicate which components of the register
|
||||
// are used (combination of D3D10_COMPONENT_MASK values)
|
||||
BYTE ReadWriteMask; // Mask to indicate whether a given component is
|
||||
// never written (if this is an output signature) or
|
||||
// always read (if this is an input signature).
|
||||
// (combination of D3D10_COMPONENT_MASK values)
|
||||
UINT Stream; // Stream index
|
||||
} D3D11_SIGNATURE_PARAMETER_DESC;
|
||||
|
||||
typedef struct _D3D11_SHADER_BUFFER_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the constant buffer
|
||||
D3D_CBUFFER_TYPE Type; // Indicates type of buffer content
|
||||
UINT Variables; // Number of member variables
|
||||
UINT Size; // Size of CB (in bytes)
|
||||
UINT uFlags; // Buffer description flags
|
||||
} D3D11_SHADER_BUFFER_DESC;
|
||||
|
||||
typedef struct _D3D11_SHADER_VARIABLE_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the variable
|
||||
UINT StartOffset; // Offset in constant buffer's backing store
|
||||
UINT Size; // Size of variable (in bytes)
|
||||
UINT uFlags; // Variable flags
|
||||
LPVOID DefaultValue; // Raw pointer to default value
|
||||
UINT StartTexture; // First texture index (or -1 if no textures used)
|
||||
UINT TextureSize; // Number of texture slots possibly used.
|
||||
UINT StartSampler; // First sampler index (or -1 if no textures used)
|
||||
UINT SamplerSize; // Number of sampler slots possibly used.
|
||||
} D3D11_SHADER_VARIABLE_DESC;
|
||||
|
||||
typedef struct _D3D11_SHADER_TYPE_DESC
|
||||
{
|
||||
D3D_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.)
|
||||
D3D_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.)
|
||||
UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable)
|
||||
UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable)
|
||||
UINT Elements; // Number of elements (0 if not an array)
|
||||
UINT Members; // Number of members (0 if not a structure)
|
||||
UINT Offset; // Offset from the start of structure (0 if not a structure member)
|
||||
LPCSTR Name; // Name of type, can be NULL
|
||||
} D3D11_SHADER_TYPE_DESC;
|
||||
|
||||
typedef D3D_TESSELLATOR_DOMAIN D3D11_TESSELLATOR_DOMAIN;
|
||||
|
||||
typedef D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING;
|
||||
|
||||
typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE;
|
||||
|
||||
typedef struct _D3D11_SHADER_DESC
|
||||
{
|
||||
UINT Version; // Shader version
|
||||
LPCSTR Creator; // Creator string
|
||||
UINT Flags; // Shader compilation/parse flags
|
||||
|
||||
UINT ConstantBuffers; // Number of constant buffers
|
||||
UINT BoundResources; // Number of bound resources
|
||||
UINT InputParameters; // Number of parameters in the input signature
|
||||
UINT OutputParameters; // Number of parameters in the output signature
|
||||
|
||||
UINT InstructionCount; // Number of emitted instructions
|
||||
UINT TempRegisterCount; // Number of temporary registers used
|
||||
UINT TempArrayCount; // Number of temporary arrays used
|
||||
UINT DefCount; // Number of constant defines
|
||||
UINT DclCount; // Number of declarations (input + output)
|
||||
UINT TextureNormalInstructions; // Number of non-categorized texture instructions
|
||||
UINT TextureLoadInstructions; // Number of texture load instructions
|
||||
UINT TextureCompInstructions; // Number of texture comparison instructions
|
||||
UINT TextureBiasInstructions; // Number of texture bias instructions
|
||||
UINT TextureGradientInstructions; // Number of texture gradient instructions
|
||||
UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
|
||||
UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
|
||||
UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
|
||||
UINT StaticFlowControlCount; // Number of static flow control instructions used
|
||||
UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
|
||||
UINT MacroInstructionCount; // Number of macro instructions used
|
||||
UINT ArrayInstructionCount; // Number of array instructions used
|
||||
UINT CutInstructionCount; // Number of cut instructions used
|
||||
UINT EmitInstructionCount; // Number of emit instructions used
|
||||
D3D_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology
|
||||
UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count
|
||||
D3D_PRIMITIVE InputPrimitive; // GS/HS input primitive
|
||||
UINT PatchConstantParameters; // Number of parameters in the patch constant signature
|
||||
UINT cGSInstanceCount; // Number of Geometry shader instances
|
||||
UINT cControlPoints; // Number of control points in the HS->DS stage
|
||||
D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive; // Primitive output by the tessellator
|
||||
D3D_TESSELLATOR_PARTITIONING HSPartitioning; // Partitioning mode of the tessellator
|
||||
D3D_TESSELLATOR_DOMAIN TessellatorDomain; // Domain of the tessellator (quad, tri, isoline)
|
||||
// instruction counts
|
||||
UINT cBarrierInstructions; // Number of barrier instructions in a compute shader
|
||||
UINT cInterlockedInstructions; // Number of interlocked instructions
|
||||
UINT cTextureStoreInstructions; // Number of texture writes
|
||||
} D3D11_SHADER_DESC;
|
||||
|
||||
typedef struct _D3D11_SHADER_INPUT_BIND_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the resource
|
||||
D3D_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.)
|
||||
UINT BindPoint; // Starting bind point
|
||||
UINT BindCount; // Number of contiguous bind points (for arrays)
|
||||
|
||||
UINT uFlags; // Input binding flags
|
||||
D3D_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture)
|
||||
D3D_SRV_DIMENSION Dimension; // Dimension (if texture)
|
||||
UINT NumSamples; // Number of samples (0 if not MS texture)
|
||||
} D3D11_SHADER_INPUT_BIND_DESC;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Interfaces ////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3D11ShaderReflectionType ID3D11ShaderReflectionType;
|
||||
typedef interface ID3D11ShaderReflectionType *LPD3D11SHADERREFLECTIONTYPE;
|
||||
|
||||
typedef interface ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable;
|
||||
typedef interface ID3D11ShaderReflectionVariable *LPD3D11SHADERREFLECTIONVARIABLE;
|
||||
|
||||
typedef interface ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer;
|
||||
typedef interface ID3D11ShaderReflectionConstantBuffer *LPD3D11SHADERREFLECTIONCONSTANTBUFFER;
|
||||
|
||||
typedef interface ID3D11ShaderReflection ID3D11ShaderReflection;
|
||||
typedef interface ID3D11ShaderReflection *LPD3D11SHADERREFLECTION;
|
||||
|
||||
// {6E6FFA6A-9BAE-4613-A51E-91652D508C21}
|
||||
DEFINE_GUID(IID_ID3D11ShaderReflectionType,
|
||||
0x6e6ffa6a, 0x9bae, 0x4613, 0xa5, 0x1e, 0x91, 0x65, 0x2d, 0x50, 0x8c, 0x21);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D11ShaderReflectionType
|
||||
|
||||
DECLARE_INTERFACE(ID3D11ShaderReflectionType)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ __out D3D11_SHADER_TYPE_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D11ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ __in UINT Index) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionType*, GetMemberTypeByName)(THIS_ __in LPCSTR Name) PURE;
|
||||
STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ __in UINT Index) PURE;
|
||||
|
||||
STDMETHOD(IsEqual)(THIS_ __in ID3D11ShaderReflectionType* pType) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionType*, GetSubType)(THIS) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionType*, GetBaseClass)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionType*, GetInterfaceByIndex)(THIS_ __in UINT uIndex) PURE;
|
||||
STDMETHOD(IsOfType)(THIS_ __in ID3D11ShaderReflectionType* pType) PURE;
|
||||
STDMETHOD(ImplementsInterface)(THIS_ __in ID3D11ShaderReflectionType* pBase) PURE;
|
||||
};
|
||||
|
||||
// {51F23923-F3E5-4BD1-91CB-606177D8DB4C}
|
||||
DEFINE_GUID(IID_ID3D11ShaderReflectionVariable,
|
||||
0x51f23923, 0xf3e5, 0x4bd1, 0x91, 0xcb, 0x60, 0x61, 0x77, 0xd8, 0xdb, 0x4c);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D11ShaderReflectionVariable
|
||||
|
||||
DECLARE_INTERFACE(ID3D11ShaderReflectionVariable)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ __out D3D11_SHADER_VARIABLE_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D11ShaderReflectionType*, GetType)(THIS) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionConstantBuffer*, GetBuffer)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ __in UINT uArrayIndex) PURE;
|
||||
};
|
||||
|
||||
// {EB62D63D-93DD-4318-8AE8-C6F83AD371B8}
|
||||
DEFINE_GUID(IID_ID3D11ShaderReflectionConstantBuffer,
|
||||
0xeb62d63d, 0x93dd, 0x4318, 0x8a, 0xe8, 0xc6, 0xf8, 0x3a, 0xd3, 0x71, 0xb8);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D11ShaderReflectionConstantBuffer
|
||||
|
||||
DECLARE_INTERFACE(ID3D11ShaderReflectionConstantBuffer)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_BUFFER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D11ShaderReflectionVariable*, GetVariableByIndex)(THIS_ __in UINT Index) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionVariable*, GetVariableByName)(THIS_ __in LPCSTR Name) PURE;
|
||||
};
|
||||
|
||||
// The ID3D11ShaderReflection IID may change from SDK version to SDK version
|
||||
// if the reflection API changes. This prevents new code with the new API
|
||||
// from working with an old binary. Recompiling with the new header
|
||||
// will pick up the new IID.
|
||||
|
||||
// 0a233719-3960-4578-9d7c-203b8b1d9cc1
|
||||
DEFINE_GUID(IID_ID3D11ShaderReflection,
|
||||
0x0a233719, 0x3960, 0x4578, 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D11ShaderReflection
|
||||
|
||||
DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)(THIS_ __in REFIID iid,
|
||||
__out LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetDesc)(THIS_ __out D3D11_SHADER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D11ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ __in UINT Index) PURE;
|
||||
STDMETHOD_(ID3D11ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ __in LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDesc)(THIS_ __in UINT ResourceIndex,
|
||||
__out D3D11_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetInputParameterDesc)(THIS_ __in UINT ParameterIndex,
|
||||
__out D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetOutputParameterDesc)(THIS_ __in UINT ParameterIndex,
|
||||
__out D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetPatchConstantParameterDesc)(THIS_ __in UINT ParameterIndex,
|
||||
__out D3D11_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D11ShaderReflectionVariable*, GetVariableByName)(THIS_ __in LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDescByName)(THIS_ __in LPCSTR Name,
|
||||
__out D3D11_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
|
||||
STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
|
||||
STDMETHOD(GetMinFeatureLevel)(THIS_ __out enum D3D_FEATURE_LEVEL* pLevel) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetThreadGroupSize)(THIS_
|
||||
__out_opt UINT* pSizeX,
|
||||
__out_opt UINT* pSizeY,
|
||||
__out_opt UINT* pSizeZ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3D11SHADER_H__
|
||||
|
787
Include/D3Dcommon.h
Normal file
787
Include/D3Dcommon.h
Normal file
@ -0,0 +1,787 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 7.00.0555 */
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
|
||||
/* verify that the <rpcndr.h> version is high enough to compile this file*/
|
||||
#ifndef __REQUIRED_RPCNDR_H_VERSION__
|
||||
#define __REQUIRED_RPCNDR_H_VERSION__ 475
|
||||
#endif
|
||||
|
||||
/* verify that the <rpcsal.h> version is high enough to compile this file*/
|
||||
#ifndef __REQUIRED_RPCSAL_H_VERSION__
|
||||
#define __REQUIRED_RPCSAL_H_VERSION__ 100
|
||||
#endif
|
||||
|
||||
#include "rpc.h"
|
||||
#include "rpcndr.h"
|
||||
|
||||
#ifndef __RPCNDR_H_VERSION__
|
||||
#error this stub requires an updated version of <rpcndr.h>
|
||||
#endif // __RPCNDR_H_VERSION__
|
||||
|
||||
#ifndef COM_NO_WINDOWS_H
|
||||
#include "windows.h"
|
||||
#include "ole2.h"
|
||||
#endif /*COM_NO_WINDOWS_H*/
|
||||
|
||||
#ifndef __d3dcommon_h__
|
||||
#define __d3dcommon_h__
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
#ifndef __ID3D10Blob_FWD_DEFINED__
|
||||
#define __ID3D10Blob_FWD_DEFINED__
|
||||
typedef interface ID3D10Blob ID3D10Blob;
|
||||
#endif /* __ID3D10Blob_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "oaidl.h"
|
||||
#include "ocidl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dcommon_0000_0000 */
|
||||
/* [local] */
|
||||
|
||||
typedef
|
||||
enum D3D_DRIVER_TYPE
|
||||
{ D3D_DRIVER_TYPE_UNKNOWN = 0,
|
||||
D3D_DRIVER_TYPE_HARDWARE = ( D3D_DRIVER_TYPE_UNKNOWN + 1 ) ,
|
||||
D3D_DRIVER_TYPE_REFERENCE = ( D3D_DRIVER_TYPE_HARDWARE + 1 ) ,
|
||||
D3D_DRIVER_TYPE_NULL = ( D3D_DRIVER_TYPE_REFERENCE + 1 ) ,
|
||||
D3D_DRIVER_TYPE_SOFTWARE = ( D3D_DRIVER_TYPE_NULL + 1 ) ,
|
||||
D3D_DRIVER_TYPE_WARP = ( D3D_DRIVER_TYPE_SOFTWARE + 1 )
|
||||
} D3D_DRIVER_TYPE;
|
||||
|
||||
typedef
|
||||
enum D3D_FEATURE_LEVEL
|
||||
{ D3D_FEATURE_LEVEL_9_1 = 0x9100,
|
||||
D3D_FEATURE_LEVEL_9_2 = 0x9200,
|
||||
D3D_FEATURE_LEVEL_9_3 = 0x9300,
|
||||
D3D_FEATURE_LEVEL_10_0 = 0xa000,
|
||||
D3D_FEATURE_LEVEL_10_1 = 0xa100,
|
||||
D3D_FEATURE_LEVEL_11_0 = 0xb000
|
||||
} D3D_FEATURE_LEVEL;
|
||||
|
||||
typedef
|
||||
enum D3D_PRIMITIVE_TOPOLOGY
|
||||
{ D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
|
||||
D3D_PRIMITIVE_TOPOLOGY_POINTLIST = 1,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINELIST = 2,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13,
|
||||
D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33,
|
||||
D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = 34,
|
||||
D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = 35,
|
||||
D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = 36,
|
||||
D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = 37,
|
||||
D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = 38,
|
||||
D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = 39,
|
||||
D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = 40,
|
||||
D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = 41,
|
||||
D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = 42,
|
||||
D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = 43,
|
||||
D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = 44,
|
||||
D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = 45,
|
||||
D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = 46,
|
||||
D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = 47,
|
||||
D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = 48,
|
||||
D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = 49,
|
||||
D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = 50,
|
||||
D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = 51,
|
||||
D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = 52,
|
||||
D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = 53,
|
||||
D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = 54,
|
||||
D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = 55,
|
||||
D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = 56,
|
||||
D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = 57,
|
||||
D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = 58,
|
||||
D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = 59,
|
||||
D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = 60,
|
||||
D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = 61,
|
||||
D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = 62,
|
||||
D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = 63,
|
||||
D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = 64,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST
|
||||
} D3D_PRIMITIVE_TOPOLOGY;
|
||||
|
||||
typedef
|
||||
enum D3D_PRIMITIVE
|
||||
{ D3D_PRIMITIVE_UNDEFINED = 0,
|
||||
D3D_PRIMITIVE_POINT = 1,
|
||||
D3D_PRIMITIVE_LINE = 2,
|
||||
D3D_PRIMITIVE_TRIANGLE = 3,
|
||||
D3D_PRIMITIVE_LINE_ADJ = 6,
|
||||
D3D_PRIMITIVE_TRIANGLE_ADJ = 7,
|
||||
D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8,
|
||||
D3D_PRIMITIVE_2_CONTROL_POINT_PATCH = 9,
|
||||
D3D_PRIMITIVE_3_CONTROL_POINT_PATCH = 10,
|
||||
D3D_PRIMITIVE_4_CONTROL_POINT_PATCH = 11,
|
||||
D3D_PRIMITIVE_5_CONTROL_POINT_PATCH = 12,
|
||||
D3D_PRIMITIVE_6_CONTROL_POINT_PATCH = 13,
|
||||
D3D_PRIMITIVE_7_CONTROL_POINT_PATCH = 14,
|
||||
D3D_PRIMITIVE_8_CONTROL_POINT_PATCH = 15,
|
||||
D3D_PRIMITIVE_9_CONTROL_POINT_PATCH = 16,
|
||||
D3D_PRIMITIVE_10_CONTROL_POINT_PATCH = 17,
|
||||
D3D_PRIMITIVE_11_CONTROL_POINT_PATCH = 18,
|
||||
D3D_PRIMITIVE_12_CONTROL_POINT_PATCH = 19,
|
||||
D3D_PRIMITIVE_13_CONTROL_POINT_PATCH = 20,
|
||||
D3D_PRIMITIVE_14_CONTROL_POINT_PATCH = 21,
|
||||
D3D_PRIMITIVE_15_CONTROL_POINT_PATCH = 22,
|
||||
D3D_PRIMITIVE_16_CONTROL_POINT_PATCH = 23,
|
||||
D3D_PRIMITIVE_17_CONTROL_POINT_PATCH = 24,
|
||||
D3D_PRIMITIVE_18_CONTROL_POINT_PATCH = 25,
|
||||
D3D_PRIMITIVE_19_CONTROL_POINT_PATCH = 26,
|
||||
D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 28,
|
||||
D3D_PRIMITIVE_21_CONTROL_POINT_PATCH = 29,
|
||||
D3D_PRIMITIVE_22_CONTROL_POINT_PATCH = 30,
|
||||
D3D_PRIMITIVE_23_CONTROL_POINT_PATCH = 31,
|
||||
D3D_PRIMITIVE_24_CONTROL_POINT_PATCH = 32,
|
||||
D3D_PRIMITIVE_25_CONTROL_POINT_PATCH = 33,
|
||||
D3D_PRIMITIVE_26_CONTROL_POINT_PATCH = 34,
|
||||
D3D_PRIMITIVE_27_CONTROL_POINT_PATCH = 35,
|
||||
D3D_PRIMITIVE_28_CONTROL_POINT_PATCH = 36,
|
||||
D3D_PRIMITIVE_29_CONTROL_POINT_PATCH = 37,
|
||||
D3D_PRIMITIVE_30_CONTROL_POINT_PATCH = 38,
|
||||
D3D_PRIMITIVE_31_CONTROL_POINT_PATCH = 39,
|
||||
D3D_PRIMITIVE_32_CONTROL_POINT_PATCH = 40,
|
||||
D3D10_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED,
|
||||
D3D10_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT,
|
||||
D3D10_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE,
|
||||
D3D10_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE,
|
||||
D3D10_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ,
|
||||
D3D10_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ,
|
||||
D3D11_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED,
|
||||
D3D11_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT,
|
||||
D3D11_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE,
|
||||
D3D11_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE,
|
||||
D3D11_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ,
|
||||
D3D11_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ,
|
||||
D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH = D3D_PRIMITIVE_1_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH = D3D_PRIMITIVE_2_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH = D3D_PRIMITIVE_3_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH = D3D_PRIMITIVE_4_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH = D3D_PRIMITIVE_5_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH = D3D_PRIMITIVE_6_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH = D3D_PRIMITIVE_7_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH = D3D_PRIMITIVE_8_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH = D3D_PRIMITIVE_9_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH = D3D_PRIMITIVE_10_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH = D3D_PRIMITIVE_11_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH = D3D_PRIMITIVE_12_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH = D3D_PRIMITIVE_13_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH = D3D_PRIMITIVE_14_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH = D3D_PRIMITIVE_15_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH = D3D_PRIMITIVE_16_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH = D3D_PRIMITIVE_17_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH = D3D_PRIMITIVE_18_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH = D3D_PRIMITIVE_19_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH = D3D_PRIMITIVE_20_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH = D3D_PRIMITIVE_21_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH = D3D_PRIMITIVE_22_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH = D3D_PRIMITIVE_23_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH = D3D_PRIMITIVE_24_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH = D3D_PRIMITIVE_25_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH = D3D_PRIMITIVE_26_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH = D3D_PRIMITIVE_27_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH = D3D_PRIMITIVE_28_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH = D3D_PRIMITIVE_29_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH = D3D_PRIMITIVE_30_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH = D3D_PRIMITIVE_31_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH = D3D_PRIMITIVE_32_CONTROL_POINT_PATCH
|
||||
} D3D_PRIMITIVE;
|
||||
|
||||
typedef
|
||||
enum D3D_SRV_DIMENSION
|
||||
{ D3D_SRV_DIMENSION_UNKNOWN = 0,
|
||||
D3D_SRV_DIMENSION_BUFFER = 1,
|
||||
D3D_SRV_DIMENSION_TEXTURE1D = 2,
|
||||
D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3,
|
||||
D3D_SRV_DIMENSION_TEXTURE2D = 4,
|
||||
D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5,
|
||||
D3D_SRV_DIMENSION_TEXTURE2DMS = 6,
|
||||
D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7,
|
||||
D3D_SRV_DIMENSION_TEXTURE3D = 8,
|
||||
D3D_SRV_DIMENSION_TEXTURECUBE = 9,
|
||||
D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10,
|
||||
D3D_SRV_DIMENSION_BUFFEREX = 11,
|
||||
D3D10_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN,
|
||||
D3D10_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER,
|
||||
D3D10_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D,
|
||||
D3D10_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
|
||||
D3D10_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D,
|
||||
D3D10_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE,
|
||||
D3D10_1_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN,
|
||||
D3D10_1_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY,
|
||||
D3D11_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN,
|
||||
D3D11_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER,
|
||||
D3D11_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D,
|
||||
D3D11_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
|
||||
D3D11_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D,
|
||||
D3D11_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE,
|
||||
D3D11_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY,
|
||||
D3D11_SRV_DIMENSION_BUFFEREX = D3D_SRV_DIMENSION_BUFFEREX
|
||||
} D3D_SRV_DIMENSION;
|
||||
|
||||
typedef struct _D3D_SHADER_MACRO
|
||||
{
|
||||
LPCSTR Name;
|
||||
LPCSTR Definition;
|
||||
} D3D_SHADER_MACRO;
|
||||
|
||||
typedef struct _D3D_SHADER_MACRO *LPD3D_SHADER_MACRO;
|
||||
|
||||
DEFINE_GUID(IID_ID3D10Blob, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3D10Blob_INTERFACE_DEFINED__
|
||||
#define __ID3D10Blob_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D10Blob */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D10Blob;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("8BA5FB08-5195-40e2-AC58-0D989C3A0102")
|
||||
ID3D10Blob : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual LPVOID STDMETHODCALLTYPE GetBufferPointer( void) = 0;
|
||||
|
||||
virtual SIZE_T STDMETHODCALLTYPE GetBufferSize( void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D10BlobVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D10Blob * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [annotation][iid_is][out] */
|
||||
__RPC__deref_out void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
LPVOID ( STDMETHODCALLTYPE *GetBufferPointer )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
SIZE_T ( STDMETHODCALLTYPE *GetBufferSize )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D10BlobVtbl;
|
||||
|
||||
interface ID3D10Blob
|
||||
{
|
||||
CONST_VTBL struct ID3D10BlobVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D10Blob_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D10Blob_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D10Blob_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D10Blob_GetBufferPointer(This) \
|
||||
( (This)->lpVtbl -> GetBufferPointer(This) )
|
||||
|
||||
#define ID3D10Blob_GetBufferSize(This) \
|
||||
( (This)->lpVtbl -> GetBufferSize(This) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D10Blob_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dcommon_0000_0001 */
|
||||
/* [local] */
|
||||
|
||||
typedef interface ID3D10Blob* LPD3D10BLOB;
|
||||
typedef ID3D10Blob ID3DBlob;
|
||||
typedef ID3DBlob* LPD3DBLOB;
|
||||
#define IID_ID3DBlob IID_ID3D10Blob
|
||||
typedef
|
||||
enum _D3D_INCLUDE_TYPE
|
||||
{ D3D_INCLUDE_LOCAL = 0,
|
||||
D3D_INCLUDE_SYSTEM = ( D3D_INCLUDE_LOCAL + 1 ) ,
|
||||
D3D10_INCLUDE_LOCAL = D3D_INCLUDE_LOCAL,
|
||||
D3D10_INCLUDE_SYSTEM = D3D_INCLUDE_SYSTEM,
|
||||
D3D_INCLUDE_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_INCLUDE_TYPE;
|
||||
|
||||
typedef interface ID3DInclude ID3DInclude;
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DInclude
|
||||
DECLARE_INTERFACE(ID3DInclude)
|
||||
{
|
||||
STDMETHOD(Open)(THIS_ D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes) PURE;
|
||||
STDMETHOD(Close)(THIS_ LPCVOID pData) PURE;
|
||||
};
|
||||
typedef ID3DInclude* LPD3DINCLUDE;
|
||||
typedef
|
||||
enum _D3D_SHADER_VARIABLE_CLASS
|
||||
{ D3D_SVC_SCALAR = 0,
|
||||
D3D_SVC_VECTOR = ( D3D_SVC_SCALAR + 1 ) ,
|
||||
D3D_SVC_MATRIX_ROWS = ( D3D_SVC_VECTOR + 1 ) ,
|
||||
D3D_SVC_MATRIX_COLUMNS = ( D3D_SVC_MATRIX_ROWS + 1 ) ,
|
||||
D3D_SVC_OBJECT = ( D3D_SVC_MATRIX_COLUMNS + 1 ) ,
|
||||
D3D_SVC_STRUCT = ( D3D_SVC_OBJECT + 1 ) ,
|
||||
D3D_SVC_INTERFACE_CLASS = ( D3D_SVC_STRUCT + 1 ) ,
|
||||
D3D_SVC_INTERFACE_POINTER = ( D3D_SVC_INTERFACE_CLASS + 1 ) ,
|
||||
D3D10_SVC_SCALAR = D3D_SVC_SCALAR,
|
||||
D3D10_SVC_VECTOR = D3D_SVC_VECTOR,
|
||||
D3D10_SVC_MATRIX_ROWS = D3D_SVC_MATRIX_ROWS,
|
||||
D3D10_SVC_MATRIX_COLUMNS = D3D_SVC_MATRIX_COLUMNS,
|
||||
D3D10_SVC_OBJECT = D3D_SVC_OBJECT,
|
||||
D3D10_SVC_STRUCT = D3D_SVC_STRUCT,
|
||||
D3D11_SVC_INTERFACE_CLASS = D3D_SVC_INTERFACE_CLASS,
|
||||
D3D11_SVC_INTERFACE_POINTER = D3D_SVC_INTERFACE_POINTER,
|
||||
D3D_SVC_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_VARIABLE_CLASS;
|
||||
|
||||
typedef
|
||||
enum _D3D_SHADER_VARIABLE_FLAGS
|
||||
{ D3D_SVF_USERPACKED = 1,
|
||||
D3D_SVF_USED = 2,
|
||||
D3D_SVF_INTERFACE_POINTER = 4,
|
||||
D3D_SVF_INTERFACE_PARAMETER = 8,
|
||||
D3D10_SVF_USERPACKED = D3D_SVF_USERPACKED,
|
||||
D3D10_SVF_USED = D3D_SVF_USED,
|
||||
D3D11_SVF_INTERFACE_POINTER = D3D_SVF_INTERFACE_POINTER,
|
||||
D3D11_SVF_INTERFACE_PARAMETER = D3D_SVF_INTERFACE_PARAMETER,
|
||||
D3D_SVF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_VARIABLE_FLAGS;
|
||||
|
||||
typedef
|
||||
enum _D3D_SHADER_VARIABLE_TYPE
|
||||
{ D3D_SVT_VOID = 0,
|
||||
D3D_SVT_BOOL = 1,
|
||||
D3D_SVT_INT = 2,
|
||||
D3D_SVT_FLOAT = 3,
|
||||
D3D_SVT_STRING = 4,
|
||||
D3D_SVT_TEXTURE = 5,
|
||||
D3D_SVT_TEXTURE1D = 6,
|
||||
D3D_SVT_TEXTURE2D = 7,
|
||||
D3D_SVT_TEXTURE3D = 8,
|
||||
D3D_SVT_TEXTURECUBE = 9,
|
||||
D3D_SVT_SAMPLER = 10,
|
||||
D3D_SVT_SAMPLER1D = 11,
|
||||
D3D_SVT_SAMPLER2D = 12,
|
||||
D3D_SVT_SAMPLER3D = 13,
|
||||
D3D_SVT_SAMPLERCUBE = 14,
|
||||
D3D_SVT_PIXELSHADER = 15,
|
||||
D3D_SVT_VERTEXSHADER = 16,
|
||||
D3D_SVT_PIXELFRAGMENT = 17,
|
||||
D3D_SVT_VERTEXFRAGMENT = 18,
|
||||
D3D_SVT_UINT = 19,
|
||||
D3D_SVT_UINT8 = 20,
|
||||
D3D_SVT_GEOMETRYSHADER = 21,
|
||||
D3D_SVT_RASTERIZER = 22,
|
||||
D3D_SVT_DEPTHSTENCIL = 23,
|
||||
D3D_SVT_BLEND = 24,
|
||||
D3D_SVT_BUFFER = 25,
|
||||
D3D_SVT_CBUFFER = 26,
|
||||
D3D_SVT_TBUFFER = 27,
|
||||
D3D_SVT_TEXTURE1DARRAY = 28,
|
||||
D3D_SVT_TEXTURE2DARRAY = 29,
|
||||
D3D_SVT_RENDERTARGETVIEW = 30,
|
||||
D3D_SVT_DEPTHSTENCILVIEW = 31,
|
||||
D3D_SVT_TEXTURE2DMS = 32,
|
||||
D3D_SVT_TEXTURE2DMSARRAY = 33,
|
||||
D3D_SVT_TEXTURECUBEARRAY = 34,
|
||||
D3D_SVT_HULLSHADER = 35,
|
||||
D3D_SVT_DOMAINSHADER = 36,
|
||||
D3D_SVT_INTERFACE_POINTER = 37,
|
||||
D3D_SVT_COMPUTESHADER = 38,
|
||||
D3D_SVT_DOUBLE = 39,
|
||||
D3D_SVT_RWTEXTURE1D = 40,
|
||||
D3D_SVT_RWTEXTURE1DARRAY = 41,
|
||||
D3D_SVT_RWTEXTURE2D = 42,
|
||||
D3D_SVT_RWTEXTURE2DARRAY = 43,
|
||||
D3D_SVT_RWTEXTURE3D = 44,
|
||||
D3D_SVT_RWBUFFER = 45,
|
||||
D3D_SVT_BYTEADDRESS_BUFFER = 46,
|
||||
D3D_SVT_RWBYTEADDRESS_BUFFER = 47,
|
||||
D3D_SVT_STRUCTURED_BUFFER = 48,
|
||||
D3D_SVT_RWSTRUCTURED_BUFFER = 49,
|
||||
D3D_SVT_APPEND_STRUCTURED_BUFFER = 50,
|
||||
D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51,
|
||||
D3D10_SVT_VOID = D3D_SVT_VOID,
|
||||
D3D10_SVT_BOOL = D3D_SVT_BOOL,
|
||||
D3D10_SVT_INT = D3D_SVT_INT,
|
||||
D3D10_SVT_FLOAT = D3D_SVT_FLOAT,
|
||||
D3D10_SVT_STRING = D3D_SVT_STRING,
|
||||
D3D10_SVT_TEXTURE = D3D_SVT_TEXTURE,
|
||||
D3D10_SVT_TEXTURE1D = D3D_SVT_TEXTURE1D,
|
||||
D3D10_SVT_TEXTURE2D = D3D_SVT_TEXTURE2D,
|
||||
D3D10_SVT_TEXTURE3D = D3D_SVT_TEXTURE3D,
|
||||
D3D10_SVT_TEXTURECUBE = D3D_SVT_TEXTURECUBE,
|
||||
D3D10_SVT_SAMPLER = D3D_SVT_SAMPLER,
|
||||
D3D10_SVT_SAMPLER1D = D3D_SVT_SAMPLER1D,
|
||||
D3D10_SVT_SAMPLER2D = D3D_SVT_SAMPLER2D,
|
||||
D3D10_SVT_SAMPLER3D = D3D_SVT_SAMPLER3D,
|
||||
D3D10_SVT_SAMPLERCUBE = D3D_SVT_SAMPLERCUBE,
|
||||
D3D10_SVT_PIXELSHADER = D3D_SVT_PIXELSHADER,
|
||||
D3D10_SVT_VERTEXSHADER = D3D_SVT_VERTEXSHADER,
|
||||
D3D10_SVT_PIXELFRAGMENT = D3D_SVT_PIXELFRAGMENT,
|
||||
D3D10_SVT_VERTEXFRAGMENT = D3D_SVT_VERTEXFRAGMENT,
|
||||
D3D10_SVT_UINT = D3D_SVT_UINT,
|
||||
D3D10_SVT_UINT8 = D3D_SVT_UINT8,
|
||||
D3D10_SVT_GEOMETRYSHADER = D3D_SVT_GEOMETRYSHADER,
|
||||
D3D10_SVT_RASTERIZER = D3D_SVT_RASTERIZER,
|
||||
D3D10_SVT_DEPTHSTENCIL = D3D_SVT_DEPTHSTENCIL,
|
||||
D3D10_SVT_BLEND = D3D_SVT_BLEND,
|
||||
D3D10_SVT_BUFFER = D3D_SVT_BUFFER,
|
||||
D3D10_SVT_CBUFFER = D3D_SVT_CBUFFER,
|
||||
D3D10_SVT_TBUFFER = D3D_SVT_TBUFFER,
|
||||
D3D10_SVT_TEXTURE1DARRAY = D3D_SVT_TEXTURE1DARRAY,
|
||||
D3D10_SVT_TEXTURE2DARRAY = D3D_SVT_TEXTURE2DARRAY,
|
||||
D3D10_SVT_RENDERTARGETVIEW = D3D_SVT_RENDERTARGETVIEW,
|
||||
D3D10_SVT_DEPTHSTENCILVIEW = D3D_SVT_DEPTHSTENCILVIEW,
|
||||
D3D10_SVT_TEXTURE2DMS = D3D_SVT_TEXTURE2DMS,
|
||||
D3D10_SVT_TEXTURE2DMSARRAY = D3D_SVT_TEXTURE2DMSARRAY,
|
||||
D3D10_SVT_TEXTURECUBEARRAY = D3D_SVT_TEXTURECUBEARRAY,
|
||||
D3D11_SVT_HULLSHADER = D3D_SVT_HULLSHADER,
|
||||
D3D11_SVT_DOMAINSHADER = D3D_SVT_DOMAINSHADER,
|
||||
D3D11_SVT_INTERFACE_POINTER = D3D_SVT_INTERFACE_POINTER,
|
||||
D3D11_SVT_COMPUTESHADER = D3D_SVT_COMPUTESHADER,
|
||||
D3D11_SVT_DOUBLE = D3D_SVT_DOUBLE,
|
||||
D3D11_SVT_RWTEXTURE1D = D3D_SVT_RWTEXTURE1D,
|
||||
D3D11_SVT_RWTEXTURE1DARRAY = D3D_SVT_RWTEXTURE1DARRAY,
|
||||
D3D11_SVT_RWTEXTURE2D = D3D_SVT_RWTEXTURE2D,
|
||||
D3D11_SVT_RWTEXTURE2DARRAY = D3D_SVT_RWTEXTURE2DARRAY,
|
||||
D3D11_SVT_RWTEXTURE3D = D3D_SVT_RWTEXTURE3D,
|
||||
D3D11_SVT_RWBUFFER = D3D_SVT_RWBUFFER,
|
||||
D3D11_SVT_BYTEADDRESS_BUFFER = D3D_SVT_BYTEADDRESS_BUFFER,
|
||||
D3D11_SVT_RWBYTEADDRESS_BUFFER = D3D_SVT_RWBYTEADDRESS_BUFFER,
|
||||
D3D11_SVT_STRUCTURED_BUFFER = D3D_SVT_STRUCTURED_BUFFER,
|
||||
D3D11_SVT_RWSTRUCTURED_BUFFER = D3D_SVT_RWSTRUCTURED_BUFFER,
|
||||
D3D11_SVT_APPEND_STRUCTURED_BUFFER = D3D_SVT_APPEND_STRUCTURED_BUFFER,
|
||||
D3D11_SVT_CONSUME_STRUCTURED_BUFFER = D3D_SVT_CONSUME_STRUCTURED_BUFFER,
|
||||
D3D_SVT_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_VARIABLE_TYPE;
|
||||
|
||||
typedef
|
||||
enum _D3D_SHADER_INPUT_FLAGS
|
||||
{ D3D_SIF_USERPACKED = 1,
|
||||
D3D_SIF_COMPARISON_SAMPLER = 2,
|
||||
D3D_SIF_TEXTURE_COMPONENT_0 = 4,
|
||||
D3D_SIF_TEXTURE_COMPONENT_1 = 8,
|
||||
D3D_SIF_TEXTURE_COMPONENTS = 12,
|
||||
D3D10_SIF_USERPACKED = D3D_SIF_USERPACKED,
|
||||
D3D10_SIF_COMPARISON_SAMPLER = D3D_SIF_COMPARISON_SAMPLER,
|
||||
D3D10_SIF_TEXTURE_COMPONENT_0 = D3D_SIF_TEXTURE_COMPONENT_0,
|
||||
D3D10_SIF_TEXTURE_COMPONENT_1 = D3D_SIF_TEXTURE_COMPONENT_1,
|
||||
D3D10_SIF_TEXTURE_COMPONENTS = D3D_SIF_TEXTURE_COMPONENTS,
|
||||
D3D_SIF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_INPUT_FLAGS;
|
||||
|
||||
typedef
|
||||
enum _D3D_SHADER_INPUT_TYPE
|
||||
{ D3D_SIT_CBUFFER = 0,
|
||||
D3D_SIT_TBUFFER = ( D3D_SIT_CBUFFER + 1 ) ,
|
||||
D3D_SIT_TEXTURE = ( D3D_SIT_TBUFFER + 1 ) ,
|
||||
D3D_SIT_SAMPLER = ( D3D_SIT_TEXTURE + 1 ) ,
|
||||
D3D_SIT_UAV_RWTYPED = ( D3D_SIT_SAMPLER + 1 ) ,
|
||||
D3D_SIT_STRUCTURED = ( D3D_SIT_UAV_RWTYPED + 1 ) ,
|
||||
D3D_SIT_UAV_RWSTRUCTURED = ( D3D_SIT_STRUCTURED + 1 ) ,
|
||||
D3D_SIT_BYTEADDRESS = ( D3D_SIT_UAV_RWSTRUCTURED + 1 ) ,
|
||||
D3D_SIT_UAV_RWBYTEADDRESS = ( D3D_SIT_BYTEADDRESS + 1 ) ,
|
||||
D3D_SIT_UAV_APPEND_STRUCTURED = ( D3D_SIT_UAV_RWBYTEADDRESS + 1 ) ,
|
||||
D3D_SIT_UAV_CONSUME_STRUCTURED = ( D3D_SIT_UAV_APPEND_STRUCTURED + 1 ) ,
|
||||
D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = ( D3D_SIT_UAV_CONSUME_STRUCTURED + 1 ) ,
|
||||
D3D10_SIT_CBUFFER = D3D_SIT_CBUFFER,
|
||||
D3D10_SIT_TBUFFER = D3D_SIT_TBUFFER,
|
||||
D3D10_SIT_TEXTURE = D3D_SIT_TEXTURE,
|
||||
D3D10_SIT_SAMPLER = D3D_SIT_SAMPLER,
|
||||
D3D11_SIT_UAV_RWTYPED = D3D_SIT_UAV_RWTYPED,
|
||||
D3D11_SIT_STRUCTURED = D3D_SIT_STRUCTURED,
|
||||
D3D11_SIT_UAV_RWSTRUCTURED = D3D_SIT_UAV_RWSTRUCTURED,
|
||||
D3D11_SIT_BYTEADDRESS = D3D_SIT_BYTEADDRESS,
|
||||
D3D11_SIT_UAV_RWBYTEADDRESS = D3D_SIT_UAV_RWBYTEADDRESS,
|
||||
D3D11_SIT_UAV_APPEND_STRUCTURED = D3D_SIT_UAV_APPEND_STRUCTURED,
|
||||
D3D11_SIT_UAV_CONSUME_STRUCTURED = D3D_SIT_UAV_CONSUME_STRUCTURED,
|
||||
D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER
|
||||
} D3D_SHADER_INPUT_TYPE;
|
||||
|
||||
typedef
|
||||
enum _D3D_SHADER_CBUFFER_FLAGS
|
||||
{ D3D_CBF_USERPACKED = 1,
|
||||
D3D10_CBF_USERPACKED = D3D_CBF_USERPACKED,
|
||||
D3D_CBF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_CBUFFER_FLAGS;
|
||||
|
||||
typedef
|
||||
enum _D3D_CBUFFER_TYPE
|
||||
{ D3D_CT_CBUFFER = 0,
|
||||
D3D_CT_TBUFFER = ( D3D_CT_CBUFFER + 1 ) ,
|
||||
D3D_CT_INTERFACE_POINTERS = ( D3D_CT_TBUFFER + 1 ) ,
|
||||
D3D_CT_RESOURCE_BIND_INFO = ( D3D_CT_INTERFACE_POINTERS + 1 ) ,
|
||||
D3D10_CT_CBUFFER = D3D_CT_CBUFFER,
|
||||
D3D10_CT_TBUFFER = D3D_CT_TBUFFER,
|
||||
D3D11_CT_CBUFFER = D3D_CT_CBUFFER,
|
||||
D3D11_CT_TBUFFER = D3D_CT_TBUFFER,
|
||||
D3D11_CT_INTERFACE_POINTERS = D3D_CT_INTERFACE_POINTERS,
|
||||
D3D11_CT_RESOURCE_BIND_INFO = D3D_CT_RESOURCE_BIND_INFO
|
||||
} D3D_CBUFFER_TYPE;
|
||||
|
||||
typedef
|
||||
enum D3D_NAME
|
||||
{ D3D_NAME_UNDEFINED = 0,
|
||||
D3D_NAME_POSITION = 1,
|
||||
D3D_NAME_CLIP_DISTANCE = 2,
|
||||
D3D_NAME_CULL_DISTANCE = 3,
|
||||
D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4,
|
||||
D3D_NAME_VIEWPORT_ARRAY_INDEX = 5,
|
||||
D3D_NAME_VERTEX_ID = 6,
|
||||
D3D_NAME_PRIMITIVE_ID = 7,
|
||||
D3D_NAME_INSTANCE_ID = 8,
|
||||
D3D_NAME_IS_FRONT_FACE = 9,
|
||||
D3D_NAME_SAMPLE_INDEX = 10,
|
||||
D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11,
|
||||
D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12,
|
||||
D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13,
|
||||
D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14,
|
||||
D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15,
|
||||
D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16,
|
||||
D3D_NAME_TARGET = 64,
|
||||
D3D_NAME_DEPTH = 65,
|
||||
D3D_NAME_COVERAGE = 66,
|
||||
D3D_NAME_DEPTH_GREATER_EQUAL = 67,
|
||||
D3D_NAME_DEPTH_LESS_EQUAL = 68,
|
||||
D3D10_NAME_UNDEFINED = D3D_NAME_UNDEFINED,
|
||||
D3D10_NAME_POSITION = D3D_NAME_POSITION,
|
||||
D3D10_NAME_CLIP_DISTANCE = D3D_NAME_CLIP_DISTANCE,
|
||||
D3D10_NAME_CULL_DISTANCE = D3D_NAME_CULL_DISTANCE,
|
||||
D3D10_NAME_RENDER_TARGET_ARRAY_INDEX = D3D_NAME_RENDER_TARGET_ARRAY_INDEX,
|
||||
D3D10_NAME_VIEWPORT_ARRAY_INDEX = D3D_NAME_VIEWPORT_ARRAY_INDEX,
|
||||
D3D10_NAME_VERTEX_ID = D3D_NAME_VERTEX_ID,
|
||||
D3D10_NAME_PRIMITIVE_ID = D3D_NAME_PRIMITIVE_ID,
|
||||
D3D10_NAME_INSTANCE_ID = D3D_NAME_INSTANCE_ID,
|
||||
D3D10_NAME_IS_FRONT_FACE = D3D_NAME_IS_FRONT_FACE,
|
||||
D3D10_NAME_SAMPLE_INDEX = D3D_NAME_SAMPLE_INDEX,
|
||||
D3D10_NAME_TARGET = D3D_NAME_TARGET,
|
||||
D3D10_NAME_DEPTH = D3D_NAME_DEPTH,
|
||||
D3D10_NAME_COVERAGE = D3D_NAME_COVERAGE,
|
||||
D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR,
|
||||
D3D11_NAME_DEPTH_GREATER_EQUAL = D3D_NAME_DEPTH_GREATER_EQUAL,
|
||||
D3D11_NAME_DEPTH_LESS_EQUAL = D3D_NAME_DEPTH_LESS_EQUAL
|
||||
} D3D_NAME;
|
||||
|
||||
typedef
|
||||
enum D3D_RESOURCE_RETURN_TYPE
|
||||
{ D3D_RETURN_TYPE_UNORM = 1,
|
||||
D3D_RETURN_TYPE_SNORM = 2,
|
||||
D3D_RETURN_TYPE_SINT = 3,
|
||||
D3D_RETURN_TYPE_UINT = 4,
|
||||
D3D_RETURN_TYPE_FLOAT = 5,
|
||||
D3D_RETURN_TYPE_MIXED = 6,
|
||||
D3D_RETURN_TYPE_DOUBLE = 7,
|
||||
D3D_RETURN_TYPE_CONTINUED = 8,
|
||||
D3D10_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM,
|
||||
D3D10_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM,
|
||||
D3D10_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT,
|
||||
D3D10_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT,
|
||||
D3D10_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT,
|
||||
D3D10_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED,
|
||||
D3D11_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM,
|
||||
D3D11_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM,
|
||||
D3D11_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT,
|
||||
D3D11_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT,
|
||||
D3D11_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT,
|
||||
D3D11_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED,
|
||||
D3D11_RETURN_TYPE_DOUBLE = D3D_RETURN_TYPE_DOUBLE,
|
||||
D3D11_RETURN_TYPE_CONTINUED = D3D_RETURN_TYPE_CONTINUED
|
||||
} D3D_RESOURCE_RETURN_TYPE;
|
||||
|
||||
typedef
|
||||
enum D3D_REGISTER_COMPONENT_TYPE
|
||||
{ D3D_REGISTER_COMPONENT_UNKNOWN = 0,
|
||||
D3D_REGISTER_COMPONENT_UINT32 = 1,
|
||||
D3D_REGISTER_COMPONENT_SINT32 = 2,
|
||||
D3D_REGISTER_COMPONENT_FLOAT32 = 3,
|
||||
D3D10_REGISTER_COMPONENT_UNKNOWN = D3D_REGISTER_COMPONENT_UNKNOWN,
|
||||
D3D10_REGISTER_COMPONENT_UINT32 = D3D_REGISTER_COMPONENT_UINT32,
|
||||
D3D10_REGISTER_COMPONENT_SINT32 = D3D_REGISTER_COMPONENT_SINT32,
|
||||
D3D10_REGISTER_COMPONENT_FLOAT32 = D3D_REGISTER_COMPONENT_FLOAT32
|
||||
} D3D_REGISTER_COMPONENT_TYPE;
|
||||
|
||||
typedef
|
||||
enum D3D_TESSELLATOR_DOMAIN
|
||||
{ D3D_TESSELLATOR_DOMAIN_UNDEFINED = 0,
|
||||
D3D_TESSELLATOR_DOMAIN_ISOLINE = 1,
|
||||
D3D_TESSELLATOR_DOMAIN_TRI = 2,
|
||||
D3D_TESSELLATOR_DOMAIN_QUAD = 3,
|
||||
D3D11_TESSELLATOR_DOMAIN_UNDEFINED = D3D_TESSELLATOR_DOMAIN_UNDEFINED,
|
||||
D3D11_TESSELLATOR_DOMAIN_ISOLINE = D3D_TESSELLATOR_DOMAIN_ISOLINE,
|
||||
D3D11_TESSELLATOR_DOMAIN_TRI = D3D_TESSELLATOR_DOMAIN_TRI,
|
||||
D3D11_TESSELLATOR_DOMAIN_QUAD = D3D_TESSELLATOR_DOMAIN_QUAD
|
||||
} D3D_TESSELLATOR_DOMAIN;
|
||||
|
||||
typedef
|
||||
enum D3D_TESSELLATOR_PARTITIONING
|
||||
{ D3D_TESSELLATOR_PARTITIONING_UNDEFINED = 0,
|
||||
D3D_TESSELLATOR_PARTITIONING_INTEGER = 1,
|
||||
D3D_TESSELLATOR_PARTITIONING_POW2 = 2,
|
||||
D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = 3,
|
||||
D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = 4,
|
||||
D3D11_TESSELLATOR_PARTITIONING_UNDEFINED = D3D_TESSELLATOR_PARTITIONING_UNDEFINED,
|
||||
D3D11_TESSELLATOR_PARTITIONING_INTEGER = D3D_TESSELLATOR_PARTITIONING_INTEGER,
|
||||
D3D11_TESSELLATOR_PARTITIONING_POW2 = D3D_TESSELLATOR_PARTITIONING_POW2,
|
||||
D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD,
|
||||
D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN
|
||||
} D3D_TESSELLATOR_PARTITIONING;
|
||||
|
||||
typedef
|
||||
enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE
|
||||
{ D3D_TESSELLATOR_OUTPUT_UNDEFINED = 0,
|
||||
D3D_TESSELLATOR_OUTPUT_POINT = 1,
|
||||
D3D_TESSELLATOR_OUTPUT_LINE = 2,
|
||||
D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW = 3,
|
||||
D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW = 4,
|
||||
D3D11_TESSELLATOR_OUTPUT_UNDEFINED = D3D_TESSELLATOR_OUTPUT_UNDEFINED,
|
||||
D3D11_TESSELLATOR_OUTPUT_POINT = D3D_TESSELLATOR_OUTPUT_POINT,
|
||||
D3D11_TESSELLATOR_OUTPUT_LINE = D3D_TESSELLATOR_OUTPUT_LINE,
|
||||
D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW,
|
||||
D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW
|
||||
} D3D_TESSELLATOR_OUTPUT_PRIMITIVE;
|
||||
|
||||
DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec;
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
143
Include/d3d10misc.h
Normal file
143
Include/d3d10misc.h
Normal file
@ -0,0 +1,143 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: D3D10Misc.h
|
||||
// Content: D3D10 Device Creation APIs
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3D10MISC_H__
|
||||
#define __D3D10MISC_H__
|
||||
|
||||
#include "d3d10.h"
|
||||
|
||||
// ID3D10Blob has been made version-neutral and moved to d3dcommon.h.
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3D10_DRIVER_TYPE
|
||||
// ----------------
|
||||
//
|
||||
// This identifier is used to determine the implementation of Direct3D10
|
||||
// to be used.
|
||||
//
|
||||
// Pass one of these values to D3D10CreateDevice
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
typedef enum D3D10_DRIVER_TYPE
|
||||
{
|
||||
D3D10_DRIVER_TYPE_HARDWARE = 0,
|
||||
D3D10_DRIVER_TYPE_REFERENCE = 1,
|
||||
D3D10_DRIVER_TYPE_NULL = 2,
|
||||
D3D10_DRIVER_TYPE_SOFTWARE = 3,
|
||||
D3D10_DRIVER_TYPE_WARP = 5,
|
||||
} D3D10_DRIVER_TYPE;
|
||||
|
||||
DEFINE_GUID(GUID_DeviceType,
|
||||
0xd722fb4d, 0x7a68, 0x437a, 0xb2, 0x0c, 0x58, 0x04, 0xee, 0x24, 0x94, 0xa6);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3D10CreateDevice
|
||||
// ------------------
|
||||
//
|
||||
// pAdapter
|
||||
// If NULL, D3D10CreateDevice will choose the primary adapter and
|
||||
// create a new instance from a temporarily created IDXGIFactory.
|
||||
// If non-NULL, D3D10CreateDevice will register the appropriate
|
||||
// device, if necessary (via IDXGIAdapter::RegisterDrver), before
|
||||
// creating the device.
|
||||
// DriverType
|
||||
// Specifies the driver type to be created: hardware, reference or
|
||||
// null.
|
||||
// Software
|
||||
// HMODULE of a DLL implementing a software rasterizer. Must be NULL for
|
||||
// non-Software driver types.
|
||||
// Flags
|
||||
// Any of those documented for D3D10CreateDevice.
|
||||
// SDKVersion
|
||||
// SDK version. Use the D3D10_SDK_VERSION macro.
|
||||
// ppDevice
|
||||
// Pointer to returned interface.
|
||||
//
|
||||
// Return Values
|
||||
// Any of those documented for
|
||||
// CreateDXGIFactory
|
||||
// IDXGIFactory::EnumAdapters
|
||||
// IDXGIAdapter::RegisterDriver
|
||||
// D3D10CreateDevice
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
HRESULT WINAPI D3D10CreateDevice(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
UINT SDKVersion,
|
||||
ID3D10Device **ppDevice);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3D10CreateDeviceAndSwapChain
|
||||
// ------------------------------
|
||||
//
|
||||
// ppAdapter
|
||||
// If NULL, D3D10CreateDevice will choose the primary adapter and
|
||||
// create a new instance from a temporarily created IDXGIFactory.
|
||||
// If non-NULL, D3D10CreateDevice will register the appropriate
|
||||
// device, if necessary (via IDXGIAdapter::RegisterDrver), before
|
||||
// creating the device.
|
||||
// DriverType
|
||||
// Specifies the driver type to be created: hardware, reference or
|
||||
// null.
|
||||
// Software
|
||||
// HMODULE of a DLL implementing a software rasterizer. Must be NULL for
|
||||
// non-Software driver types.
|
||||
// Flags
|
||||
// Any of those documented for D3D10CreateDevice.
|
||||
// SDKVersion
|
||||
// SDK version. Use the D3D10_SDK_VERSION macro.
|
||||
// pSwapChainDesc
|
||||
// Swap chain description, may be NULL.
|
||||
// ppSwapChain
|
||||
// Pointer to returned interface. May be NULL.
|
||||
// ppDevice
|
||||
// Pointer to returned interface.
|
||||
//
|
||||
// Return Values
|
||||
// Any of those documented for
|
||||
// CreateDXGIFactory
|
||||
// IDXGIFactory::EnumAdapters
|
||||
// IDXGIAdapter::RegisterDriver
|
||||
// D3D10CreateDevice
|
||||
// IDXGIFactory::CreateSwapChain
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
HRESULT WINAPI D3D10CreateDeviceAndSwapChain(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
UINT SDKVersion,
|
||||
DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D10Device **ppDevice);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3D10CreateBlob:
|
||||
// -----------------
|
||||
// Creates a Buffer of n Bytes
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HRESULT WINAPI D3D10CreateBlob(SIZE_T NumBytes, LPD3D10BLOB *ppBuffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3D10EFFECT_H__
|
||||
|
||||
|
1361
Include/d3d10sdklayers.h
Normal file
1361
Include/d3d10sdklayers.h
Normal file
File diff suppressed because it is too large
Load Diff
1279
Include/d3d8.txt
Normal file
1279
Include/d3d8.txt
Normal file
File diff suppressed because it is too large
Load Diff
1870
Include/d3d9.txt
Normal file
1870
Include/d3d9.txt
Normal file
File diff suppressed because it is too large
Load Diff
185
Include/dxdiag.h
Normal file
185
Include/dxdiag.h
Normal file
@ -0,0 +1,185 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dxdiag.h
|
||||
* Content: DirectX Diagnostic Tool include file
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _DXDIAG_H_
|
||||
#define _DXDIAG_H_
|
||||
|
||||
#include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
|
||||
|
||||
// This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an
|
||||
// application was built against the correct header files. This number is
|
||||
// incremented whenever a header (or other) change would require applications
|
||||
// to be rebuilt. If the version doesn't match, IDxDiagProvider::Initialize will fail.
|
||||
// (The number itself has no meaning.)
|
||||
#define DXDIAG_DX9_SDK_VERSION 111
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Errors
|
||||
*
|
||||
****************************************************************************/
|
||||
#define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag CLSIDs
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// {A65B8071-3BFE-4213-9A5B-491DA4461CA7}
|
||||
DEFINE_GUID(CLSID_DxDiagProvider,
|
||||
0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Interface IIDs
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// {9C6B4CB0-23F8-49CC-A3ED-45A55000A6D2}
|
||||
DEFINE_GUID(IID_IDxDiagProvider,
|
||||
0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2);
|
||||
|
||||
// {0x7D0F462F-0x4064-0x4862-BC7F-933E5058C10F}
|
||||
DEFINE_GUID(IID_IDxDiagContainer,
|
||||
0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Interface Pointer definitions
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
|
||||
|
||||
typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Structures
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _DXDIAG_INIT_PARAMS
|
||||
{
|
||||
DWORD dwSize; // Size of this structure.
|
||||
DWORD dwDxDiagHeaderVersion; // Pass in DXDIAG_DX9_SDK_VERSION. This verifies
|
||||
// the header and dll are correctly matched.
|
||||
BOOL bAllowWHQLChecks; // If true, allow dxdiag to check if drivers are
|
||||
// digital signed as logo'd by WHQL which may
|
||||
// connect via internet to update WHQL certificates.
|
||||
VOID* pReserved; // Reserved. Must be NULL.
|
||||
} DXDIAG_INIT_PARAMS;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Application Interfaces
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// COM definition for IDxDiagProvider
|
||||
//
|
||||
#undef INTERFACE // External COM Implementation
|
||||
#define INTERFACE IDxDiagProvider
|
||||
DECLARE_INTERFACE_(IDxDiagProvider,IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*** IDxDiagProvider methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ DXDIAG_INIT_PARAMS* pParams) PURE;
|
||||
STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// COM definition for IDxDiagContainer
|
||||
//
|
||||
#undef INTERFACE // External COM Implementation
|
||||
#define INTERFACE IDxDiagContainer
|
||||
DECLARE_INTERFACE_(IDxDiagContainer,IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*** IDxDiagContainer methods ***/
|
||||
STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE;
|
||||
STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
|
||||
STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE;
|
||||
STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE;
|
||||
STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
|
||||
STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE;
|
||||
};
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag application interface macros
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
#define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
|
||||
#define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
|
||||
|
||||
#define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a)
|
||||
#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c)
|
||||
#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b)
|
||||
#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
|
||||
#define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c)
|
||||
#define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
|
||||
|
||||
#else /* C++ */
|
||||
|
||||
#define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
|
||||
#define IDxDiagProvider_AddRef(p) (p)->AddRef(p)
|
||||
#define IDxDiagProvider_Release(p) (p)->Release(p)
|
||||
#define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(p,a,b)
|
||||
#define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(p,a)
|
||||
|
||||
#define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
|
||||
#define IDxDiagContainer_AddRef(p) (p)->AddRef(p)
|
||||
#define IDxDiagContainer_Release(p) (p)->Release(p)
|
||||
#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(p,a)
|
||||
#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(p,a,b,c)
|
||||
#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(p,a,b)
|
||||
#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(p,a)
|
||||
#define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(p,a,b,c)
|
||||
#define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(p,a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DXDIAG_H_ */
|
185
Include/dxdiag.txt
Normal file
185
Include/dxdiag.txt
Normal file
@ -0,0 +1,185 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dxdiag.h
|
||||
* Content: DirectX Diagnostic Tool include file
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _DXDIAG_H_
|
||||
#define _DXDIAG_H_
|
||||
|
||||
#include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
|
||||
|
||||
// This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an
|
||||
// application was built against the correct header files. This number is
|
||||
// incremented whenever a header (or other) change would require applications
|
||||
// to be rebuilt. If the version doesn't match, IDxDiagProvider::Initialize will fail.
|
||||
// (The number itself has no meaning.)
|
||||
#define DXDIAG_DX9_SDK_VERSION 111
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Errors
|
||||
*
|
||||
****************************************************************************/
|
||||
#define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag CLSIDs
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// {A65B8071-3BFE-4213-9A5B-491DA4461CA7}
|
||||
DEFINE_GUID(CLSID_DxDiagProvider,
|
||||
0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Interface IIDs
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// {9C6B4CB0-23F8-49CC-A3ED-45A55000A6D2}
|
||||
DEFINE_GUID(IID_IDxDiagProvider,
|
||||
0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2);
|
||||
|
||||
// {0x7D0F462F-0x4064-0x4862-BC7F-933E5058C10F}
|
||||
DEFINE_GUID(IID_IDxDiagContainer,
|
||||
0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Interface Pointer definitions
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
|
||||
|
||||
typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Structures
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _DXDIAG_INIT_PARAMS
|
||||
{
|
||||
DWORD dwSize; // Size of this structure.
|
||||
DWORD dwDxDiagHeaderVersion; // Pass in DXDIAG_DX9_SDK_VERSION. This verifies
|
||||
// the header and dll are correctly matched.
|
||||
BOOL bAllowWHQLChecks; // If true, allow dxdiag to check if drivers are
|
||||
// digital signed as logo'd by WHQL which may
|
||||
// connect via internet to update WHQL certificates.
|
||||
VOID* pReserved; // Reserved. Must be NULL.
|
||||
} DXDIAG_INIT_PARAMS;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag Application Interfaces
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// COM definition for IDxDiagProvider
|
||||
//
|
||||
#undef INTERFACE // External COM Implementation
|
||||
#define INTERFACE IDxDiagProvider
|
||||
DECLARE_INTERFACE_(IDxDiagProvider,IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*** IDxDiagProvider methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ DXDIAG_INIT_PARAMS* pParams) PURE;
|
||||
STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// COM definition for IDxDiagContainer
|
||||
//
|
||||
#undef INTERFACE // External COM Implementation
|
||||
#define INTERFACE IDxDiagContainer
|
||||
DECLARE_INTERFACE_(IDxDiagContainer,IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*** IDxDiagContainer methods ***/
|
||||
STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE;
|
||||
STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
|
||||
STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE;
|
||||
STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE;
|
||||
STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
|
||||
STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE;
|
||||
};
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DxDiag application interface macros
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
#define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
|
||||
#define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
|
||||
|
||||
#define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a)
|
||||
#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c)
|
||||
#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b)
|
||||
#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
|
||||
#define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c)
|
||||
#define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
|
||||
|
||||
#else /* C++ */
|
||||
|
||||
#define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
|
||||
#define IDxDiagProvider_AddRef(p) (p)->AddRef(p)
|
||||
#define IDxDiagProvider_Release(p) (p)->Release(p)
|
||||
#define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(p,a,b)
|
||||
#define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(p,a)
|
||||
|
||||
#define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
|
||||
#define IDxDiagContainer_AddRef(p) (p)->AddRef(p)
|
||||
#define IDxDiagContainer_Release(p) (p)->Release(p)
|
||||
#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(p,a)
|
||||
#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(p,a,b,c)
|
||||
#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(p,a,b)
|
||||
#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(p,a)
|
||||
#define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(p,a,b,c)
|
||||
#define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(p,a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DXDIAG_H_ */
|
@ -77,6 +77,9 @@
|
||||
#define SETCOMPATIBILITY 0x40000000 // invoke ddraw SetAppCompatData to set aero compatibility mode
|
||||
#define WIREFRAME 0x80000000 // invoke ddraw SetAppCompatData to set aero compatibility mode
|
||||
|
||||
// third flags DWORD dxw.dwFlags3:
|
||||
#define FORCEHOOKOPENGL 0x00000001 // loads OpenGL32.dll and hooks it
|
||||
|
||||
// logging Tflags DWORD:
|
||||
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general
|
||||
#define OUTDDRAWTRACE 0x00000002 // traces DxWnd directdraw screen handling
|
||||
@ -100,6 +103,8 @@ typedef struct TARGETMAP
|
||||
int dxversion;
|
||||
int flags;
|
||||
int flags2;
|
||||
int flags3;
|
||||
int flags4;
|
||||
int tflags;
|
||||
short initx;
|
||||
short inity;
|
||||
@ -129,6 +134,7 @@ typedef struct
|
||||
BOOL isLogging;
|
||||
DWORD FPSCount;
|
||||
int TimeShift;
|
||||
short CursorX, CursorY;
|
||||
} DXWNDSTATUS;
|
||||
|
||||
extern DXWNDSTATUS DxWndStatus;
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ccce7b58149566392637a1d72f587445ede44d768a6b88c4e28202b87ad5040c
|
||||
size 304640
|
||||
oid sha256:4254ded87b12758c82865086e3af480673f216886af7b44d71477cc06be75705
|
||||
size 311296
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:95dbceb4c4ac4c61b5c7f8e3b3a128136c352da735829e51ae0bb713d37458e9
|
||||
size 501248
|
||||
oid sha256:c299cf7d537a05c2aefa8e169e5b25abe44450db15171d2bf9a0f66dbb976df0
|
||||
size 501760
|
||||
|
4346
build/dxwnd.ini
4346
build/dxwnd.ini
File diff suppressed because it is too large
Load Diff
@ -82,3 +82,18 @@ DLL injection finally working! Quake 2 is supported.
|
||||
Added Wireframe option for OpenGL games
|
||||
Improved fix for clipper handling of primary/backbuffer surfaces
|
||||
|
||||
v2.02.18
|
||||
Improved LoadLibrary family hook and other improvements to let DxWnd better retrieve OpenGL libs: now Homeworld 2 is working
|
||||
Fixed a bug in backbuffer ZBUFFER attach emulation. Now Dungeon Keeper 2 crashes no more.
|
||||
Moved "Remap client rect" option from directx tab to main program tab
|
||||
Added the "Force Hook" in the OpenGL tab. Useless for now.
|
||||
Preliminary work for d3d10/d3d11 wrapping. Unfinished and not working so far.
|
||||
Added LoadLibraryEx flags explaination in log
|
||||
Added support for mouse X,Y coordinates display in status window
|
||||
OpenGL hooking: fixed bug to prevent hooking same call twice
|
||||
OpenGL hooking: added hook for wglMakeCurrent call to keep track of rendered window
|
||||
OpenGL hooking: fixed glViewport and extglScissor hook coordinates handling
|
||||
D3D hooking: Added Wireframe option for D3D games
|
||||
Added hooking of CLSID_DxDiagProvider through CoCreateInstance
|
||||
Fixed (further simplified) clipping handling of primary/backbuffer surfaces
|
||||
ChangeDisplaySettings hook: fixed x,y coordinate inversion in log message
|
||||
|
7
dll/d3d10.cpp
Normal file
7
dll/d3d10.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
D3D10CreateDevice
|
||||
|
||||
D3D10CreateDeviceAndSwapChain
|
||||
|
||||
|
143
dll/dxdiaghook.cpp
Normal file
143
dll/dxdiaghook.cpp
Normal file
@ -0,0 +1,143 @@
|
||||
#include <windows.h>
|
||||
#include <dxdiag.h>
|
||||
#include "dxwnd.h"
|
||||
#include "dxwcore.hpp"
|
||||
|
||||
// COM generic types
|
||||
typedef HRESULT (WINAPI *QueryInterface_Type)(void *, REFIID, LPVOID *);
|
||||
|
||||
// DxDiag IDxDiagProvider
|
||||
typedef HRESULT (WINAPI *Initialize_Type) (void *, DXDIAG_INIT_PARAMS *);
|
||||
typedef HRESULT (WINAPI *GetRootContainer_Type) (void *, IDxDiagContainer **);
|
||||
// DxDiag IDxDiagContainer
|
||||
typedef HRESULT (WINAPI *GetNumberOfChildContainers_Type) (void *, DWORD *);
|
||||
typedef HRESULT (WINAPI *EnumChildContainerNames_Type) (void *, DWORD, LPWSTR, DWORD);
|
||||
typedef HRESULT (WINAPI *GetChildContainer_Type) (void *, LPCWSTR, IDxDiagContainer **);
|
||||
typedef HRESULT (WINAPI *GetNumberOfProps_Type) (void *, DWORD *);
|
||||
typedef HRESULT (WINAPI *EnumPropNames_Type) (void *, DWORD, LPWSTR, DWORD);
|
||||
typedef HRESULT (WINAPI *GetProp_Type) (void *, LPCWSTR, VARIANT *);
|
||||
|
||||
typedef HRESULT (WINAPI *Initialize_Type)(void *, DXDIAG_INIT_PARAMS *);
|
||||
typedef HRESULT (WINAPI *GetRootContainer_Type)(void *, IDxDiagContainer **);
|
||||
|
||||
HRESULT WINAPI extInitializeDD(void *, DXDIAG_INIT_PARAMS *);
|
||||
HRESULT WINAPI extGetRootContainer(void *, IDxDiagContainer **);
|
||||
HRESULT WINAPI extGetNumberOfChildContainers(void *, DWORD *);
|
||||
HRESULT WINAPI extQueryInterfaceDD(void *, REFIID, LPVOID *);
|
||||
HRESULT WINAPI extGetProp(void *, LPCWSTR, VARIANT *);
|
||||
|
||||
Initialize_Type pInitializeDD;
|
||||
GetRootContainer_Type pGetRootContainer;
|
||||
GetNumberOfChildContainers_Type pGetNumberOfChildContainers;
|
||||
EnumChildContainerNames_Type pEnumChildContainerNames;
|
||||
GetChildContainer_Type pGetChildContainer;
|
||||
GetNumberOfProps_Type pGetNumberOfProps;
|
||||
EnumPropNames_Type pEnumPropNames;
|
||||
GetProp_Type pGetProp;
|
||||
QueryInterface_Type pQueryInterfaceDD;
|
||||
|
||||
HRESULT HookDxDiag(REFIID riid, LPVOID FAR* ppv)
|
||||
{
|
||||
HMODULE dxdlib;
|
||||
|
||||
OutTraceD("CoCreateInstance: CLSID_DxDiagProvider object\n");
|
||||
dxdlib=(*pLoadLibraryA)("dxdiagn.dll");
|
||||
OutTraceD("CoCreateInstance: dxdiagn lib handle=%x\n", dxdlib);
|
||||
extern void HookSysLibs(HMODULE);
|
||||
extern void HookModule(HMODULE, int);
|
||||
//HookSysLibs(dxdlib);
|
||||
HookModule(dxdlib, 0);
|
||||
|
||||
switch (*(DWORD *)&riid){
|
||||
case 0x9C6B4CB0:
|
||||
OutTraceD("CoCreateInstance: IID_DxDiagProvider RIID\n");
|
||||
// IID_DxDiagProvider::QueryInterface
|
||||
SetHook((void *)(**(DWORD **)ppv), extQueryInterfaceDD, (void **)&pQueryInterfaceDD, "QueryInterface(DxDiag)");
|
||||
// IID_DxDiagProvider::Initialize
|
||||
SetHook((void *)(**(DWORD **)ppv + 12), extInitializeDD, (void **)&pInitializeDD, "Initialize(DxDiag)");
|
||||
// IID_DxDiagProvider::Initialize
|
||||
SetHook((void *)(**(DWORD **)ppv + 16), extGetRootContainer, (void **)&pGetRootContainer, "GetRootContainer(DxDiag)");
|
||||
break;
|
||||
case 0x7D0F462F:
|
||||
OutTraceD("CoCreateInstance: IID_IDxDiagContainer RIID\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT WINAPI extInitializeDD(void *th, DXDIAG_INIT_PARAMS *pParams)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("DxDiag::Initialize Params=%x\n", pParams);
|
||||
res=(*pInitializeDD)(th, pParams);
|
||||
OutTraceD("DxDiag::Initialize res=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetRootContainer(void *th, IDxDiagContainer **ppInstance)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("DxDiag::GetRootContainer pInstance=%x\n", *ppInstance);
|
||||
res=(*pGetRootContainer)(th, ppInstance);
|
||||
// IID_IDxDiagContainer::GetNumberOfChildContainers
|
||||
SetHook((void *)(**(DWORD **)ppInstance + 12), extGetNumberOfChildContainers, (void **)&pGetNumberOfChildContainers, "GetNumberOfChildContainers(DxDiag)");
|
||||
// IID_IDxDiagContainer::GetProp
|
||||
SetHook((void *)(**(DWORD **)ppInstance + 32), extGetProp, (void **)&pGetProp, "GetProp(DxDiag)");
|
||||
OutTraceD("DxDiag::GetRootContainer res=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetNumberOfChildContainers(void *th, DWORD *pdwCount)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("DxDiag::GetNumberOfChildContainers\n");
|
||||
res=(*pGetNumberOfChildContainers)(th, pdwCount);
|
||||
OutTraceD("DxDiag::GetNumberOfChildContainers res=%x Count=%d\n", res, *pdwCount);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extQueryInterfaceDD(void *th, REFIID riid, LPVOID *ppvObj)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("DxDiag::QueryInterface ref=%x\n");
|
||||
res=(*pQueryInterfaceDD)(th, riid, ppvObj);
|
||||
OutTraceD("DxDiag::QueryInterface res=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetProp(void *th, LPCWSTR pwszPropName, VARIANT *pvarProp)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("DxDiag::GetProp PropName=%ls\n", pwszPropName);
|
||||
res=(*pGetProp)(th, pwszPropName, pvarProp);
|
||||
if(res)
|
||||
OutTraceE("DxDiag::GetProp ERROR res=%x\n", res);
|
||||
|
||||
if (!wcsncmp(L"dwDirectXVersionMajor", pwszPropName, sizeof(L"dwDirectXVersionMajor"))){
|
||||
OutTraceD("DxDiag::GetProp DirectXVersionMajor=%d\n", *pvarProp);
|
||||
//*(DWORD *)pvarProp=10;
|
||||
//OutTraceD("DxDiag::GetProp fixed DirectXVersionMajor=%d\n", *pvarProp);
|
||||
}
|
||||
if (!wcsncmp(L"dwDirectXVersionMinor", pwszPropName, sizeof(L"dwDirectXVersionMinor"))){
|
||||
OutTraceD("DxDiag::GetProp DirectXVersionMinor=%d\n", *pvarProp);
|
||||
//*(DWORD *)pvarProp=10;
|
||||
//OutTraceD("DxDiag::GetProp fixed dwDirectXVersionMinor=%d\n", *pvarProp);
|
||||
}
|
||||
if (!wcsncmp(L"szDirectXVersionLetter", pwszPropName, sizeof(L"szDirectXVersionLetter"))){
|
||||
OutTraceD("DxDiag::GetProp DirectXVersionLetter=%d\n", *pvarProp);
|
||||
//*(DWORD *)pvarProp=9;
|
||||
//OutTraceD("DxDiag::GetProp fixed szDirectXVersionLetter=%d\n", *pvarProp);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE;
|
||||
STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
|
||||
STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE;
|
||||
STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE;
|
||||
STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
|
||||
STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE;
|
||||
*/
|
@ -982,3 +982,20 @@ char *ExplainWPFlags(DWORD c)
|
||||
else strcpy(eb,"NULL");
|
||||
return(eb);
|
||||
}
|
||||
|
||||
char *ExplainLoadLibFlags(DWORD c)
|
||||
{
|
||||
static char eb[256];
|
||||
unsigned int l;
|
||||
strcpy(eb,"");
|
||||
if (c & DONT_RESOLVE_DLL_REFERENCES) strcat(eb, "DONT_RESOLVE_DLL_REFERENCES+");
|
||||
if (c & LOAD_LIBRARY_AS_DATAFILE) strcat(eb, "LOAD_LIBRARY_AS_DATAFILE+");
|
||||
if (c & LOAD_WITH_ALTERED_SEARCH_PATH) strcat(eb, "LOAD_WITH_ALTERED_SEARCH_PATH+");
|
||||
if (c & LOAD_IGNORE_CODE_AUTHZ_LEVEL) strcat(eb, "LOAD_IGNORE_CODE_AUTHZ_LEVEL+");
|
||||
if (c & LOAD_LIBRARY_AS_IMAGE_RESOURCE) strcat(eb, "LOAD_LIBRARY_AS_IMAGE_RESOURCE+");
|
||||
if (c & LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE) strcat(eb, "LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE+");
|
||||
l=strlen(eb);
|
||||
if (l>0) eb[l-1]=0; // delete last '+' if any
|
||||
else strcpy(eb,"NULL");
|
||||
return(eb);
|
||||
}
|
||||
|
@ -29,3 +29,4 @@ extern char *ExplainNChitTest(DWORD);
|
||||
extern char *ExplainDDEnumerateFlags(DWORD);
|
||||
extern char *ExplainsSystemMetrics(DWORD);
|
||||
extern char *ExplainWPFlags(DWORD);
|
||||
extern char *ExplainLoadLibFlags(DWORD);
|
@ -44,7 +44,29 @@ static char *Flag2Names[32]={
|
||||
"TIMESTRETCH", "HOOKOPENGL", "WALLPAPERMODE", "SHOWHWCURSOR",
|
||||
"HOOKGDI", "SHOWFPSOVERLAY", "FAKEVERSION", "FULLRECTBLT",
|
||||
"NOPALETTEUPDATE", "SUPPRESSIME", "NOBANNER", "WINDOWIZE",
|
||||
"LIMITRESOURCES", "STARTDEBUG", "SETCOMPATIBILITY", "",
|
||||
"LIMITRESOURCES", "STARTDEBUG", "SETCOMPATIBILITY", "WIREFRAME",
|
||||
};
|
||||
|
||||
static char *Flag3Names[32]={
|
||||
"FORCEHOOKOPENGL", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
};
|
||||
|
||||
static char *Flag4Names[32]={
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
};
|
||||
|
||||
static char *TFlagNames[32]={
|
||||
@ -71,6 +93,8 @@ static void OutTraceHeader(FILE *fp)
|
||||
fprintf(fp, "*** Flags= ");
|
||||
for(i=0, dword=dxw.dwFlags1; i<32; i++, dword>>=1) if(dword & 0x1) fprintf(fp, "%s ", FlagNames[i]);
|
||||
for(i=0, dword=dxw.dwFlags2; i<32; i++, dword>>=1) if(dword & 0x1) fprintf(fp, "%s ", Flag2Names[i]);
|
||||
for(i=0, dword=dxw.dwFlags3; i<32; i++, dword>>=1) if(dword & 0x1) fprintf(fp, "%s ", Flag3Names[i]);
|
||||
for(i=0, dword=dxw.dwFlags4; i<32; i++, dword>>=1) if(dword & 0x1) fprintf(fp, "%s ", Flag4Names[i]);
|
||||
for(i=0, dword=dxw.dwTFlags; i<32; i++, dword>>=1) if(dword & 0x1) fprintf(fp, "%s ", TFlagNames[i]);
|
||||
fprintf(fp, "***\n");
|
||||
}
|
||||
@ -703,6 +727,8 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
lparam = MAKELPARAM(curr.x, curr.y);
|
||||
OutTraceC("WindowProc: hwnd=%x pos XY=(%d,%d)->(%d,%d)\n", hwnd, prev.x, prev.y, curr.x, curr.y);
|
||||
}
|
||||
GetHookInfo()->CursorX=(short)curr.x;
|
||||
GetHookInfo()->CursorY=(short)curr.y;
|
||||
break;
|
||||
// fall through cases:
|
||||
case WM_MOUSEWHEEL:
|
||||
@ -724,6 +750,8 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
lparam = MAKELPARAM(curr.x, curr.y);
|
||||
OutTraceC("WindowProc: hwnd=%x pos XY=(%d,%d)->(%d,%d)\n", hwnd, prev.x, prev.y, curr.x, curr.y);
|
||||
}
|
||||
GetHookInfo()->CursorX=(short)curr.x;
|
||||
GetHookInfo()->CursorY=(short)curr.y;
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
if (dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion);
|
||||
@ -959,6 +987,8 @@ void HookSysLibs(HMODULE module)
|
||||
{
|
||||
void *tmp;
|
||||
|
||||
OutTraceD("HookSysLibs module=%x\n", module);
|
||||
|
||||
tmp = HookAPI(module, "kernel32.dll", GetProcAddress, "GetProcAddress", extGetProcAddress);
|
||||
if(tmp) pGetProcAddress = (GetProcAddress_Type)tmp;
|
||||
tmp = HookAPI(module, "kernel32.dll", LoadLibraryA, "LoadLibraryA", extLoadLibraryA);
|
||||
@ -1205,7 +1235,6 @@ void HookModule(HMODULE base, int dxversion)
|
||||
HookOle32(base, dxversion); // unfinished business
|
||||
if(dxw.dwFlags2 & HOOKOPENGL) HookOpenGLLibs(base, dxw.CustomOpenGLLib);
|
||||
HookMSV4WLibs(base);
|
||||
//ForceHookOpenGL(base);
|
||||
}
|
||||
|
||||
void DisableIME()
|
||||
@ -1252,7 +1281,7 @@ int HookInit(TARGETMAP *target, HWND hwnd)
|
||||
char *sModule;
|
||||
static char *dxversions[14]={
|
||||
"Automatic", "DirectX1~6", "", "", "", "", "",
|
||||
"DirectX7", "DirectX8", "DirectX9", "None\\OpenGL", "", "", ""
|
||||
"DirectX7", "DirectX8", "DirectX9", "DirectX10", "DirectX11", "None", ""
|
||||
};
|
||||
|
||||
dxw.InitTarget(target);
|
||||
@ -1291,12 +1320,13 @@ int HookInit(TARGETMAP *target, HWND hwnd)
|
||||
|
||||
HookSysLibsInit(); // this just once...
|
||||
|
||||
if(IsDebug) OutTrace("HookInit: base hmodule=%x\n", base);
|
||||
OutTraceB("HookInit: base hmodule=%x\n", base);
|
||||
HookModule(base, dxw.dwTargetDDVersion);
|
||||
if(IsDebug){
|
||||
extern BOOL ListProcessModules(BOOL);
|
||||
ListProcessModules(true);
|
||||
}
|
||||
// ListProcessModules needs to be fixed: it hangs the exe....
|
||||
//if(1){
|
||||
// extern BOOL ListProcessModules(BOOL);
|
||||
// ListProcessModules(true);
|
||||
//}
|
||||
sModule=strtok(dxw.gsModules," ");
|
||||
while (sModule) {
|
||||
base=(*pLoadLibraryA)(sModule);
|
||||
|
@ -7,3 +7,4 @@ extern void HookImeLib(HMODULE);
|
||||
extern void InitPosition(int, int, int, int, int, int);
|
||||
//void InitWindowPos(int, int, int, int);
|
||||
extern LPCSTR ProcToString(LPCSTR proc);
|
||||
extern HRESULT HookDxDiag(REFIID, LPVOID FAR*);
|
@ -23,7 +23,6 @@ dxwCore::dxwCore()
|
||||
lpDDSPrimHDC = NULL;
|
||||
//IsWithinDDraw = FALSE;
|
||||
IsGDIPalette = FALSE;
|
||||
|
||||
memset(PrimSurfaces, 0, sizeof(PrimSurfaces));
|
||||
}
|
||||
|
||||
@ -35,6 +34,8 @@ void dxwCore::InitTarget(TARGETMAP *target)
|
||||
{
|
||||
dwFlags1 = target->flags;
|
||||
dwFlags2 = target->flags2;
|
||||
dwFlags3 = target->flags3;
|
||||
dwFlags4 = target->flags4;
|
||||
dwTFlags = target->tflags;
|
||||
gsModules = target->module;
|
||||
MaxFPS = target->MaxFPS;
|
||||
@ -43,7 +44,7 @@ void dxwCore::InitTarget(TARGETMAP *target)
|
||||
// bounds control
|
||||
dwTargetDDVersion = target->dxversion;
|
||||
if(dwTargetDDVersion<0) dwTargetDDVersion=0;
|
||||
if(dwTargetDDVersion>10) dwTargetDDVersion=10;
|
||||
if(dwTargetDDVersion>12) dwTargetDDVersion=12;
|
||||
TimeShift = target->InitTS;
|
||||
if(TimeShift < -8) TimeShift = -8;
|
||||
if(TimeShift > 8) TimeShift = 8;
|
||||
|
@ -63,6 +63,8 @@ public: // simple data variables
|
||||
DWORD dwMaxDDVersion;
|
||||
DWORD dwFlags1;
|
||||
DWORD dwFlags2;
|
||||
DWORD dwFlags3;
|
||||
DWORD dwFlags4;
|
||||
DWORD dwTFlags;
|
||||
HWND hParentWnd;
|
||||
HWND hChildWnd;
|
||||
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "dxwnd.h"
|
||||
#include "dxwcore.hpp"
|
||||
|
||||
#define VERSION "2.02.16"
|
||||
#define VERSION "2.02.18"
|
||||
|
||||
LRESULT CALLBACK HookProc(int ncode, WPARAM wparam, LPARAM lparam);
|
||||
|
||||
@ -175,6 +175,7 @@ LRESULT CALLBACK HookProc(int ncode, WPARAM wparam, LPARAM lparam)
|
||||
pStatus->hWnd=hwnd;
|
||||
pStatus->dwPid=GetProcessId(GetCurrentProcess());
|
||||
pStatus->TimeShift=pMapping[i].InitTS;
|
||||
pStatus->CursorX = pStatus->CursorY = 0;
|
||||
DxWndStatus = *pStatus;
|
||||
HookInit(&pMapping[i], hwnd);
|
||||
}
|
||||
|
Binary file not shown.
@ -216,6 +216,10 @@
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\dxdiaghook.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dxemublt.cpp"
|
||||
>
|
||||
|
170
dll/glhook.cpp
170
dll/glhook.cpp
@ -9,46 +9,92 @@
|
||||
|
||||
FARPROC Remap_gl_ProcAddress(LPCSTR proc, HMODULE hModule)
|
||||
{
|
||||
if (!strcmp(proc,"glViewport")){
|
||||
if (!strcmp(proc,"glViewport") && !pglViewport){
|
||||
pglViewport=(glViewport_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglViewport);
|
||||
return (FARPROC)extglViewport;
|
||||
}
|
||||
if (!strcmp(proc,"glScissor")){
|
||||
if (!strcmp(proc,"glScissor") && !pglScissor){
|
||||
pglScissor=(glScissor_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglScissor);
|
||||
return (FARPROC)extglScissor;
|
||||
}
|
||||
if (!strcmp(proc,"glGetIntegerv")){
|
||||
if (!strcmp(proc,"glGetIntegerv") && !pglGetIntegerv){
|
||||
pglGetIntegerv=(glGetIntegerv_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglGetIntegerv);
|
||||
return (FARPROC)extglGetIntegerv;
|
||||
}
|
||||
if (!strcmp(proc,"glDrawBuffer")){
|
||||
if (!strcmp(proc,"glDrawBuffer") && !pglDrawBuffer){
|
||||
pglDrawBuffer=(glDrawBuffer_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglDrawBuffer);
|
||||
return (FARPROC)extglDrawBuffer;
|
||||
}
|
||||
if (!strcmp(proc,"glPolygonMode")){
|
||||
if (!strcmp(proc,"glPolygonMode") && !pglPolygonMode){
|
||||
pglPolygonMode=(glPolygonMode_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglPolygonMode);
|
||||
return (FARPROC)extglPolygonMode;
|
||||
}
|
||||
if (!strcmp(proc,"glGetFloatv")){
|
||||
if (!strcmp(proc,"glGetFloatv") && !pglGetFloatv){
|
||||
pglGetFloatv=(glGetFloatv_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglGetFloatv);
|
||||
return (FARPROC)extglGetFloatv;
|
||||
}
|
||||
if (!strcmp(proc,"glClear")){
|
||||
if (!strcmp(proc,"glClear") && !pglClear){
|
||||
pglClear=(glClear_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglClear);
|
||||
return (FARPROC)extglClear;
|
||||
}
|
||||
if (!strcmp(proc,"wglCreateContext")){
|
||||
if (!strcmp(proc,"wglCreateContext") && !pwglCreateContext){
|
||||
pwglCreateContext=(wglCreateContext_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pwglCreateContext);
|
||||
return (FARPROC)extwglCreateContext;
|
||||
}
|
||||
if (!strcmp(proc,"wglMakeCurrent") && !pwglMakeCurrent){
|
||||
pwglMakeCurrent=(wglMakeCurrent_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pwglMakeCurrent);
|
||||
return (FARPROC)extwglMakeCurrent;
|
||||
}
|
||||
// NULL -> keep the original call address
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PROC Remap_wgl_ProcAddress(LPCSTR proc)
|
||||
{
|
||||
if (!strcmp(proc,"glViewport")){
|
||||
pglViewport=(glViewport_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglViewport);
|
||||
return (FARPROC)extglViewport;
|
||||
}
|
||||
if (!strcmp(proc,"glScissor")){
|
||||
pglScissor=(glScissor_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglScissor);
|
||||
return (FARPROC)extglScissor;
|
||||
}
|
||||
if (!strcmp(proc,"glGetIntegerv")){
|
||||
pglGetIntegerv=(glGetIntegerv_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglGetIntegerv);
|
||||
return (FARPROC)extglGetIntegerv;
|
||||
}
|
||||
if (!strcmp(proc,"glDrawBuffer")){
|
||||
pglDrawBuffer=(glDrawBuffer_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglDrawBuffer);
|
||||
return (FARPROC)extglDrawBuffer;
|
||||
}
|
||||
if (!strcmp(proc,"glPolygonMode")){
|
||||
pglPolygonMode=(glPolygonMode_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglPolygonMode);
|
||||
return (FARPROC)extglPolygonMode;
|
||||
}
|
||||
if (!strcmp(proc,"glGetFloatv")){
|
||||
pglGetFloatv=(glGetFloatv_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglGetFloatv);
|
||||
return (FARPROC)extglGetFloatv;
|
||||
}
|
||||
if (!strcmp(proc,"glClear")){
|
||||
pglClear=(glClear_Type)(*pwglGetProcAddress)(proc);
|
||||
OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pglClear);
|
||||
return (FARPROC)extglClear;
|
||||
}
|
||||
// NULL -> keep the original call address
|
||||
return NULL;
|
||||
}
|
||||
@ -56,8 +102,12 @@ FARPROC Remap_gl_ProcAddress(LPCSTR proc, HMODULE hModule)
|
||||
void ForceHookOpenGL(HMODULE base) // to do .....
|
||||
{
|
||||
HMODULE hGlLib;
|
||||
static int DoOnce=FALSE;
|
||||
|
||||
if(DoOnce) return;
|
||||
DoOnce = TRUE;
|
||||
|
||||
hGlLib=(*pLoadLibraryA)("OpenGL32.dll");
|
||||
//hGlLib=LoadLibrary("OpenGL32.dll");
|
||||
OutTrace("hGlLib=%x\n",hGlLib);
|
||||
if(!hGlLib){
|
||||
OutTraceE("LoadLibrary(\"OpenGL32.dll\") ERROR: err=%d at %d\n", GetLastError(), __LINE__);
|
||||
@ -69,6 +119,11 @@ void ForceHookOpenGL(HMODULE base) // to do .....
|
||||
HookAPI(base, "opengl32", pglViewport, "glViewport", extglViewport);
|
||||
extglViewport(dxw.iPosX,dxw.iPosY,dxw.iSizX,dxw.iSizY);
|
||||
}
|
||||
pwglGetProcAddress=(wglGetProcAddress_Type)GetProcAddress(hGlLib, "wglGetProcAddress");
|
||||
if(pwglGetProcAddress) {
|
||||
HookAPI(base, "opengl32", pwglGetProcAddress, "wglGetProcAddress", extwglGetProcAddress);
|
||||
extwglGetProcAddress("wglGetProcAddress");
|
||||
}
|
||||
pglScissor=(glScissor_Type)GetProcAddress(hGlLib, "glScissor");
|
||||
if(pglScissor) {
|
||||
HookAPI(base, "opengl32", pglScissor, "glScissor", extglScissor);
|
||||
@ -97,44 +152,49 @@ void ForceHookOpenGL(HMODULE base) // to do .....
|
||||
if(pwglCreateContext) {
|
||||
HookAPI(base, "opengl32", pwglCreateContext, "wglCreateContext", extwglCreateContext);
|
||||
}
|
||||
pwglMakeCurrent=(wglMakeCurrent_Type)GetProcAddress(hGlLib, "wglMakeCurrent");
|
||||
if(pwglMakeCurrent) {
|
||||
HookAPI(base, "opengl32", pwglMakeCurrent, "wglMakeCurrent", extwglMakeCurrent);
|
||||
}
|
||||
}
|
||||
|
||||
void HookOpenGL(HMODULE module, char *customlib)
|
||||
{
|
||||
void *tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glViewport", extglViewport);
|
||||
if(tmp) pglViewport = (glViewport_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glScissor", extglScissor);
|
||||
if(tmp) pglScissor = (glScissor_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glGetIntegerv", extglGetIntegerv);
|
||||
if(tmp) pglGetIntegerv = (glGetIntegerv_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glDrawBuffer", extglDrawBuffer);
|
||||
if(tmp) pglDrawBuffer = (glDrawBuffer_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glPolygonMode", extglPolygonMode);
|
||||
if(tmp) pglPolygonMode = (glPolygonMode_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glGetFloatv", extglGetFloatv);
|
||||
if(tmp) pglGetFloatv = (glGetFloatv_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glClear", extglClear);
|
||||
if(tmp) pglClear = (glClear_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "wglCreateContext", extwglCreateContext);
|
||||
if(tmp) pwglCreateContext = (wglCreateContext_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "wglGetProcAddress", extwglGetProcAddress);
|
||||
if(tmp) pwglGetProcAddress = (wglGetProcAddress_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "wglMakeCurrent", extwglMakeCurrent);
|
||||
if(tmp) pwglMakeCurrent = (wglMakeCurrent_Type)tmp;
|
||||
}
|
||||
|
||||
void HookOpenGLLibs(HMODULE module, char *customlib)
|
||||
{
|
||||
void *tmp;
|
||||
char *DefOpenGLModule="OpenGL32.dll";
|
||||
int HookMode;
|
||||
|
||||
if (!customlib) customlib=DefOpenGLModule;
|
||||
|
||||
HookMode=0; // temporary ...
|
||||
switch(HookMode){
|
||||
case 0:
|
||||
tmp = HookAPI(module, customlib, NULL, "glViewport", extglViewport);
|
||||
if(tmp) pglViewport = (glViewport_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glScissor", extglScissor);
|
||||
if(tmp) pglScissor = (glScissor_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glGetIntegerv", extglGetIntegerv);
|
||||
if(tmp) pglGetIntegerv = (glGetIntegerv_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glDrawBuffer", extglDrawBuffer);
|
||||
if(tmp) pglDrawBuffer = (glDrawBuffer_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glPolygonMode", extglPolygonMode);
|
||||
if(tmp) pglPolygonMode = (glPolygonMode_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glGetFloatv", extglGetFloatv);
|
||||
if(tmp) pglGetFloatv = (glGetFloatv_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "glClear", extglClear);
|
||||
if(tmp) pglClear = (glClear_Type)tmp;
|
||||
tmp = HookAPI(module, customlib, NULL, "wglCreateContext", extwglCreateContext);
|
||||
if(tmp) pwglCreateContext = (wglCreateContext_Type)tmp;
|
||||
break;
|
||||
case 1:
|
||||
static int DoOnce=TRUE;
|
||||
if(DoOnce){
|
||||
ForceHookOpenGL(module);
|
||||
DoOnce=FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
OutTraceD("HookOpenGLLibs module=%x lib=\"%s\" forced=%x\n", module, customlib, (dxw.dwFlags3 & FORCEHOOKOPENGL)?1:0);
|
||||
if (dxw.dwFlags3 & FORCEHOOKOPENGL)
|
||||
ForceHookOpenGL(module);
|
||||
else
|
||||
HookOpenGL(module, customlib);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -199,6 +259,7 @@ void WINAPI extglDrawBuffer(GLenum mode)
|
||||
void WINAPI extglPolygonMode(GLenum face, GLenum mode)
|
||||
{
|
||||
OutTraceD("glPolygonMode: face=%x mode=%x\n", face, mode);
|
||||
//OutTraceD("glPolygonMode: extglPolygonMode=%x pglPolygonMode=%x\n", extglPolygonMode, pglPolygonMode);
|
||||
if(dxw.dwFlags2 & WIREFRAME) mode = GL_LINE; // trick to set wireframe mode....
|
||||
(*pglPolygonMode)(face, mode);
|
||||
return;
|
||||
@ -233,6 +294,37 @@ HGLRC WINAPI extwglCreateContext(HDC hdc)
|
||||
return ret;
|
||||
}
|
||||
|
||||
PROC WINAPI extwglGetProcAddress(LPCSTR proc)
|
||||
{
|
||||
PROC procaddr;
|
||||
|
||||
OutTraceD("wglGetProcAddress: proc=%s\n", proc);
|
||||
procaddr=Remap_wgl_ProcAddress(proc);
|
||||
if (!procaddr) procaddr=(*pwglGetProcAddress)(proc);
|
||||
return procaddr;
|
||||
}
|
||||
|
||||
int WINAPI extChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR *ppfd)
|
||||
{
|
||||
// to do ....
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL WINAPI extwglMakeCurrent(HDC hdc, HGLRC hglrc)
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
OutTraceD("wglMakeCurrent: hdc=%x hglrc=%x\n", hdc, hglrc);
|
||||
ret=(*pwglMakeCurrent)(hdc, hglrc);
|
||||
if(ret){
|
||||
HWND hWnd;
|
||||
hWnd = WindowFromDC(hdc);
|
||||
OutTraceD("wglMakeCurrent: setting hwnd=%x\n", hWnd);
|
||||
dxw.SethWnd(hWnd);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// to do:
|
||||
// glutSetWindow - save current window handle
|
||||
// glutInitWindowPosition, glutInitWindowSize
|
||||
|
@ -13,6 +13,8 @@ typedef void (WINAPI *glPolygonMode_Type)(GLenum, GLenum);
|
||||
typedef void (WINAPI *glGetFloatv_Type)(GLenum, GLboolean *);
|
||||
typedef void (WINAPI *glClear_Type)(GLbitfield);
|
||||
typedef HGLRC (WINAPI *wglCreateContext_Type)(HDC);
|
||||
typedef PROC (WINAPI *wglGetProcAddress_Type)(LPCSTR);
|
||||
typedef BOOL (WINAPI *wglMakeCurrent_Type)(HDC, HGLRC);
|
||||
|
||||
extern void WINAPI extglViewport(GLint, GLint, GLsizei, GLsizei);
|
||||
extern void WINAPI extglScissor(GLint, GLint, GLsizei, GLsizei);
|
||||
@ -24,6 +26,8 @@ extern void WINAPI extglPolygonMode(GLenum, GLenum);
|
||||
extern void WINAPI extglGetFloatv(GLenum, GLboolean *);
|
||||
extern void WINAPI extglClear(GLbitfield);
|
||||
extern HGLRC WINAPI extwglCreateContext(HDC);
|
||||
extern PROC WINAPI extwglGetProcAddress(LPCSTR);
|
||||
extern BOOL WINAPI extwglMakeCurrent(HDC, HGLRC);
|
||||
|
||||
#ifdef DXWDECLARATIONS
|
||||
#undef DXWEXTERN
|
||||
@ -48,3 +52,5 @@ DXWEXTERN glPolygonMode_Type pglPolygonMode;
|
||||
DXWEXTERN glGetFloatv_Type pglGetFloatv;
|
||||
DXWEXTERN glClear_Type pglClear;
|
||||
DXWEXTERN wglCreateContext_Type pwglCreateContext;
|
||||
DXWEXTERN wglGetProcAddress_Type pwglGetProcAddress;
|
||||
DXWEXTERN wglMakeCurrent_Type pwglMakeCurrent;
|
||||
|
283
dll/hd3d.cpp
283
dll/hd3d.cpp
@ -1,5 +1,9 @@
|
||||
//#define D3D10_IGNORE_SDK_LAYERS 1
|
||||
#include <windows.h>
|
||||
#include <d3d9.h>
|
||||
#include <D3D10_1.h>
|
||||
#include <D3D10Misc.h>
|
||||
#include <D3D11.h>
|
||||
#include "dxwnd.h"
|
||||
#include "dxwcore.hpp"
|
||||
|
||||
@ -12,6 +16,15 @@ typedef HRESULT (WINAPI *EnumAdapterModes9_Type)(void *, UINT, D3DFORMAT ,UINT,
|
||||
typedef HRESULT (WINAPI *GetAdapterDisplayMode_Type)(void *, UINT, D3DDISPLAYMODE *);
|
||||
typedef HRESULT (WINAPI *GetDisplayMode_Type)(void *, D3DDISPLAYMODE *);
|
||||
typedef HRESULT (WINAPI *Present_Type)(void *, CONST RECT *, CONST RECT *, HWND, CONST RGNDATA *);
|
||||
typedef HRESULT (WINAPI *SetRenderState_Type)(void *, D3DRENDERSTATETYPE, DWORD);
|
||||
typedef HRESULT (WINAPI *GetRenderState_Type)(void *, D3DRENDERSTATETYPE, DWORD );
|
||||
|
||||
typedef HRESULT (WINAPI *D3D10CreateDevice_Type)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, ID3D10Device **);
|
||||
typedef HRESULT (WINAPI *D3D10CreateDeviceAndSwapChain_Type)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D10Device **);
|
||||
typedef HRESULT (WINAPI *D3D10CreateDevice1_Type)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, D3D10_FEATURE_LEVEL1, UINT, ID3D10Device **);
|
||||
typedef HRESULT (WINAPI *D3D10CreateDeviceAndSwapChain1_Type)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D10Device **);
|
||||
typedef HRESULT (WINAPI *D3D11CreateDevice_Type)(IDXGIAdapter *, D3D_DRIVER_TYPE, HMODULE, UINT, const D3D_FEATURE_LEVEL *, UINT, UINT, ID3D11Device **, D3D_FEATURE_LEVEL *, ID3D11DeviceContext **);
|
||||
typedef HRESULT (WINAPI *D3D11CreateDeviceAndSwapChain_Type)(IDXGIAdapter *, D3D_DRIVER_TYPE, HMODULE, UINT, const D3D_FEATURE_LEVEL *, UINT, UINT, const DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D11Device **, D3D_FEATURE_LEVEL *, ID3D11DeviceContext **);
|
||||
|
||||
void* WINAPI extDirect3DCreate8(UINT);
|
||||
void* WINAPI extDirect3DCreate9(UINT);
|
||||
@ -22,6 +35,15 @@ HRESULT WINAPI extEnumAdapterModes9(void *, UINT, D3DFORMAT, UINT , D3DDISPLAYMO
|
||||
HRESULT WINAPI extGetAdapterDisplayMode(void *, UINT, D3DDISPLAYMODE *);
|
||||
HRESULT WINAPI extGetDisplayMode(void *, D3DDISPLAYMODE *);
|
||||
HRESULT WINAPI extPresent(void *, CONST RECT *, CONST RECT *, HWND, CONST RGNDATA *);
|
||||
HRESULT WINAPI extSetRenderState(void *, D3DRENDERSTATETYPE, DWORD);
|
||||
HRESULT WINAPI extGetRenderState(void *, D3DRENDERSTATETYPE, DWORD);
|
||||
|
||||
HRESULT WINAPI extD3D10CreateDevice(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, ID3D10Device **);
|
||||
HRESULT WINAPI extD3D10CreateDeviceAndSwapChain(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D10Device **);
|
||||
HRESULT WINAPI extD3D10CreateDevice1(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, D3D10_FEATURE_LEVEL1, UINT, ID3D10Device **);
|
||||
HRESULT WINAPI extD3D10CreateDeviceAndSwapChain1(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D10Device **);
|
||||
HRESULT WINAPI extD3D11CreateDevice(IDXGIAdapter *, D3D_DRIVER_TYPE, HMODULE, UINT, const D3D_FEATURE_LEVEL *, UINT, UINT, ID3D11Device **, D3D_FEATURE_LEVEL *, ID3D11DeviceContext **);
|
||||
HRESULT WINAPI extD3D11CreateDeviceAndSwapChain(IDXGIAdapter *, D3D_DRIVER_TYPE, HMODULE, UINT, const D3D_FEATURE_LEVEL *, UINT, UINT, const DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **, ID3D11Device **, D3D_FEATURE_LEVEL *, ID3D11DeviceContext **);
|
||||
|
||||
extern char *ExplainDDError(DWORD);
|
||||
|
||||
@ -34,6 +56,15 @@ EnumAdapterModes9_Type pEnumAdapterModes9;
|
||||
GetAdapterDisplayMode_Type pGetAdapterDisplayMode;
|
||||
GetDisplayMode_Type pGetDisplayMode;
|
||||
Present_Type pPresent;
|
||||
SetRenderState_Type pSetRenderState;
|
||||
GetRenderState_Type pGetRenderState;
|
||||
|
||||
D3D10CreateDevice_Type pD3D10CreateDevice;
|
||||
D3D10CreateDeviceAndSwapChain_Type pD3D10CreateDeviceAndSwapChain;
|
||||
D3D10CreateDevice1_Type pD3D10CreateDevice1;
|
||||
D3D10CreateDeviceAndSwapChain1_Type pD3D10CreateDeviceAndSwapChain1;
|
||||
D3D11CreateDevice_Type pD3D11CreateDevice;
|
||||
D3D11CreateDeviceAndSwapChain_Type pD3D11CreateDeviceAndSwapChain;
|
||||
|
||||
DWORD dwD3DVersion;
|
||||
|
||||
@ -41,13 +72,33 @@ int HookDirect3D(HMODULE module, int version){
|
||||
HINSTANCE hinst;
|
||||
void *tmp;
|
||||
LPDIRECT3D9 lpd3d;
|
||||
ID3D10Device *lpd3d10;
|
||||
ID3D11Device *lpd3d11;
|
||||
HRESULT res;
|
||||
|
||||
switch(version){
|
||||
case 0:
|
||||
// D3D8
|
||||
tmp = HookAPI(module, "d3d8.dll", NULL, "Direct3DCreate8", extDirect3DCreate8);
|
||||
if(tmp) pDirect3DCreate8 = (Direct3DCreate8_Type)tmp;
|
||||
// D3D9
|
||||
tmp = HookAPI(module, "d3d9.dll", NULL, "Direct3DCreate9", extDirect3DCreate9);
|
||||
if(tmp) pDirect3DCreate9 = (Direct3DCreate9_Type)tmp;
|
||||
// D3D10
|
||||
tmp = HookAPI(module, "d3d10.dll", NULL, "D3D10CreateDevice", extD3D10CreateDevice);
|
||||
if(tmp) pD3D10CreateDevice = (D3D10CreateDevice_Type)tmp;
|
||||
tmp = HookAPI(module, "d3d10.dll", NULL, "D3D10CreateDeviceAndSwapChain", extD3D10CreateDeviceAndSwapChain);
|
||||
if(tmp) pD3D10CreateDeviceAndSwapChain = (D3D10CreateDeviceAndSwapChain_Type)tmp;
|
||||
// D3D10.1
|
||||
tmp = HookAPI(module, "d3d10_1.dll", NULL, "D3D10CreateDevice1", extD3D10CreateDevice);
|
||||
if(tmp) pD3D10CreateDevice1 = (D3D10CreateDevice1_Type)tmp;
|
||||
tmp = HookAPI(module, "d3d10_1.dll", NULL, "D3D10CreateDeviceAndSwapChain1", extD3D10CreateDeviceAndSwapChain);
|
||||
if(tmp) pD3D10CreateDeviceAndSwapChain1 = (D3D10CreateDeviceAndSwapChain1_Type)tmp;
|
||||
// D3D11
|
||||
tmp = HookAPI(module, "d3d11.dll", NULL, "D3D11CreateDevice", extD3D11CreateDevice);
|
||||
if(tmp) pD3D11CreateDevice = (D3D11CreateDevice_Type)tmp;
|
||||
tmp = HookAPI(module, "d3d11.dll", NULL, "D3D11CreateDeviceAndSwapChain", extD3D11CreateDeviceAndSwapChain);
|
||||
if(tmp) pD3D11CreateDeviceAndSwapChain = (D3D11CreateDeviceAndSwapChain_Type)tmp;
|
||||
break;
|
||||
case 8:
|
||||
hinst = LoadLibrary("d3d8.dll");
|
||||
@ -66,7 +117,96 @@ int HookDirect3D(HMODULE module, int version){
|
||||
lpd3d = (LPDIRECT3D9)extDirect3DCreate9(31);
|
||||
if(lpd3d) lpd3d->Release();
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
hinst = LoadLibrary("d3d10.dll");
|
||||
pD3D10CreateDevice =
|
||||
(D3D10CreateDevice_Type)GetProcAddress(hinst, "D3D10CreateDevice");
|
||||
if(pD3D10CreateDevice){
|
||||
res = extD3D10CreateDevice(
|
||||
NULL,
|
||||
D3D10_DRIVER_TYPE_HARDWARE,
|
||||
NULL,
|
||||
0,
|
||||
D3D10_SDK_VERSION,
|
||||
&lpd3d10);
|
||||
if(res==DD_OK) lpd3d10->Release();
|
||||
}
|
||||
hinst = LoadLibrary("d3d10_1.dll");
|
||||
pD3D10CreateDevice1 =
|
||||
(D3D10CreateDevice1_Type)GetProcAddress(hinst, "D3D10CreateDevice1");
|
||||
break;
|
||||
if(pD3D10CreateDevice1){
|
||||
res = extD3D10CreateDevice1(
|
||||
NULL,
|
||||
D3D10_DRIVER_TYPE_HARDWARE,
|
||||
NULL,
|
||||
0,
|
||||
D3D10_FEATURE_LEVEL_10_1,
|
||||
D3D10_SDK_VERSION,
|
||||
&lpd3d10);
|
||||
if(res==DD_OK) lpd3d10->Release();
|
||||
}
|
||||
pD3D10CreateDeviceAndSwapChain =
|
||||
(D3D10CreateDeviceAndSwapChain_Type)GetProcAddress(hinst, "D3D10CreateDeviceAndSwapChain");
|
||||
if(pD3D10CreateDeviceAndSwapChain){
|
||||
DXGI_SWAP_CHAIN_DESC swapChainDesc;
|
||||
IDXGISwapChain *pSwapChain;
|
||||
ZeroMemory(&swapChainDesc, sizeof(swapChainDesc));
|
||||
|
||||
//set buffer dimensions and format
|
||||
swapChainDesc.BufferCount = 2;
|
||||
swapChainDesc.BufferDesc.Width = dxw.GetScreenWidth();
|
||||
swapChainDesc.BufferDesc.Height = dxw.GetScreenHeight();
|
||||
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
swapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;;
|
||||
|
||||
//set refresh rate
|
||||
swapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
|
||||
swapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
|
||||
|
||||
//sampling settings
|
||||
swapChainDesc.SampleDesc.Quality = 0;
|
||||
swapChainDesc.SampleDesc.Count = 1;
|
||||
|
||||
//output window handle
|
||||
swapChainDesc.OutputWindow = dxw.GethWnd();
|
||||
swapChainDesc.Windowed = true;
|
||||
res = extD3D10CreateDeviceAndSwapChain(
|
||||
NULL,
|
||||
D3D10_DRIVER_TYPE_HARDWARE,
|
||||
NULL,
|
||||
0,
|
||||
D3D10_SDK_VERSION,
|
||||
&swapChainDesc,
|
||||
&pSwapChain,
|
||||
&lpd3d10);
|
||||
if(res==DD_OK) lpd3d10->Release();
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
hinst = LoadLibrary("d3d11.dll");
|
||||
pD3D11CreateDevice =
|
||||
(D3D11CreateDevice_Type)GetProcAddress(hinst, "D3D11CreateDevice");
|
||||
if(pD3D11CreateDevice){
|
||||
D3D_FEATURE_LEVEL FeatureLevel;
|
||||
ID3D11DeviceContext *pImmediateContext;
|
||||
res = extD3D11CreateDevice(
|
||||
NULL,
|
||||
D3D_DRIVER_TYPE_HARDWARE,
|
||||
NULL,
|
||||
0, // flags
|
||||
NULL, // FeatureLevels
|
||||
0,
|
||||
D3D11_SDK_VERSION,
|
||||
&lpd3d11,
|
||||
&FeatureLevel,
|
||||
&pImmediateContext);
|
||||
if(res==DD_OK) lpd3d11->Release();
|
||||
}
|
||||
pD3D11CreateDeviceAndSwapChain =
|
||||
(D3D11CreateDeviceAndSwapChain_Type)GetProcAddress(hinst, "D3D11CreateDeviceAndSwapChain");
|
||||
break;
|
||||
}
|
||||
if(pDirect3DCreate8 || pDirect3DCreate9) return 1;
|
||||
return 0;
|
||||
@ -190,20 +330,13 @@ HRESULT WINAPI extCreateDevice(void *lpd3d, UINT adapter, D3DDEVTYPE devicetype,
|
||||
D3DDISPLAYMODE mode;
|
||||
int Windowed;
|
||||
|
||||
if(dwD3DVersion == 9){
|
||||
memcpy(param, ppresentparam, 56);
|
||||
OutTraceD("D3D9::CreateDevice\n");
|
||||
}
|
||||
else{
|
||||
memcpy(param, ppresentparam, 52);
|
||||
OutTraceD("D3D8::CreateDevice\n");
|
||||
}
|
||||
|
||||
memcpy(param, ppresentparam, (dwD3DVersion == 9)?56:52);
|
||||
dxw.SethWnd(hfocuswindow);
|
||||
dxw.SetScreenSize(param[0], param[1]);
|
||||
AdjustWindowFrame(dxw.GethWnd(), dxw.GetScreenWidth(), dxw.GetScreenHeight());
|
||||
|
||||
tmp = param;
|
||||
OutTraceD("D3D%d::CreateDevice\n", dwD3DVersion);
|
||||
OutTraceD(" Adapter = %i\n", adapter);
|
||||
OutTraceD(" DeviceType = %i\n", devicetype);
|
||||
OutTraceD(" hFocusWindow = 0x%x\n", hfocuswindow);
|
||||
@ -257,6 +390,11 @@ HRESULT WINAPI extCreateDevice(void *lpd3d, UINT adapter, D3DDEVTYPE devicetype,
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 32), extGetDisplayMode, (void **)&pGetDisplayMode, "GetDisplayMode(D8)");
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 56), extReset, (void **)&pReset, "Reset(D8)");
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 60), extPresent, (void **)&pPresent, "Present(D8)");
|
||||
if(dxw.dwFlags2 & WIREFRAME){
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 200), extSetRenderState, (void **)&pSetRenderState, "SetRenderState(D9)");
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 204), extGetRenderState, (void **)&pGetRenderState, "GetRenderState(D9)");
|
||||
(*pSetRenderState)((void *)*ppd3dd, D3DRS_FILLMODE, D3DFILL_WIREFRAME);
|
||||
}
|
||||
}
|
||||
else {
|
||||
void *pReset;
|
||||
@ -264,6 +402,11 @@ HRESULT WINAPI extCreateDevice(void *lpd3d, UINT adapter, D3DDEVTYPE devicetype,
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 32), extGetDisplayMode, (void **)&pGetDisplayMode, "GetDisplayMode(D9)");
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 64), extReset, (void **)&pReset, "Reset(D9)");
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 68), extPresent, (void **)&pPresent, "Present(D9)");
|
||||
if(dxw.dwFlags2 & WIREFRAME){
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 228), extSetRenderState, (void **)&pSetRenderState, "SetRenderState(D9)");
|
||||
SetHook((void *)(**(DWORD **)ppd3dd + 232), extGetRenderState, (void **)&pGetRenderState, "GetRenderState(D9)");
|
||||
(*pSetRenderState)((void *)*ppd3dd, D3DRS_FILLMODE, D3DFILL_WIREFRAME);
|
||||
}
|
||||
}
|
||||
|
||||
GetHookInfo()->IsFullScreen = dxw.IsFullScreen();
|
||||
@ -275,6 +418,128 @@ HRESULT WINAPI extCreateDevice(void *lpd3d, UINT adapter, D3DDEVTYPE devicetype,
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetRenderState(void *pd3dd, D3DRENDERSTATETYPE State, DWORD Value)
|
||||
{
|
||||
if (State == D3DRS_FILLMODE) Value=D3DFILL_WIREFRAME;
|
||||
return (*pSetRenderState)(pd3dd, State, Value);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetRenderState(void *pd3dd, D3DRENDERSTATETYPE State, DWORD Value)
|
||||
{
|
||||
return (*pGetRenderState)(pd3dd, State, Value);
|
||||
}
|
||||
|
||||
// to do:
|
||||
// hook IDirect3DDevice9::CreateAdditionalSwapChain to intercept Present method on further Swap Chains
|
||||
// hook SetCursorPosition ShowCursor to handle cursor
|
||||
|
||||
|
||||
HRESULT WINAPI extD3D10CreateDevice(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
UINT SDKVersion,
|
||||
ID3D10Device **ppDevice)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("D3D10CreateDevice\n");
|
||||
res=(*pD3D10CreateDevice)(pAdapter, DriverType, Software, Flags, SDKVersion, ppDevice);
|
||||
OutTraceD("D3D10CreateDevice ret=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extD3D10CreateDevice1(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
D3D10_FEATURE_LEVEL1 HardwareLevel,
|
||||
UINT SDKVersion,
|
||||
ID3D10Device **ppDevice)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("D3D10CreateDevice1\n");
|
||||
res=(*pD3D10CreateDevice1)(pAdapter, DriverType, Software, Flags, HardwareLevel, SDKVersion, ppDevice);
|
||||
OutTraceD("D3D10CreateDevice1 ret=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extD3D10CreateDeviceAndSwapChain(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
UINT SDKVersion,
|
||||
DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D10Device **ppDevice)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("D3D10CreateDeviceAndSwapChain\n");
|
||||
pSwapChainDesc->OutputWindow = dxw.GethWnd();
|
||||
pSwapChainDesc->Windowed = true;
|
||||
res=(*pD3D10CreateDeviceAndSwapChain)(pAdapter, DriverType, Software, Flags, SDKVersion, pSwapChainDesc, ppSwapChain, ppDevice);
|
||||
OutTraceD("D3D10CreateDeviceAndSwapChain ret=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extD3D10CreateDeviceAndSwapChain1(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D10_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
UINT SDKVersion,
|
||||
DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D10Device **ppDevice)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("D3D10CreateDeviceAndSwapChain1\n");
|
||||
pSwapChainDesc->OutputWindow = dxw.GethWnd();
|
||||
pSwapChainDesc->Windowed = true;
|
||||
res=(*pD3D10CreateDeviceAndSwapChain1)(pAdapter, DriverType, Software, Flags, SDKVersion, pSwapChainDesc, ppSwapChain, ppDevice);
|
||||
OutTraceD("D3D10CreateDeviceAndSwapChain1 ret=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extD3D11CreateDevice(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
const D3D_FEATURE_LEVEL *pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
ID3D11Device **ppDevice,
|
||||
D3D_FEATURE_LEVEL *pFeatureLevel,
|
||||
ID3D11DeviceContext **ppImmediateContext)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("D3D11CreateDevice\n");
|
||||
res=(*pD3D11CreateDevice)(pAdapter, DriverType, Software, Flags, pFeatureLevels, FeatureLevels, SDKVersion, ppDevice, pFeatureLevel, ppImmediateContext);
|
||||
OutTraceD("D3D11CreateDevice ret=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extD3D11CreateDeviceAndSwapChain(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
const D3D_FEATURE_LEVEL *pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
const DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D11Device **ppDevice,
|
||||
D3D_FEATURE_LEVEL *pFeatureLevel,
|
||||
ID3D11DeviceContext **ppImmediateContext)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD("D3D11CreateDeviceAndSwapChain\n");
|
||||
//res=(*pD3D11CreateDeviceAndSwapChain)(pAdapter, DriverType, Software, Flags, pFeatureLevels, FeatureLevels, SDKVersion, pSwapChainDesc, ppSwapChain, *ppDevice, pFeatureLevel, ppImmediateContext);
|
||||
res=DD_OK;
|
||||
OutTraceD("D3D11CreateDeviceAndSwapChain ret=%x\n", res);
|
||||
return res;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <windows.h>
|
||||
#include <ddraw.h>
|
||||
#include "dxwnd.h"
|
||||
#include "dxhook.h"
|
||||
#include "dxwcore.hpp"
|
||||
#include "stdio.h"
|
||||
#include "hddraw.h"
|
||||
@ -13,6 +14,7 @@
|
||||
#include "dxhelper.h"
|
||||
#include "syslibs.h"
|
||||
|
||||
|
||||
// DirectDraw API
|
||||
HRESULT WINAPI extDirectDrawCreate(GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *);
|
||||
HRESULT WINAPI extDirectDrawCreateEx(GUID FAR *, LPDIRECTDRAW FAR *, REFIID, IUnknown FAR *);
|
||||
@ -529,6 +531,8 @@ HRESULT STDAPICALLTYPE extCoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (*(DWORD *)&rclsid==*(DWORD *)&CLSID_DxDiagProvider) res=HookDxDiag(riid, ppv);
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -549,6 +553,9 @@ int HookDirectDraw(HMODULE module, int version)
|
||||
HINSTANCE hinst;
|
||||
void *tmp;
|
||||
const GUID dd7 = {0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b};
|
||||
//static BOOL DoOnce = FALSE;
|
||||
//if(DoOnce) return 0;
|
||||
//DoOnce=TRUE;
|
||||
|
||||
if(dxw.dwFlags2 & SETCOMPATIBILITY){
|
||||
typedef HRESULT (WINAPI *SetAppCompatData_Type)(DWORD, DWORD);
|
||||
@ -3491,7 +3498,7 @@ HRESULT WINAPI extAddAttachedSurface(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWSURF
|
||||
(res==DDERR_NOEXCLUSIVEMODE))
|
||||
OutTraceD("AddAttachedSurface: emulating BACKBUFFER attach on PRIMARY\n");
|
||||
lpDDSBack=lpddsadd;
|
||||
(*pAddRefS)(lpdds);
|
||||
if (pAddRefS) (*pAddRefS)(lpdds);
|
||||
res=DD_OK;
|
||||
}
|
||||
else if (lpdds == lpDDSBack) {
|
||||
@ -3501,7 +3508,7 @@ HRESULT WINAPI extAddAttachedSurface(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWSURF
|
||||
if (sd.ddsCaps.dwCaps & DDSCAPS_ZBUFFER) // DDSCAPS_BACKBUFFER for double buffering ???
|
||||
if ((dxw.dwFlags1 & EMULATESURFACE) && (res==DDERR_CANNOTATTACHSURFACE)){
|
||||
OutTraceD("AddAttachedSurface: emulating ZBUFFER attach on BACKBUFFER\n");
|
||||
(*pAddRefS)(lpdds);
|
||||
if (pAddRefS) (*pAddRefS)(lpdds);
|
||||
res=DD_OK;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <dxdiag.h>
|
||||
|
||||
typedef HRESULT (WINAPI *DirectDrawCreate_Type)(GUID *, LPDIRECTDRAW *, IUnknown *);
|
||||
typedef HRESULT (WINAPI *DirectDrawCreateEx_Type)(GUID *, LPDIRECTDRAW *, REFIID, IUnknown *);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerate_Type)(LPDDENUMCALLBACK, LPVOID);
|
||||
|
137
dll/syslibs.cpp
137
dll/syslibs.cpp
@ -432,8 +432,10 @@ BOOL WINAPI extGetCursorPos(LPPOINT lppoint)
|
||||
prev=*lppoint;
|
||||
*lppoint=dxw.ScreenToClient(*lppoint);
|
||||
*lppoint=dxw.FixCursorPos(*lppoint);
|
||||
GetHookInfo()->CursorX=(short)lppoint->x;
|
||||
GetHookInfo()->CursorY=(short)lppoint->y;
|
||||
OutTraceC("GetCursorPos: FIXED pos=(%d,%d)->(%d,%d)\n", prev.x, prev.y, lppoint->x, lppoint->y);
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1490,87 +1492,22 @@ char *SysNames2[SYSLIBIDX_MAX]={
|
||||
extern void HookModule(HMODULE, int);
|
||||
extern void HookSysLibs(HMODULE);
|
||||
|
||||
HMODULE WINAPI extLoadLibraryA(LPCTSTR lpFileName)
|
||||
{
|
||||
HMODULE libhandle;
|
||||
int idx;
|
||||
char *lpName, *lpNext;
|
||||
libhandle=(*pLoadLibraryA)(lpFileName);
|
||||
OutTraceD("LoadLibraryA: FileName=%s hmodule=%x\n", lpFileName, libhandle);
|
||||
if(!libhandle){
|
||||
OutTraceE("LoadLibraryExA: ERROR FileName=%s err=%d\n", lpFileName, GetLastError());
|
||||
return libhandle;
|
||||
}
|
||||
lpName=(char *)lpFileName;
|
||||
while (lpNext=strchr(lpName,'\\')) lpName=lpNext+1;
|
||||
for(idx=0; idx<SYSLIBIDX_MAX; idx++){
|
||||
if(
|
||||
(!lstrcmpi(lpName,SysNames[idx])) ||
|
||||
(!lstrcmpi(lpName,SysNames2[idx]))
|
||||
){
|
||||
OutTraceD("LoadLibraryA: registered hmodule=%x->FileName=%s\n", libhandle, lpFileName);
|
||||
SysLibs[idx]=libhandle;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// handle custom OpenGL library
|
||||
if(!lstrcmpi(lpName,dxw.CustomOpenGLLib)){
|
||||
idx=SYSLIBIDX_OPENGL;
|
||||
SysLibs[idx]=libhandle;
|
||||
}
|
||||
|
||||
// don't hook target libraries, hook all the remaining ones!
|
||||
if(idx==SYSLIBIDX_MAX) HookModule(libhandle, 0);
|
||||
return libhandle;
|
||||
}
|
||||
|
||||
HMODULE WINAPI extLoadLibraryW(LPCWSTR lpFileName)
|
||||
{
|
||||
#if 0
|
||||
HMODULE ret;
|
||||
int idx;
|
||||
LPCWSTR lpName, lpNext;
|
||||
ret=(*pLoadLibraryW)(lpFileName);
|
||||
OutTraceD("LoadLibraryW: FileName=%s hmodule=%x\n", lpFileName, ret);
|
||||
lpName=lpFileName;
|
||||
while (lpNext=wcschr(lpName,(WCHAR)'\\')) lpName=lpNext+1;
|
||||
for(idx=0; idx<SYSLIBIDX_MAX; idx++){
|
||||
if(
|
||||
(!lstrcmpiW(lpName,(LPCWSTR)SysNames[idx])) ||
|
||||
(!lstrcmpiW(lpName,(LPCWSTR)SysNames2[idx]))
|
||||
){
|
||||
OutTraceD("LoadLibraryA: registered hmodule=%x->FileName=%s\n", ret, lpFileName);
|
||||
SysLibs[idx]=ret;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// handle custom OpenGL library
|
||||
if(!lstrcmpiW(lpName,(LPCWSTR)dxw.CustomOpenGLLib)){
|
||||
idx=SYSLIBIDX_OPENGL;
|
||||
SysLibs[idx]=ret;
|
||||
}
|
||||
char sName[81];
|
||||
wcstombs(sName, lpName, 80);
|
||||
HookModule(sName, 0);
|
||||
return ret;
|
||||
#else
|
||||
char sFileName[256+1];
|
||||
wcstombs(sFileName, lpFileName, 80);
|
||||
return extLoadLibraryA(sFileName);
|
||||
#endif
|
||||
}
|
||||
|
||||
HMODULE WINAPI extLoadLibraryExA(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags)
|
||||
HMODULE WINAPI LoadLibraryExWrapper(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags, char *api)
|
||||
{
|
||||
HMODULE libhandle;
|
||||
int idx;
|
||||
char *lpName, *lpNext;
|
||||
libhandle=(*pLoadLibraryExA)(lpFileName, hFile, dwFlags);
|
||||
OutTraceD("LoadLibraryExA: FileName=%s hFile=%x Flags=%x hmodule=%x\n", lpFileName, hFile, dwFlags, libhandle);
|
||||
OutTraceD("%s: FileName=%s hFile=%x Flags=%x(%s) hmodule=%x\n", api, lpFileName, hFile, dwFlags, ExplainLoadLibFlags(dwFlags), libhandle);
|
||||
if(!libhandle){
|
||||
OutTraceE("LoadLibraryExA: ERROR FileName=%s err=%d\n", lpFileName, GetLastError());
|
||||
OutTraceE("%s: ERROR FileName=%s err=%d\n", api, lpFileName, GetLastError());
|
||||
return libhandle;
|
||||
}
|
||||
|
||||
// when loaded with LOAD_LIBRARY_AS_DATAFILE or LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE flags,
|
||||
// there's no symbol map, then itìs no possible to hook function calls.
|
||||
if(dwFlags & (LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE|LOAD_LIBRARY_AS_DATAFILE)) return libhandle;
|
||||
|
||||
lpName=(char *)lpFileName;
|
||||
while (lpNext=strchr(lpName,'\\')) lpName=lpNext+1;
|
||||
for(idx=0; idx<SYSLIBIDX_MAX; idx++){
|
||||
@ -1578,7 +1515,7 @@ HMODULE WINAPI extLoadLibraryExA(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags
|
||||
(!lstrcmpi(lpName,SysNames[idx])) ||
|
||||
(!lstrcmpi(lpName,SysNames2[idx]))
|
||||
){
|
||||
OutTraceD("LoadLibraryExA: registered hmodule=%x->FileName=%s\n", libhandle, lpFileName);
|
||||
OutTraceD("%s: registered hmodule=%x->FileName=%s\n", api, libhandle, lpFileName);
|
||||
SysLibs[idx]=libhandle;
|
||||
break;
|
||||
}
|
||||
@ -1592,40 +1529,28 @@ HMODULE WINAPI extLoadLibraryExA(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags
|
||||
return libhandle;
|
||||
}
|
||||
|
||||
HMODULE WINAPI extLoadLibraryExW(LPCWSTR lpFileName, HANDLE hFile, DWORD dwFlags)
|
||||
HMODULE WINAPI extLoadLibraryA(LPCTSTR lpFileName)
|
||||
{
|
||||
return LoadLibraryExWrapper(lpFileName, NULL, 0, "LoadLibraryA");
|
||||
}
|
||||
|
||||
HMODULE WINAPI extLoadLibraryW(LPCWSTR lpFileName)
|
||||
{
|
||||
#if 0
|
||||
HMODULE ret;
|
||||
int idx;
|
||||
LPCWSTR lpName, lpNext;
|
||||
ret=(*pLoadLibraryExW)(lpFileName, hFile, dwFlags);
|
||||
OutTraceD("LoadLibraryExW: FileName=%s hFile=%x Flags=%x hmodule=%x\n", lpFileName, hFile, dwFlags, ret);
|
||||
lpName=lpFileName;
|
||||
while (lpNext=wcschr(lpName,(WCHAR)'\\')) lpName=lpNext+1;
|
||||
for(idx=0; idx<SYSLIBIDX_MAX; idx++){
|
||||
if(
|
||||
(!lstrcmpiW(lpName,(LPCWSTR)SysNames[idx])) ||
|
||||
(!lstrcmpiW(lpName,(LPCWSTR)SysNames2[idx]))
|
||||
){
|
||||
OutTraceD("LoadLibraryExW: registered hmodule=%x->FileName=%s\n", ret, lpFileName);
|
||||
SysLibs[idx]=ret;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// handle custom OpenGL library
|
||||
if(!lstrcmpiW(lpName,(LPCWSTR)dxw.CustomOpenGLLib)){
|
||||
idx=SYSLIBIDX_OPENGL;
|
||||
SysLibs[idx]=ret;
|
||||
}
|
||||
char sName[81];
|
||||
wcstombs(sName, lpName, 80);
|
||||
HookModule(sName, 0);
|
||||
return ret;
|
||||
#else
|
||||
char sFileName[256+1];
|
||||
wcstombs(sFileName, lpFileName, 80);
|
||||
return extLoadLibraryExA(sFileName, hFile, dwFlags);
|
||||
#endif
|
||||
return LoadLibraryExWrapper(sFileName, NULL, 0, "LoadLibraryW");;
|
||||
}
|
||||
|
||||
HMODULE WINAPI extLoadLibraryExA(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags)
|
||||
{
|
||||
return LoadLibraryExWrapper(lpFileName, hFile, dwFlags, "LoadLibraryExA");
|
||||
}
|
||||
|
||||
HMODULE WINAPI extLoadLibraryExW(LPCWSTR lpFileName, HANDLE hFile, DWORD dwFlags)
|
||||
{
|
||||
char sFileName[256+1];
|
||||
wcstombs(sFileName, lpFileName, 80);
|
||||
return LoadLibraryExWrapper(sFileName, hFile, dwFlags, "LoadLibraryExW");;
|
||||
}
|
||||
|
||||
extern DirectDrawCreate_Type pDirectDrawCreate;
|
||||
|
@ -52,22 +52,6 @@ BOOL ListProcessModules(BOOL hook)
|
||||
extern void HookSysLibs(HMODULE);
|
||||
if(hook) HookSysLibs((HMODULE)me32.modBaseAddr);
|
||||
|
||||
// if(strcmp("kernel32.dll", me32.szModule) && ("user32.dll", me32.szModule))
|
||||
// HookSysLibs((HMODULE)me32.modBaseAddr);
|
||||
//}
|
||||
//DO NOT COMPILE THIS !!!!
|
||||
//if(hook){
|
||||
// //HookModule((HMODULE)me32.modBaseAddr, dxw.dwTargetDDVersion);
|
||||
// if(!lstrcmpi("OpenGl32.dll", me32.szModule)){
|
||||
// MessageBox(0, "Got OpenGl", me32.szModule, MB_OK | MB_ICONEXCLAMATION);
|
||||
// //HookOpenGLLibs((HMODULE)me32.modBaseAddr, dxw.CustomOpenGLLib);
|
||||
// }
|
||||
//}
|
||||
//if(!strcmp(me32.szModule, "ref_gl.dll")) {
|
||||
// HookOpenGLLibs((HMODULE)me32.modBaseAddr, dxw.CustomOpenGLLib);
|
||||
// DumpImportTable((HMODULE)me32.modBaseAddr);
|
||||
//}
|
||||
|
||||
if (IsDebug) DumpImportTable((HMODULE)me32.modBaseAddr);
|
||||
} while( Module32Next( hModuleSnap, &me32 ) );
|
||||
// Do not forget to clean up the snapshot object.
|
||||
|
@ -43,6 +43,8 @@
|
||||
#define IDC_DIRECTX8 303
|
||||
#define IDC_DIRECTX9 304
|
||||
#define IDC_NODIRECTX 305
|
||||
#define IDC_DIRECTX10 306
|
||||
#define IDC_DIRECTX11 307
|
||||
#define IDC_FILE 1000
|
||||
#define IDC_OPEN 1001
|
||||
#define IDC_UNNOTIFY 1007
|
||||
@ -145,6 +147,7 @@
|
||||
#define IDC_DISABLEGAMMARAMP 1095
|
||||
#define IDC_FORCEWINRESIZE 1096
|
||||
#define IDC_TIMESLIDER 1097
|
||||
#define IDC_FORCEHOOKOPENGL 1098
|
||||
#define ID_MODIFY 32771
|
||||
#define ID_DELETE 32772
|
||||
#define ID_ADD 32773
|
||||
|
@ -64,12 +64,14 @@ void CStatusDialog::OnTimer(UINT_PTR nIDEvent)
|
||||
"DxWnd %s\nHook status: %s\n"
|
||||
"Running \"%s\"\nScreen = (%dx%d) %dBPP\n"
|
||||
"FullScreen = %s\nDX version = %d\n"
|
||||
"Logging = %s",
|
||||
"Logging = %s\n"
|
||||
"Cursor = (%d,%d)",
|
||||
DllVersion, Status,
|
||||
pTitles[DxWndStatus.TaskIdx].title,
|
||||
DxWndStatus.Width, DxWndStatus.Height, DxWndStatus.ColorDepth,
|
||||
DxWndStatus.IsFullScreen ? "Yes":"No", DxWndStatus.DXVersion,
|
||||
DxWndStatus.isLogging?"ON":"OFF");
|
||||
DxWndStatus.isLogging?"ON":"OFF",
|
||||
DxWndStatus.CursorX, DxWndStatus.CursorY);
|
||||
if(Target->flags2 & (SHOWFPS|SHOWFPSOVERLAY)){
|
||||
sprintf(sMsgBuf, "\nFPS = %d", DxWndStatus.FPSCount);
|
||||
strcat(sMsg, sMsgBuf);
|
||||
|
@ -38,7 +38,6 @@ void CTabDirectX::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_VIDEOTOSYSTEMMEM, cTarget->m_VideoToSystemMem);
|
||||
DDX_Check(pDX, IDC_USERGB565, cTarget->m_UseRGB565);
|
||||
DDX_Check(pDX, IDC_SUPPRESSDXERRORS, cTarget->m_SuppressDXErrors);
|
||||
DDX_Check(pDX, IDC_CLIENTREMAPPING, cTarget->m_ClientRemapping);
|
||||
DDX_Check(pDX, IDC_MAPGDITOPRIMARY, cTarget->m_MapGDIToPrimary);
|
||||
DDX_Check(pDX, IDC_BACKBUFATTACH, cTarget->m_BackBufAttach);
|
||||
DDX_Check(pDX, IDC_FULLRECTBLT, cTarget->m_FullRectBlt);
|
||||
|
@ -27,7 +27,7 @@ void CTabOpenGL::DoDataExchange(CDataExchange* pDX)
|
||||
CDialog::DoDataExchange(pDX);
|
||||
CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent()));
|
||||
DDX_Check(pDX, IDC_HOOKOPENGL, cTarget->m_HookOpenGL);
|
||||
DDX_Check(pDX, IDC_WIREFRAME, cTarget->m_WireFrame);
|
||||
DDX_Check(pDX, IDC_FORCEHOOKOPENGL, cTarget->m_ForceHookOpenGL);
|
||||
DDX_Text(pDX, IDC_OPENGLLIB, cTarget->m_OpenGLLib);
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,10 @@ void CTabProgram::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_WINDOWIZE, cTarget->m_Windowize);
|
||||
DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner);
|
||||
DDX_Check(pDX, IDC_STARTDEBUG, cTarget->m_StartDebug);
|
||||
DDX_Check(pDX, IDC_CLIENTREMAPPING, cTarget->m_ClientRemapping);
|
||||
DDX_Check(pDX, IDC_SAVELOAD, cTarget->m_SaveLoad);
|
||||
DDX_Check(pDX, IDC_HANDLEALTF4, cTarget->m_HandleAltF4);
|
||||
DDX_Check(pDX, IDC_WIREFRAME, cTarget->m_WireFrame);
|
||||
DDX_Text(pDX, IDC_POSX, cTarget->m_PosX);
|
||||
DDX_Text(pDX, IDC_POSY, cTarget->m_PosY);
|
||||
DDX_Text(pDX, IDC_SIZX, cTarget->m_SizX);
|
||||
|
@ -87,6 +87,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
||||
m_ShowFPSOverlay = FALSE;
|
||||
m_TimeStretch = FALSE;
|
||||
m_HookOpenGL = FALSE;
|
||||
m_ForceHookOpenGL = FALSE;
|
||||
m_FakeVersion = FALSE;
|
||||
m_FullRectBlt = FALSE;
|
||||
m_NoPaletteUpdate = FALSE;
|
||||
|
@ -92,6 +92,7 @@ public:
|
||||
BOOL m_ShowFPSOverlay;
|
||||
BOOL m_TimeStretch;
|
||||
BOOL m_HookOpenGL;
|
||||
BOOL m_ForceHookOpenGL;
|
||||
BOOL m_FakeVersion;
|
||||
BOOL m_FullRectBlt;
|
||||
BOOL m_NoPaletteUpdate;
|
||||
|
Binary file not shown.
@ -240,25 +240,27 @@ BEGIN
|
||||
LTEXT "Name:",IDC_STATIC,7,9,77,9
|
||||
EDITTEXT IDC_FILE,7,54,162,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_MODULE,7,85,162,14,ES_AUTOHSCROLL
|
||||
LTEXT "Hooked Module:",IDC_STATIC,7,73,77,9
|
||||
LTEXT "Additional Hooked Modules:",IDC_STATIC,7,73,125,9
|
||||
LTEXT "Path:",IDC_STATIC,7,42,77,9
|
||||
PUSHBUTTON "...",IDC_OPEN,176,53,13,16
|
||||
LTEXT "Window initial position && size",IDC_STATIC,10,184,115,9
|
||||
LTEXT "X",IDC_STATIC,10,200,9,9
|
||||
LTEXT "Y",IDC_STATIC,41,200,9,9
|
||||
LTEXT "W",IDC_STATIC,69,200,9,9
|
||||
LTEXT "H",IDC_STATIC,99,200,9,9
|
||||
EDITTEXT IDC_POSX,18,196,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
|
||||
EDITTEXT IDC_POSY,47,196,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
|
||||
EDITTEXT IDC_SIZX,77,196,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT
|
||||
EDITTEXT IDC_SIZY,105,196,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT
|
||||
LTEXT "Window initial position && size",IDC_STATIC,18,198,115,9
|
||||
LTEXT "X",IDC_STATIC,18,214,9,9
|
||||
LTEXT "Y",IDC_STATIC,49,214,9,9
|
||||
LTEXT "W",IDC_STATIC,77,214,9,9
|
||||
LTEXT "H",IDC_STATIC,107,214,9,9
|
||||
EDITTEXT IDC_POSX,26,210,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
|
||||
EDITTEXT IDC_POSY,55,210,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
|
||||
EDITTEXT IDC_SIZX,85,210,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT
|
||||
EDITTEXT IDC_SIZY,113,210,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT
|
||||
CONTROL "Do not notify on task switch",IDC_UNNOTIFY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,112,124,12
|
||||
CONTROL "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,122,123,12
|
||||
CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,132,109,12
|
||||
CONTROL "Run in Window",IDC_WINDOWIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,142,124,12
|
||||
GROUPBOX "Generic",IDC_STATIC,7,103,140,75
|
||||
CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,152,124,12
|
||||
CONTROL "use DLL Injection",IDC_STARTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,162,124,12
|
||||
GROUPBOX "Generic",IDC_STATIC,7,103,286,88
|
||||
CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,122,108,12
|
||||
CONTROL "use DLL Injection",IDC_STARTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,132,100,12
|
||||
CONTROL "3D Wireframe",IDC_WIREFRAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,142,115,12
|
||||
CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,112,115,10
|
||||
END
|
||||
|
||||
IDD_TAB_LOG DIALOGEX 0, 0, 300, 240
|
||||
@ -286,12 +288,14 @@ BEGIN
|
||||
CONTROL "DirectX7",IDC_DIRECTX7,"Button",BS_AUTORADIOBUTTON,14,37,48,12
|
||||
CONTROL "DirectX8",IDC_DIRECTX8,"Button",BS_AUTORADIOBUTTON,14,48,48,12
|
||||
CONTROL "DirectX9",IDC_DIRECTX9,"Button",BS_AUTORADIOBUTTON,14,59,47,12
|
||||
CONTROL "None",IDC_NODIRECTX,"Button",BS_AUTORADIOBUTTON,14,71,71,12
|
||||
CONTROL "None",IDC_NOEMULATESURFACE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,14,99,77,12
|
||||
CONTROL "Primary Surface",IDC_EMULATESURFACE,"Button",BS_AUTORADIOBUTTON,14,122,77,12
|
||||
CONTROL "Primary Buffer",IDC_EMULATEBUFFER,"Button",BS_AUTORADIOBUTTON,14,110,67,12
|
||||
GROUPBOX "DirectX Version Hook",IDC_STATIC,6,3,98,83,WS_GROUP
|
||||
GROUPBOX "Emulation",IDC_STATIC,6,88,98,49,WS_GROUP
|
||||
CONTROL "DirectX10",IDC_DIRECTX10,"Button",BS_AUTORADIOBUTTON,14,70,47,12
|
||||
CONTROL "DirectX11",IDC_DIRECTX11,"Button",BS_AUTORADIOBUTTON,14,81,47,12
|
||||
CONTROL "None",IDC_NODIRECTX,"Button",BS_AUTORADIOBUTTON,14,92,71,12
|
||||
CONTROL "None",IDC_NOEMULATESURFACE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,14,131,77,12
|
||||
CONTROL "Primary Surface",IDC_EMULATESURFACE,"Button",BS_AUTORADIOBUTTON,14,154,77,12
|
||||
CONTROL "Primary Buffer",IDC_EMULATEBUFFER,"Button",BS_AUTORADIOBUTTON,14,142,67,12
|
||||
GROUPBOX "DirectX Version Hook",IDC_STATIC,6,3,98,103,WS_GROUP
|
||||
GROUPBOX "Emulation",IDC_STATIC,6,120,98,49,WS_GROUP
|
||||
CONTROL "Handle DC",IDC_HANDLEDC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,25,78,12
|
||||
CONTROL "Auto Primary Surface Refresh",IDC_AUTOREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,38,126,9
|
||||
GROUPBOX "DirectDraw Surface handling",IDC_STATIC,112,3,181,167
|
||||
@ -299,7 +303,6 @@ BEGIN
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,118,61,126,9
|
||||
CONTROL "Set 16BPP RGB565 encoding",IDC_USERGB565,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,50,126,9
|
||||
CONTROL "Suppress DX common errors",IDC_SUPPRESSDXERRORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,73,127,10
|
||||
CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,85,119,10
|
||||
CONTROL "Map GDI HDC to Primary DC",IDC_MAPGDITOPRIMARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,15,119,10
|
||||
CONTROL "Make Backbuf attachable",IDC_BACKBUFATTACH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,96,119,10
|
||||
CONTROL "Blit from BackBuffer",IDC_BLITFROMBACKBUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,107,119,10
|
||||
@ -395,7 +398,7 @@ BEGIN
|
||||
LTEXT "Custom OpenGL library",IDC_STATIC,15,39,110,9
|
||||
CONTROL "Hook OpenGL",IDC_HOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,15,115,10
|
||||
EDITTEXT IDC_OPENGLLIB,13,51,126,14,ES_AUTOHSCROLL
|
||||
CONTROL "Show Wireframe",IDC_WIREFRAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,25,115,10
|
||||
CONTROL "Force Hook",IDC_FORCEHOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,25,115,10
|
||||
END
|
||||
|
||||
IDD_TAB_COMPAT DIALOGEX 0, 0, 300, 240
|
||||
|
Binary file not shown.
@ -122,6 +122,12 @@ void CDxwndhostView::SaveConfigFile()
|
||||
sprintf_s(key, sizeof(key), "flagg%i", i);
|
||||
sprintf_s(val, sizeof(val), "%i", TargetMaps[i].flags2);
|
||||
WritePrivateProfileString("target", key, val, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagh%i", i);
|
||||
sprintf_s(val, sizeof(val), "%i", TargetMaps[i].flags3);
|
||||
WritePrivateProfileString("target", key, val, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagi%i", i);
|
||||
sprintf_s(val, sizeof(val), "%i", TargetMaps[i].flags4);
|
||||
WritePrivateProfileString("target", key, val, InitPath);
|
||||
sprintf_s(key, sizeof(key), "tflag%i", i);
|
||||
sprintf_s(val, sizeof(val), "%i", TargetMaps[i].tflags);
|
||||
WritePrivateProfileString("target", key, val, InitPath);
|
||||
@ -171,6 +177,10 @@ void CDxwndhostView::SaveConfigFile()
|
||||
WritePrivateProfileString("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagg%i", i);
|
||||
WritePrivateProfileString("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagh%i", i);
|
||||
WritePrivateProfileString("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagi%i", i);
|
||||
WritePrivateProfileString("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "tflag%i", i);
|
||||
WritePrivateProfileString("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "initx%i", i);
|
||||
@ -281,6 +291,10 @@ void CDxwndhostView::OnInitialUpdate()
|
||||
TargetMaps[i].flags = GetPrivateProfileInt("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagg%i", i);
|
||||
TargetMaps[i].flags2 = GetPrivateProfileInt("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagh%i", i);
|
||||
TargetMaps[i].flags3 = GetPrivateProfileInt("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "flagi%i", i);
|
||||
TargetMaps[i].flags4 = GetPrivateProfileInt("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "tflag%i", i);
|
||||
TargetMaps[i].tflags = GetPrivateProfileInt("target", key, 0, InitPath);
|
||||
sprintf_s(key, sizeof(key), "initx%i", i);
|
||||
@ -440,6 +454,7 @@ void CDxwndhostView::OnModify()
|
||||
dlg.m_ShowFPSOverlay = TargetMaps[i].flags2 & SHOWFPSOVERLAY ? 1 : 0;
|
||||
dlg.m_TimeStretch = TargetMaps[i].flags2 & TIMESTRETCH ? 1 : 0;
|
||||
dlg.m_HookOpenGL = TargetMaps[i].flags2 & HOOKOPENGL ? 1 : 0;
|
||||
dlg.m_ForceHookOpenGL = TargetMaps[i].flags3 & FORCEHOOKOPENGL ? 1 : 0;
|
||||
dlg.m_WireFrame = TargetMaps[i].flags2 & WIREFRAME ? 1 : 0;
|
||||
dlg.m_FakeVersion = TargetMaps[i].flags2 & FAKEVERSION ? 1 : 0;
|
||||
dlg.m_FullRectBlt = TargetMaps[i].flags2 & FULLRECTBLT ? 1 : 0;
|
||||
@ -466,6 +481,8 @@ void CDxwndhostView::OnModify()
|
||||
TargetMaps[i].dxversion = dlg.m_DXVersion;
|
||||
TargetMaps[i].flags = 0;
|
||||
TargetMaps[i].flags2 = 0;
|
||||
TargetMaps[i].flags3 = 0;
|
||||
TargetMaps[i].flags4 = 0;
|
||||
TargetMaps[i].tflags = 0;
|
||||
if(dlg.m_UnNotify) TargetMaps[i].flags |= UNNOTIFY;
|
||||
if(dlg.m_Windowize) TargetMaps[i].flags2 |= WINDOWIZE;
|
||||
@ -548,6 +565,7 @@ void CDxwndhostView::OnModify()
|
||||
if(dlg.m_ShowFPSOverlay) TargetMaps[i].flags2 |= SHOWFPSOVERLAY;
|
||||
if(dlg.m_TimeStretch) TargetMaps[i].flags2 |= TIMESTRETCH;
|
||||
if(dlg.m_HookOpenGL) TargetMaps[i].flags2 |= HOOKOPENGL;
|
||||
if(dlg.m_ForceHookOpenGL) TargetMaps[i].flags3 |= FORCEHOOKOPENGL;
|
||||
if(dlg.m_WireFrame) TargetMaps[i].flags2 |= WIREFRAME;
|
||||
if(dlg.m_FakeVersion) TargetMaps[i].flags2 |= FAKEVERSION;
|
||||
if(dlg.m_FullRectBlt) TargetMaps[i].flags2 |= FULLRECTBLT;
|
||||
@ -849,6 +867,7 @@ void CDxwndhostView::OnAdd()
|
||||
if(dlg.m_ShowFPSOverlay) TargetMaps[i].flags2 |= SHOWFPSOVERLAY;
|
||||
if(dlg.m_TimeStretch) TargetMaps[i].flags2 |= TIMESTRETCH;
|
||||
if(dlg.m_HookOpenGL) TargetMaps[i].flags2 |= HOOKOPENGL;
|
||||
if(dlg.m_ForceHookOpenGL) TargetMaps[i].flags3 |= FORCEHOOKOPENGL;
|
||||
if(dlg.m_WireFrame) TargetMaps[i].flags2 |= WIREFRAME;
|
||||
if(dlg.m_FakeVersion) TargetMaps[i].flags2 |= FAKEVERSION;
|
||||
if(dlg.m_FullRectBlt) TargetMaps[i].flags2 |= FULLRECTBLT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user