mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
add D3D12 headers because they're missing in mingw
This commit is contained in:
parent
383983ef9d
commit
3dff608c7b
10 changed files with 30450 additions and 5 deletions
1
Makefile
1
Makefile
|
@ -553,6 +553,7 @@ ifeq ($(WINDOW_API),DXGI)
|
||||||
BACKEND_LDFLAGS += -ld3d11
|
BACKEND_LDFLAGS += -ld3d11
|
||||||
else ifeq ($(RENDER_API),D3D12)
|
else ifeq ($(RENDER_API),D3D12)
|
||||||
BACKEND_LDFLAGS += -ld3d12
|
BACKEND_LDFLAGS += -ld3d12
|
||||||
|
BACKEND_CFLAGS += -Iinclude/dxsdk
|
||||||
endif
|
endif
|
||||||
BACKEND_LDFLAGS += -ld3dcompiler -ldxgi -ldxguid
|
BACKEND_LDFLAGS += -ld3dcompiler -ldxgi -ldxguid
|
||||||
BACKEND_LDFLAGS += -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -static
|
BACKEND_LDFLAGS += -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -static
|
||||||
|
|
17258
include/dxsdk/d3d12.h
Normal file
17258
include/dxsdk/d3d12.h
Normal file
File diff suppressed because it is too large
Load diff
3230
include/dxsdk/d3d12sdklayers.h
Normal file
3230
include/dxsdk/d3d12sdklayers.h
Normal file
File diff suppressed because it is too large
Load diff
459
include/dxsdk/d3d12shader.h
Normal file
459
include/dxsdk/d3d12shader.h
Normal file
|
@ -0,0 +1,459 @@
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
//
|
||||||
|
// File: D3D12Shader.h
|
||||||
|
// Content: D3D12 Shader Types and APIs
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __D3D12SHADER_H__
|
||||||
|
#define __D3D12SHADER_H__
|
||||||
|
|
||||||
|
#include "d3dcommon.h"
|
||||||
|
|
||||||
|
typedef enum D3D12_SHADER_VERSION_TYPE
|
||||||
|
{
|
||||||
|
D3D12_SHVER_PIXEL_SHADER = 0,
|
||||||
|
D3D12_SHVER_VERTEX_SHADER = 1,
|
||||||
|
D3D12_SHVER_GEOMETRY_SHADER = 2,
|
||||||
|
|
||||||
|
// D3D11 Shaders
|
||||||
|
D3D12_SHVER_HULL_SHADER = 3,
|
||||||
|
D3D12_SHVER_DOMAIN_SHADER = 4,
|
||||||
|
D3D12_SHVER_COMPUTE_SHADER = 5,
|
||||||
|
|
||||||
|
D3D12_SHVER_RESERVED0 = 0xFFF0,
|
||||||
|
} D3D12_SHADER_VERSION_TYPE;
|
||||||
|
|
||||||
|
#define D3D12_SHVER_GET_TYPE(_Version) \
|
||||||
|
(((_Version) >> 16) & 0xffff)
|
||||||
|
#define D3D12_SHVER_GET_MAJOR(_Version) \
|
||||||
|
(((_Version) >> 4) & 0xf)
|
||||||
|
#define D3D12_SHVER_GET_MINOR(_Version) \
|
||||||
|
(((_Version) >> 0) & 0xf)
|
||||||
|
|
||||||
|
// Slot ID for library function return
|
||||||
|
#define D3D_RETURN_PARAMETER_INDEX (-1)
|
||||||
|
|
||||||
|
typedef D3D_RESOURCE_RETURN_TYPE D3D12_RESOURCE_RETURN_TYPE;
|
||||||
|
|
||||||
|
typedef D3D_CBUFFER_TYPE D3D12_CBUFFER_TYPE;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _D3D12_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 D3D_MASK_* values)
|
||||||
|
UINT Stream; // Stream index
|
||||||
|
D3D_MIN_PRECISION MinPrecision; // Minimum desired interpolation precision
|
||||||
|
} D3D12_SIGNATURE_PARAMETER_DESC;
|
||||||
|
|
||||||
|
typedef struct _D3D12_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
|
||||||
|
} D3D12_SHADER_BUFFER_DESC;
|
||||||
|
|
||||||
|
typedef struct _D3D12_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.
|
||||||
|
} D3D12_SHADER_VARIABLE_DESC;
|
||||||
|
|
||||||
|
typedef struct _D3D12_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
|
||||||
|
} D3D12_SHADER_TYPE_DESC;
|
||||||
|
|
||||||
|
typedef D3D_TESSELLATOR_DOMAIN D3D12_TESSELLATOR_DOMAIN;
|
||||||
|
|
||||||
|
typedef D3D_TESSELLATOR_PARTITIONING D3D12_TESSELLATOR_PARTITIONING;
|
||||||
|
|
||||||
|
typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D12_TESSELLATOR_OUTPUT_PRIMITIVE;
|
||||||
|
|
||||||
|
typedef struct _D3D12_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
|
||||||
|
} D3D12_SHADER_DESC;
|
||||||
|
|
||||||
|
typedef struct _D3D12_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)
|
||||||
|
UINT Space; // Register space
|
||||||
|
UINT uID; // Range ID in the bytecode
|
||||||
|
} D3D12_SHADER_INPUT_BIND_DESC;
|
||||||
|
|
||||||
|
#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001
|
||||||
|
#define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002
|
||||||
|
#define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004
|
||||||
|
#define D3D_SHADER_REQUIRES_64_UAVS 0x00000008
|
||||||
|
#define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010
|
||||||
|
#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020
|
||||||
|
#define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040
|
||||||
|
#define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080
|
||||||
|
#define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100
|
||||||
|
#define D3D_SHADER_REQUIRES_STENCIL_REF 0x00000200
|
||||||
|
#define D3D_SHADER_REQUIRES_INNER_COVERAGE 0x00000400
|
||||||
|
#define D3D_SHADER_REQUIRES_TYPED_UAV_LOAD_ADDITIONAL_FORMATS 0x00000800
|
||||||
|
#define D3D_SHADER_REQUIRES_ROVS 0x00001000
|
||||||
|
#define D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x00002000
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _D3D12_LIBRARY_DESC
|
||||||
|
{
|
||||||
|
LPCSTR Creator; // The name of the originator of the library.
|
||||||
|
UINT Flags; // Compilation flags.
|
||||||
|
UINT FunctionCount; // Number of functions exported from the library.
|
||||||
|
} D3D12_LIBRARY_DESC;
|
||||||
|
|
||||||
|
typedef struct _D3D12_FUNCTION_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 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 MovInstructionCount; // Number of mov instructions used
|
||||||
|
UINT MovcInstructionCount; // Number of movc instructions used
|
||||||
|
UINT ConversionInstructionCount; // Number of type conversion instructions used
|
||||||
|
UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used
|
||||||
|
D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code
|
||||||
|
UINT64 RequiredFeatureFlags; // Required feature flags
|
||||||
|
|
||||||
|
LPCSTR Name; // Function name
|
||||||
|
INT FunctionParameterCount; // Number of logical parameters in the function signature (not including return)
|
||||||
|
BOOL HasReturn; // TRUE, if function returns a value, false - it is a subroutine
|
||||||
|
BOOL Has10Level9VertexShader; // TRUE, if there is a 10L9 VS blob
|
||||||
|
BOOL Has10Level9PixelShader; // TRUE, if there is a 10L9 PS blob
|
||||||
|
} D3D12_FUNCTION_DESC;
|
||||||
|
|
||||||
|
typedef struct _D3D12_PARAMETER_DESC
|
||||||
|
{
|
||||||
|
LPCSTR Name; // Parameter name.
|
||||||
|
LPCSTR SemanticName; // Parameter semantic name (+index).
|
||||||
|
D3D_SHADER_VARIABLE_TYPE Type; // Element type.
|
||||||
|
D3D_SHADER_VARIABLE_CLASS Class; // Scalar/Vector/Matrix.
|
||||||
|
UINT Rows; // Rows are for matrix parameters.
|
||||||
|
UINT Columns; // Components or Columns in matrix.
|
||||||
|
D3D_INTERPOLATION_MODE InterpolationMode; // Interpolation mode.
|
||||||
|
D3D_PARAMETER_FLAGS Flags; // Parameter modifiers.
|
||||||
|
|
||||||
|
UINT FirstInRegister; // The first input register for this parameter.
|
||||||
|
UINT FirstInComponent; // The first input register component for this parameter.
|
||||||
|
UINT FirstOutRegister; // The first output register for this parameter.
|
||||||
|
UINT FirstOutComponent; // The first output register component for this parameter.
|
||||||
|
} D3D12_PARAMETER_DESC;
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces ////////////////////////////////////////////////////////////////
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
typedef interface ID3D12ShaderReflectionType ID3D12ShaderReflectionType;
|
||||||
|
typedef interface ID3D12ShaderReflectionType *LPD3D12SHADERREFLECTIONTYPE;
|
||||||
|
|
||||||
|
typedef interface ID3D12ShaderReflectionVariable ID3D12ShaderReflectionVariable;
|
||||||
|
typedef interface ID3D12ShaderReflectionVariable *LPD3D12SHADERREFLECTIONVARIABLE;
|
||||||
|
|
||||||
|
typedef interface ID3D12ShaderReflectionConstantBuffer ID3D12ShaderReflectionConstantBuffer;
|
||||||
|
typedef interface ID3D12ShaderReflectionConstantBuffer *LPD3D12SHADERREFLECTIONCONSTANTBUFFER;
|
||||||
|
|
||||||
|
typedef interface ID3D12ShaderReflection ID3D12ShaderReflection;
|
||||||
|
typedef interface ID3D12ShaderReflection *LPD3D12SHADERREFLECTION;
|
||||||
|
|
||||||
|
typedef interface ID3D12LibraryReflection ID3D12LibraryReflection;
|
||||||
|
typedef interface ID3D12LibraryReflection *LPD3D12LIBRARYREFLECTION;
|
||||||
|
|
||||||
|
typedef interface ID3D12FunctionReflection ID3D12FunctionReflection;
|
||||||
|
typedef interface ID3D12FunctionReflection *LPD3D12FUNCTIONREFLECTION;
|
||||||
|
|
||||||
|
typedef interface ID3D12FunctionParameterReflection ID3D12FunctionParameterReflection;
|
||||||
|
typedef interface ID3D12FunctionParameterReflection *LPD3D12FUNCTIONPARAMETERREFLECTION;
|
||||||
|
|
||||||
|
|
||||||
|
// {E913C351-783D-48CA-A1D1-4F306284AD56}
|
||||||
|
interface DECLSPEC_UUID("E913C351-783D-48CA-A1D1-4F306284AD56") ID3D12ShaderReflectionType;
|
||||||
|
DEFINE_GUID(IID_ID3D12ShaderReflectionType,
|
||||||
|
0xe913c351, 0x783d, 0x48ca, 0xa1, 0xd1, 0x4f, 0x30, 0x62, 0x84, 0xad, 0x56);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12ShaderReflectionType
|
||||||
|
|
||||||
|
DECLARE_INTERFACE(ID3D12ShaderReflectionType)
|
||||||
|
{
|
||||||
|
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_TYPE_DESC *pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ _In_ UINT Index) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||||
|
STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ _In_ UINT Index) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(IsEqual)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionType*, GetSubType)(THIS) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionType*, GetBaseClass)(THIS) PURE;
|
||||||
|
STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionType*, GetInterfaceByIndex)(THIS_ _In_ UINT uIndex) PURE;
|
||||||
|
STDMETHOD(IsOfType)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE;
|
||||||
|
STDMETHOD(ImplementsInterface)(THIS_ _In_ ID3D12ShaderReflectionType* pBase) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// {8337A8A6-A216-444A-B2F4-314733A73AEA}
|
||||||
|
interface DECLSPEC_UUID("8337A8A6-A216-444A-B2F4-314733A73AEA") ID3D12ShaderReflectionVariable;
|
||||||
|
DEFINE_GUID(IID_ID3D12ShaderReflectionVariable,
|
||||||
|
0x8337a8a6, 0xa216, 0x444a, 0xb2, 0xf4, 0x31, 0x47, 0x33, 0xa7, 0x3a, 0xea);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12ShaderReflectionVariable
|
||||||
|
|
||||||
|
DECLARE_INTERFACE(ID3D12ShaderReflectionVariable)
|
||||||
|
{
|
||||||
|
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_VARIABLE_DESC *pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionType*, GetType)(THIS) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetBuffer)(THIS) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ _In_ UINT uArrayIndex) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// {C59598B4-48B3-4869-B9B1-B1618B14A8B7}
|
||||||
|
interface DECLSPEC_UUID("C59598B4-48B3-4869-B9B1-B1618B14A8B7") ID3D12ShaderReflectionConstantBuffer;
|
||||||
|
DEFINE_GUID(IID_ID3D12ShaderReflectionConstantBuffer,
|
||||||
|
0xc59598b4, 0x48b3, 0x4869, 0xb9, 0xb1, 0xb1, 0x61, 0x8b, 0x14, 0xa8, 0xb7);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12ShaderReflectionConstantBuffer
|
||||||
|
|
||||||
|
DECLARE_INTERFACE(ID3D12ShaderReflectionConstantBuffer)
|
||||||
|
{
|
||||||
|
STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_BUFFER_DESC *pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByIndex)(THIS_ _In_ UINT Index) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// The ID3D12ShaderReflection 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.
|
||||||
|
|
||||||
|
// {5A58797D-A72C-478D-8BA2-EFC6B0EFE88E}
|
||||||
|
interface DECLSPEC_UUID("5A58797D-A72C-478D-8BA2-EFC6B0EFE88E") ID3D12ShaderReflection;
|
||||||
|
DEFINE_GUID(IID_ID3D12ShaderReflection,
|
||||||
|
0x5a58797d, 0xa72c, 0x478d, 0x8b, 0xa2, 0xef, 0xc6, 0xb0, 0xef, 0xe8, 0x8e);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12ShaderReflection
|
||||||
|
|
||||||
|
DECLARE_INTERFACE_(ID3D12ShaderReflection, 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_ D3D12_SHADER_DESC *pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ _In_ UINT Index) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex,
|
||||||
|
_Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(GetInputParameterDesc)(THIS_ _In_ UINT ParameterIndex,
|
||||||
|
_Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||||
|
STDMETHOD(GetOutputParameterDesc)(THIS_ _In_ UINT ParameterIndex,
|
||||||
|
_Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||||
|
STDMETHOD(GetPatchConstantParameterDesc)(THIS_ _In_ UINT ParameterIndex,
|
||||||
|
_Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name,
|
||||||
|
_Out_ D3D12_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;
|
||||||
|
|
||||||
|
STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// {8E349D19-54DB-4A56-9DC9-119D87BDB804}
|
||||||
|
interface DECLSPEC_UUID("8E349D19-54DB-4A56-9DC9-119D87BDB804") ID3D12LibraryReflection;
|
||||||
|
DEFINE_GUID(IID_ID3D12LibraryReflection,
|
||||||
|
0x8e349d19, 0x54db, 0x4a56, 0x9d, 0xc9, 0x11, 0x9d, 0x87, 0xbd, 0xb8, 0x4);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12LibraryReflection
|
||||||
|
|
||||||
|
DECLARE_INTERFACE_(ID3D12LibraryReflection, 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_ D3D12_LIBRARY_DESC * pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12FunctionReflection *, GetFunctionByIndex)(THIS_ _In_ INT FunctionIndex) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// {1108795C-2772-4BA9-B2A8-D464DC7E2799}
|
||||||
|
interface DECLSPEC_UUID("1108795C-2772-4BA9-B2A8-D464DC7E2799") ID3D12FunctionReflection;
|
||||||
|
DEFINE_GUID(IID_ID3D12FunctionReflection,
|
||||||
|
0x1108795c, 0x2772, 0x4ba9, 0xb2, 0xa8, 0xd4, 0x64, 0xdc, 0x7e, 0x27, 0x99);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12FunctionReflection
|
||||||
|
|
||||||
|
DECLARE_INTERFACE(ID3D12FunctionReflection)
|
||||||
|
{
|
||||||
|
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_FUNCTION_DESC * pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ _In_ UINT BufferIndex) PURE;
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex,
|
||||||
|
_Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE;
|
||||||
|
|
||||||
|
STDMETHOD_(ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name,
|
||||||
|
_Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE;
|
||||||
|
|
||||||
|
// Use D3D_RETURN_PARAMETER_INDEX to get description of the return value.
|
||||||
|
STDMETHOD_(ID3D12FunctionParameterReflection *, GetFunctionParameter)(THIS_ _In_ INT ParameterIndex) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// {EC25F42D-7006-4F2B-B33E-02CC3375733F}
|
||||||
|
interface DECLSPEC_UUID("EC25F42D-7006-4F2B-B33E-02CC3375733F") ID3D12FunctionParameterReflection;
|
||||||
|
DEFINE_GUID(IID_ID3D12FunctionParameterReflection,
|
||||||
|
0xec25f42d, 0x7006, 0x4f2b, 0xb3, 0x3e, 0x2, 0xcc, 0x33, 0x75, 0x73, 0x3f);
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ID3D12FunctionParameterReflection
|
||||||
|
|
||||||
|
DECLARE_INTERFACE(ID3D12FunctionParameterReflection)
|
||||||
|
{
|
||||||
|
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_PARAMETER_DESC * pDesc) PURE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// APIs //////////////////////////////////////////////////////////////////////
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif //__cplusplus
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif //__cplusplus
|
||||||
|
|
||||||
|
#endif //__D3D12SHADER_H__
|
||||||
|
|
1009
include/dxsdk/d3dcommon.h
Normal file
1009
include/dxsdk/d3dcommon.h
Normal file
File diff suppressed because it is too large
Load diff
586
include/dxsdk/d3dcompiler.h
Normal file
586
include/dxsdk/d3dcompiler.h
Normal file
|
@ -0,0 +1,586 @@
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
//
|
||||||
|
// File: D3DCompiler.h
|
||||||
|
// Content: D3D Compilation Types and APIs
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __D3DCOMPILER_H__
|
||||||
|
#define __D3DCOMPILER_H__
|
||||||
|
|
||||||
|
#include <winapifamily.h>
|
||||||
|
|
||||||
|
// Current name of the DLL shipped in the same SDK as this header.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define D3DCOMPILER_DLL_W L"d3dcompiler_47.dll"
|
||||||
|
#define D3DCOMPILER_DLL_A "d3dcompiler_47.dll"
|
||||||
|
|
||||||
|
// Current HLSL compiler version.
|
||||||
|
|
||||||
|
#define D3D_COMPILER_VERSION 47
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define D3DCOMPILER_DLL D3DCOMPILER_DLL_W
|
||||||
|
#else
|
||||||
|
#define D3DCOMPILER_DLL D3DCOMPILER_DLL_A
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "d3d11shader.h"
|
||||||
|
#include "d3d12shader.h"
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// APIs //////////////////////////////////////////////////////////////////////
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif //__cplusplus
|
||||||
|
|
||||||
|
|
||||||
|
#pragma region Application Family
|
||||||
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DReadFileToBlob:
|
||||||
|
// -----------------
|
||||||
|
// Simple helper routine to read a file on disk into memory
|
||||||
|
// for passing to other routines in this API.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DReadFileToBlob(_In_ LPCWSTR pFileName,
|
||||||
|
_Out_ ID3DBlob** ppContents);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DWriteBlobToFile:
|
||||||
|
// ------------------
|
||||||
|
// Simple helper routine to write a memory blob to a file on disk.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DWriteBlobToFile(_In_ ID3DBlob* pBlob,
|
||||||
|
_In_ LPCWSTR pFileName,
|
||||||
|
_In_ BOOL bOverwrite);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DCOMPILE flags:
|
||||||
|
// -----------------
|
||||||
|
// D3DCOMPILE_DEBUG
|
||||||
|
// Insert debug file/line/type/symbol information.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_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.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_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.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_PACK_MATRIX_ROW_MAJOR
|
||||||
|
// Unless explicitly specified, matrices will be packed in row-major order
|
||||||
|
// on input and output from the shader.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_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.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_PARTIAL_PRECISION
|
||||||
|
// Force all computations in resulting shader to occur at partial precision.
|
||||||
|
// This may result in faster evaluation of shaders on some hardware.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_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.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_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.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_NO_PRESHADER
|
||||||
|
// Disables Preshaders. Using this flag will cause the compiler to not
|
||||||
|
// pull out static expression for evaluation on the host cpu
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_AVOID_FLOW_CONTROL
|
||||||
|
// Hint compiler to avoid flow-control constructs where possible.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_PREFER_FLOW_CONTROL
|
||||||
|
// Hint compiler to prefer flow-control constructs where possible.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_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.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY
|
||||||
|
// This enables older shaders to compile to 4_0 targets.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE
|
||||||
|
// This enables a debug name to be generated based on source information.
|
||||||
|
// It requires D3DCOMPILE_DEBUG to be set, and is exclusive with
|
||||||
|
// D3DCOMPILE_DEBUG_NAME_FOR_BINARY.
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_DEBUG_NAME_FOR_BINARY
|
||||||
|
// This enables a debug name to be generated based on compiled information.
|
||||||
|
// It requires D3DCOMPILE_DEBUG to be set, and is exclusive with
|
||||||
|
// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE.
|
||||||
|
//
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define D3DCOMPILE_DEBUG (1 << 0)
|
||||||
|
#define D3DCOMPILE_SKIP_VALIDATION (1 << 1)
|
||||||
|
#define D3DCOMPILE_SKIP_OPTIMIZATION (1 << 2)
|
||||||
|
#define D3DCOMPILE_PACK_MATRIX_ROW_MAJOR (1 << 3)
|
||||||
|
#define D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR (1 << 4)
|
||||||
|
#define D3DCOMPILE_PARTIAL_PRECISION (1 << 5)
|
||||||
|
#define D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT (1 << 6)
|
||||||
|
#define D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT (1 << 7)
|
||||||
|
#define D3DCOMPILE_NO_PRESHADER (1 << 8)
|
||||||
|
#define D3DCOMPILE_AVOID_FLOW_CONTROL (1 << 9)
|
||||||
|
#define D3DCOMPILE_PREFER_FLOW_CONTROL (1 << 10)
|
||||||
|
#define D3DCOMPILE_ENABLE_STRICTNESS (1 << 11)
|
||||||
|
#define D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12)
|
||||||
|
#define D3DCOMPILE_IEEE_STRICTNESS (1 << 13)
|
||||||
|
#define D3DCOMPILE_OPTIMIZATION_LEVEL0 (1 << 14)
|
||||||
|
#define D3DCOMPILE_OPTIMIZATION_LEVEL1 0
|
||||||
|
#define D3DCOMPILE_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15))
|
||||||
|
#define D3DCOMPILE_OPTIMIZATION_LEVEL3 (1 << 15)
|
||||||
|
#define D3DCOMPILE_RESERVED16 (1 << 16)
|
||||||
|
#define D3DCOMPILE_RESERVED17 (1 << 17)
|
||||||
|
#define D3DCOMPILE_WARNINGS_ARE_ERRORS (1 << 18)
|
||||||
|
#define D3DCOMPILE_RESOURCES_MAY_ALIAS (1 << 19)
|
||||||
|
#define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20)
|
||||||
|
#define D3DCOMPILE_ALL_RESOURCES_BOUND (1 << 21)
|
||||||
|
#define D3DCOMPILE_DEBUG_NAME_FOR_SOURCE (1 << 22)
|
||||||
|
#define D3DCOMPILE_DEBUG_NAME_FOR_BINARY (1 << 23)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DCOMPILE_EFFECT flags:
|
||||||
|
// -------------------------------------
|
||||||
|
// These flags are passed in when creating an effect, and affect
|
||||||
|
// either compilation behavior or runtime effect behavior
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_EFFECT_CHILD_EFFECT
|
||||||
|
// Compile this .fx file to a child effect. Child effects have no
|
||||||
|
// initializers for any shared values as these are initialied in the
|
||||||
|
// master effect (pool).
|
||||||
|
//
|
||||||
|
// D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS
|
||||||
|
// By default, performance mode is enabled. Performance mode
|
||||||
|
// disallows mutable state objects by preventing non-literal
|
||||||
|
// expressions from appearing in state object definitions.
|
||||||
|
// Specifying this flag will disable the mode and allow for mutable
|
||||||
|
// state objects.
|
||||||
|
//
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define D3DCOMPILE_EFFECT_CHILD_EFFECT (1 << 0)
|
||||||
|
#define D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS (1 << 1)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DCOMPILE Flags2:
|
||||||
|
// -----------------
|
||||||
|
// Root signature flags. (passed in Flags2)
|
||||||
|
#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST 0
|
||||||
|
#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 (1 << 4)
|
||||||
|
#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 (1 << 5)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DCompile:
|
||||||
|
// ----------
|
||||||
|
// Compile source text into bytecode appropriate for the given target.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// D3D_COMPILE_STANDARD_FILE_INCLUDE can be passed for pInclude in any
|
||||||
|
// API and indicates that a simple default include handler should be
|
||||||
|
// used. The include handler will include files relative to the
|
||||||
|
// current directory and files relative to the directory of the initial source
|
||||||
|
// file. When used with APIs like D3DCompile pSourceName must be a
|
||||||
|
// file name and the initial relative directory will be derived from it.
|
||||||
|
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((ID3DInclude*)(UINT_PTR)1)
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCompile(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_opt_ LPCSTR pSourceName,
|
||||||
|
_In_reads_opt_(_Inexpressible_(pDefines->Name != NULL)) CONST D3D_SHADER_MACRO* pDefines,
|
||||||
|
_In_opt_ ID3DInclude* pInclude,
|
||||||
|
_In_opt_ LPCSTR pEntrypoint,
|
||||||
|
_In_ LPCSTR pTarget,
|
||||||
|
_In_ UINT Flags1,
|
||||||
|
_In_ UINT Flags2,
|
||||||
|
_Out_ ID3DBlob** ppCode,
|
||||||
|
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs);
|
||||||
|
|
||||||
|
typedef HRESULT (WINAPI *pD3DCompile)
|
||||||
|
(LPCVOID pSrcData,
|
||||||
|
SIZE_T SrcDataSize,
|
||||||
|
LPCSTR pFileName,
|
||||||
|
CONST D3D_SHADER_MACRO* pDefines,
|
||||||
|
ID3DInclude* pInclude,
|
||||||
|
LPCSTR pEntrypoint,
|
||||||
|
LPCSTR pTarget,
|
||||||
|
UINT Flags1,
|
||||||
|
UINT Flags2,
|
||||||
|
ID3DBlob** ppCode,
|
||||||
|
ID3DBlob** ppErrorMsgs);
|
||||||
|
|
||||||
|
#define D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS 0x00000001
|
||||||
|
#define D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS 0x00000002
|
||||||
|
#define D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH 0x00000004
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCompile2(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_opt_ LPCSTR pSourceName,
|
||||||
|
_In_reads_opt_(_Inexpressible_(pDefines->Name != NULL)) CONST D3D_SHADER_MACRO* pDefines,
|
||||||
|
_In_opt_ ID3DInclude* pInclude,
|
||||||
|
_In_ LPCSTR pEntrypoint,
|
||||||
|
_In_ LPCSTR pTarget,
|
||||||
|
_In_ UINT Flags1,
|
||||||
|
_In_ UINT Flags2,
|
||||||
|
_In_ UINT SecondaryDataFlags,
|
||||||
|
_In_reads_bytes_opt_(SecondaryDataSize) LPCVOID pSecondaryData,
|
||||||
|
_In_ SIZE_T SecondaryDataSize,
|
||||||
|
_Out_ ID3DBlob** ppCode,
|
||||||
|
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs);
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCompileFromFile(_In_ LPCWSTR pFileName,
|
||||||
|
_In_reads_opt_(_Inexpressible_(pDefines->Name != NULL)) CONST D3D_SHADER_MACRO* pDefines,
|
||||||
|
_In_opt_ ID3DInclude* pInclude,
|
||||||
|
_In_ LPCSTR pEntrypoint,
|
||||||
|
_In_ LPCSTR pTarget,
|
||||||
|
_In_ UINT Flags1,
|
||||||
|
_In_ UINT Flags2,
|
||||||
|
_Out_ ID3DBlob** ppCode,
|
||||||
|
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DPreprocess:
|
||||||
|
// -------------
|
||||||
|
// Process source text with the compiler's preprocessor and return
|
||||||
|
// the resulting text.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DPreprocess(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_opt_ LPCSTR pSourceName,
|
||||||
|
_In_opt_ CONST D3D_SHADER_MACRO* pDefines,
|
||||||
|
_In_opt_ ID3DInclude* pInclude,
|
||||||
|
_Out_ ID3DBlob** ppCodeText,
|
||||||
|
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs);
|
||||||
|
|
||||||
|
typedef HRESULT (WINAPI *pD3DPreprocess)
|
||||||
|
(LPCVOID pSrcData,
|
||||||
|
SIZE_T SrcDataSize,
|
||||||
|
LPCSTR pFileName,
|
||||||
|
CONST D3D_SHADER_MACRO* pDefines,
|
||||||
|
ID3DInclude* pInclude,
|
||||||
|
ID3DBlob** ppCodeText,
|
||||||
|
ID3DBlob** ppErrorMsgs);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DGetDebugInfo:
|
||||||
|
// -----------------------
|
||||||
|
// Gets shader debug info. Debug info is generated by D3DCompile and is
|
||||||
|
// embedded in the body of the shader.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DGetDebugInfo(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_Out_ ID3DBlob** ppDebugInfo);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DReflect:
|
||||||
|
// ----------
|
||||||
|
// Shader code contains metadata that can be inspected via the
|
||||||
|
// reflection APIs.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DReflect(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ REFIID pInterface,
|
||||||
|
_Out_ void** ppReflector);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DReflectLibrary:
|
||||||
|
// ----------
|
||||||
|
// Library code contains metadata that can be inspected via the library
|
||||||
|
// reflection APIs.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DReflectLibrary(__in_bcount(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
__in SIZE_T SrcDataSize,
|
||||||
|
__in REFIID riid,
|
||||||
|
__out LPVOID * ppReflector);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DDisassemble:
|
||||||
|
// ----------------------
|
||||||
|
// Takes a binary shader and returns a buffer containing text assembly.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define D3D_DISASM_ENABLE_COLOR_CODE 0x00000001
|
||||||
|
#define D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS 0x00000002
|
||||||
|
#define D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING 0x00000004
|
||||||
|
#define D3D_DISASM_ENABLE_INSTRUCTION_CYCLE 0x00000008
|
||||||
|
#define D3D_DISASM_DISABLE_DEBUG_INFO 0x00000010
|
||||||
|
#define D3D_DISASM_ENABLE_INSTRUCTION_OFFSET 0x00000020
|
||||||
|
#define D3D_DISASM_INSTRUCTION_ONLY 0x00000040
|
||||||
|
#define D3D_DISASM_PRINT_HEX_LITERALS 0x00000080
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DDisassemble(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_In_opt_ LPCSTR szComments,
|
||||||
|
_Out_ ID3DBlob** ppDisassembly);
|
||||||
|
|
||||||
|
typedef HRESULT (WINAPI *pD3DDisassemble)
|
||||||
|
(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_In_opt_ LPCSTR szComments,
|
||||||
|
_Out_ ID3DBlob** ppDisassembly);
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DDisassembleRegion(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_In_opt_ LPCSTR szComments,
|
||||||
|
_In_ SIZE_T StartByteOffset,
|
||||||
|
_In_ SIZE_T NumInsts,
|
||||||
|
_Out_opt_ SIZE_T* pFinishByteOffset,
|
||||||
|
_Out_ ID3DBlob** ppDisassembly);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// Shader linking and Function Linking Graph (FLG) APIs
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCreateLinker(__out interface ID3D11Linker ** ppLinker);
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DLoadModule(_In_ LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T cbSrcDataSize,
|
||||||
|
_Out_ interface ID3D11Module ** ppModule);
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCreateFunctionLinkingGraph(_In_ UINT uFlags,
|
||||||
|
_Out_ interface ID3D11FunctionLinkingGraph ** ppFunctionLinkingGraph);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DGetTraceInstructionOffsets:
|
||||||
|
// -----------------------
|
||||||
|
// Determines byte offsets for instructions within a shader blob.
|
||||||
|
// This information is useful for going between trace instruction
|
||||||
|
// indices and byte offsets that are used in debug information.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE 0x00000001
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DGetTraceInstructionOffsets(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_In_ SIZE_T StartInstIndex,
|
||||||
|
_In_ SIZE_T NumInsts,
|
||||||
|
_Out_writes_to_opt_(NumInsts, min(NumInsts, *pTotalInsts)) SIZE_T* pOffsets,
|
||||||
|
_Out_opt_ SIZE_T* pTotalInsts);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DGetInputSignatureBlob:
|
||||||
|
// -----------------------
|
||||||
|
// Retrieve the input signature from a compilation result.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DGetInputSignatureBlob(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_Out_ ID3DBlob** ppSignatureBlob);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DGetOutputSignatureBlob:
|
||||||
|
// -----------------------
|
||||||
|
// Retrieve the output signature from a compilation result.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DGetOutputSignatureBlob(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_Out_ ID3DBlob** ppSignatureBlob);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DGetInputAndOutputSignatureBlob:
|
||||||
|
// -----------------------
|
||||||
|
// Retrieve the input and output signatures from a compilation result.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DGetInputAndOutputSignatureBlob(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_Out_ ID3DBlob** ppSignatureBlob);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DStripShader:
|
||||||
|
// -----------------------
|
||||||
|
// Removes unwanted blobs from a compilation result
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
typedef enum D3DCOMPILER_STRIP_FLAGS
|
||||||
|
{
|
||||||
|
D3DCOMPILER_STRIP_REFLECTION_DATA = 0x00000001,
|
||||||
|
D3DCOMPILER_STRIP_DEBUG_INFO = 0x00000002,
|
||||||
|
D3DCOMPILER_STRIP_TEST_BLOBS = 0x00000004,
|
||||||
|
D3DCOMPILER_STRIP_PRIVATE_DATA = 0x00000008,
|
||||||
|
D3DCOMPILER_STRIP_ROOT_SIGNATURE = 0x00000010,
|
||||||
|
D3DCOMPILER_STRIP_FORCE_DWORD = 0x7fffffff,
|
||||||
|
} D3DCOMPILER_STRIP_FLAGS;
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DStripShader(_In_reads_bytes_(BytecodeLength) LPCVOID pShaderBytecode,
|
||||||
|
_In_ SIZE_T BytecodeLength,
|
||||||
|
_In_ UINT uStripFlags,
|
||||||
|
_Out_ ID3DBlob** ppStrippedBlob);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DGetBlobPart:
|
||||||
|
// -----------------------
|
||||||
|
// Extracts information from a compilation result.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
typedef enum D3D_BLOB_PART
|
||||||
|
{
|
||||||
|
D3D_BLOB_INPUT_SIGNATURE_BLOB,
|
||||||
|
D3D_BLOB_OUTPUT_SIGNATURE_BLOB,
|
||||||
|
D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB,
|
||||||
|
D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB,
|
||||||
|
D3D_BLOB_ALL_SIGNATURE_BLOB,
|
||||||
|
D3D_BLOB_DEBUG_INFO,
|
||||||
|
D3D_BLOB_LEGACY_SHADER,
|
||||||
|
D3D_BLOB_XNA_PREPASS_SHADER,
|
||||||
|
D3D_BLOB_XNA_SHADER,
|
||||||
|
D3D_BLOB_PDB,
|
||||||
|
D3D_BLOB_PRIVATE_DATA,
|
||||||
|
D3D_BLOB_ROOT_SIGNATURE,
|
||||||
|
D3D_BLOB_DEBUG_NAME,
|
||||||
|
|
||||||
|
// Test parts are only produced by special compiler versions and so
|
||||||
|
// are usually not present in shaders.
|
||||||
|
D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000,
|
||||||
|
D3D_BLOB_TEST_COMPILE_DETAILS,
|
||||||
|
D3D_BLOB_TEST_COMPILE_PERF,
|
||||||
|
D3D_BLOB_TEST_COMPILE_REPORT,
|
||||||
|
} D3D_BLOB_PART;
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DGetBlobPart(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ D3D_BLOB_PART Part,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_Out_ ID3DBlob** ppPart);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DSetBlobPart:
|
||||||
|
// -----------------------
|
||||||
|
// Update information in a compilation result.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DSetBlobPart(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ D3D_BLOB_PART Part,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_In_reads_bytes_(PartSize) LPCVOID pPart,
|
||||||
|
_In_ SIZE_T PartSize,
|
||||||
|
_Out_ ID3DBlob** ppNewShader);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DCreateBlob:
|
||||||
|
// -----------------------
|
||||||
|
// Create an ID3DBlob instance.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCreateBlob(_In_ SIZE_T Size,
|
||||||
|
_Out_ ID3DBlob** ppBlob);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DCompressShaders:
|
||||||
|
// -----------------------
|
||||||
|
// Compresses a set of shaders into a more compact form.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
typedef struct _D3D_SHADER_DATA
|
||||||
|
{
|
||||||
|
LPCVOID pBytecode;
|
||||||
|
SIZE_T BytecodeLength;
|
||||||
|
} D3D_SHADER_DATA;
|
||||||
|
|
||||||
|
#define D3D_COMPRESS_SHADER_KEEP_ALL_PARTS 0x00000001
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DCompressShaders(_In_ UINT uNumShaders,
|
||||||
|
_In_reads_(uNumShaders) D3D_SHADER_DATA* pShaderData,
|
||||||
|
_In_ UINT uFlags,
|
||||||
|
_Out_ ID3DBlob** ppCompressedData);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DDecompressShaders:
|
||||||
|
// -----------------------
|
||||||
|
// Decompresses one or more shaders from a compressed set.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DDecompressShaders(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
|
||||||
|
_In_ SIZE_T SrcDataSize,
|
||||||
|
_In_ UINT uNumShaders,
|
||||||
|
_In_ UINT uStartIndex,
|
||||||
|
_In_reads_opt_(uNumShaders) UINT* pIndices,
|
||||||
|
_In_ UINT uFlags,
|
||||||
|
_Out_writes_(uNumShaders) ID3DBlob** ppShaders,
|
||||||
|
_Out_opt_ UINT* pTotalShaders);
|
||||||
|
|
||||||
|
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
|
#pragma region Desktop Family
|
||||||
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// D3DDisassemble10Effect:
|
||||||
|
// -----------------------
|
||||||
|
// Takes a D3D10 effect interface and returns a
|
||||||
|
// buffer containing text assembly.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
D3DDisassemble10Effect(_In_ interface ID3D10Effect *pEffect,
|
||||||
|
_In_ UINT Flags,
|
||||||
|
_Out_ ID3DBlob** ppDisassembly);
|
||||||
|
|
||||||
|
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif //__cplusplus
|
||||||
|
|
||||||
|
#endif // #ifndef __D3DCOMPILER_H__
|
3440
include/dxsdk/d3dx12.h
Normal file
3440
include/dxsdk/d3dx12.h
Normal file
File diff suppressed because it is too large
Load diff
2958
include/dxsdk/dxgi.h
Normal file
2958
include/dxsdk/dxgi.h
Normal file
File diff suppressed because it is too large
Load diff
1494
include/dxsdk/dxgi1_4.h
Normal file
1494
include/dxsdk/dxgi1_4.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -23,10 +23,10 @@
|
||||||
#include <rpcndr.h>
|
#include <rpcndr.h>
|
||||||
#include <initguid.h>
|
#include <initguid.h>
|
||||||
|
|
||||||
#include "dxsdk/dxgi.h"
|
#include <dxgi.h>
|
||||||
#include "dxsdk/dxgi1_4.h"
|
#include <dxgi1_4.h>
|
||||||
#include "dxsdk/d3d12.h"
|
#include <d3d12.h>
|
||||||
#include "dxsdk/d3dcompiler.h"
|
#include <d3dcompiler.h>
|
||||||
|
|
||||||
#include "dxsdk/d3dx12.h"
|
#include "dxsdk/d3dx12.h"
|
||||||
|
|
||||||
|
@ -36,8 +36,10 @@
|
||||||
#include <PR/gbi.h>
|
#include <PR/gbi.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#include "../cliopts.h"
|
||||||
#include "../configfile.h"
|
#include "../configfile.h"
|
||||||
#include "../platform.h"
|
#include "../platform.h"
|
||||||
|
#include "../pc_main.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "gfx_cc.h"
|
#include "gfx_cc.h"
|
||||||
|
@ -790,11 +792,19 @@ static void onkeyup(WPARAM w_param, LPARAM l_param) {
|
||||||
|
|
||||||
LRESULT CALLBACK gfx_d3d12_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) {
|
LRESULT CALLBACK gfx_d3d12_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) {
|
||||||
switch (message) {
|
switch (message) {
|
||||||
|
case WM_MOVE: {
|
||||||
|
const int x = (short)LOWORD(l_param);
|
||||||
|
const int y = (short)HIWORD(l_param);
|
||||||
|
configWindow.x = (x < 0) ? 0 : x;
|
||||||
|
configWindow.y = (y < 0) ? 0 : y;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
gfx_d3d12_dxgi_on_resize();
|
gfx_d3d12_dxgi_on_resize();
|
||||||
break;
|
break;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
exit(0);
|
game_exit();
|
||||||
|
break;
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (d3d.run_one_game_iter != nullptr)
|
if (d3d.run_one_game_iter != nullptr)
|
||||||
d3d.run_one_game_iter();
|
d3d.run_one_game_iter();
|
||||||
|
|
Loading…
Reference in a new issue