mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-utils: Introduce D3DCompile() and D3DCompile2().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
042a2928dc
commit
0df589369e
@@ -93,3 +93,29 @@ interface ID3D10Blob : IUnknown
|
||||
|
||||
typedef ID3D10Blob ID3DBlob;
|
||||
cpp_quote("#define IID_ID3DBlob IID_ID3D10Blob")
|
||||
|
||||
typedef enum _D3D_INCLUDE_TYPE
|
||||
{
|
||||
D3D_INCLUDE_LOCAL = 0,
|
||||
D3D_INCLUDE_SYSTEM,
|
||||
D3D10_INCLUDE_LOCAL = D3D_INCLUDE_LOCAL,
|
||||
D3D10_INCLUDE_SYSTEM = D3D_INCLUDE_SYSTEM,
|
||||
D3D_INCLUDE_FORCE_DWORD = 0x7fffffff,
|
||||
} D3D_INCLUDE_TYPE;
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
]
|
||||
interface ID3DInclude
|
||||
{
|
||||
HRESULT Open(D3D_INCLUDE_TYPE include_type, const char *filename, const void *parent_data, const void **data,
|
||||
UINT *size);
|
||||
HRESULT Close(const void *data);
|
||||
}
|
||||
|
||||
typedef struct _D3D_SHADER_MACRO
|
||||
{
|
||||
const char *Name;
|
||||
const char *Definition;
|
||||
} D3D_SHADER_MACRO;
|
||||
|
@@ -20,6 +20,52 @@
|
||||
#define __VKD3D_D3DCOMPILER_H
|
||||
#ifndef __D3DCOMPILER_H__
|
||||
|
||||
#define D3DCOMPILE_DEBUG 0x00000001
|
||||
#define D3DCOMPILE_SKIP_VALIDATION 0x00000002
|
||||
#define D3DCOMPILE_SKIP_OPTIMIZATION 0x00000004
|
||||
#define D3DCOMPILE_PACK_MATRIX_ROW_MAJOR 0x00000008
|
||||
#define D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR 0x00000010
|
||||
#define D3DCOMPILE_PARTIAL_PRECISION 0x00000020
|
||||
#define D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT 0x00000040
|
||||
#define D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT 0x00000080
|
||||
#define D3DCOMPILE_NO_PRESHADER 0x00000100
|
||||
#define D3DCOMPILE_AVOID_FLOW_CONTROL 0x00000200
|
||||
#define D3DCOMPILE_PREFER_FLOW_CONTROL 0x00000400
|
||||
#define D3DCOMPILE_ENABLE_STRICTNESS 0x00000800
|
||||
#define D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY 0x00001000
|
||||
#define D3DCOMPILE_IEEE_STRICTNESS 0x00002000
|
||||
#define D3DCOMPILE_OPTIMIZATION_LEVEL0 0x00004000
|
||||
#define D3DCOMPILE_OPTIMIZATION_LEVEL1 0x00000000
|
||||
#define D3DCOMPILE_OPTIMIZATION_LEVEL2 0x0000c000
|
||||
#define D3DCOMPILE_OPTIMIZATION_LEVEL3 0x00008000
|
||||
#define D3DCOMPILE_RESERVED16 0x00010000
|
||||
#define D3DCOMPILE_RESERVED17 0x00020000
|
||||
#define D3DCOMPILE_WARNINGS_ARE_ERRORS 0x00040000
|
||||
#define D3DCOMPILE_RESOURCES_MAY_ALIAS 0x00080000
|
||||
#define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES 0x00100000
|
||||
#define D3DCOMPILE_ALL_RESOURCES_BOUND 0x00200000
|
||||
#define D3DCOMPILE_DEBUG_NAME_FOR_SOURCE 0x00400000
|
||||
#define D3DCOMPILE_DEBUG_NAME_FOR_BINARY 0x00800000
|
||||
|
||||
#define D3DCOMPILE_EFFECT_CHILD_EFFECT 0x00000001
|
||||
#define D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS 0x00000002
|
||||
|
||||
#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST 0x00000000
|
||||
#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 0x00000010
|
||||
#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 0x00000020
|
||||
|
||||
#define D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS 0x00000001
|
||||
#define D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS 0x00000002
|
||||
#define D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH 0x00000004
|
||||
|
||||
HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
|
||||
const D3D_SHADER_MACRO *macros, ID3DInclude *include, const char *entrypoint,
|
||||
const char *profile, UINT flags, UINT effect_flags, ID3DBlob **shader, ID3DBlob **error_messages);
|
||||
HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filename,
|
||||
const D3D_SHADER_MACRO *macros, ID3DInclude *include, const char *entrypoint,
|
||||
const char *profile, UINT flags, UINT effect_flags, UINT secondary_flags,
|
||||
const void *secondary_data, SIZE_T secondary_data_size, ID3DBlob **shader,
|
||||
ID3DBlob **error_messages);
|
||||
HRESULT WINAPI D3DCreateBlob(SIZE_T size, ID3D10Blob **blob);
|
||||
|
||||
#endif /* __D3DCOMPILER_H__ */
|
||||
|
@@ -55,6 +55,14 @@ HRESULT WINAPI D3D12SerializeVersionedRootSignature(const D3D12_VERSIONED_ROOT_S
|
||||
ID3DBlob **blob, ID3DBlob **error_blob);
|
||||
|
||||
/* 1.3 */
|
||||
HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
|
||||
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
|
||||
const char *target, UINT flags, UINT effect_flags, ID3DBlob **shader, ID3DBlob **error_messages);
|
||||
HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filename,
|
||||
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
|
||||
const char *target, UINT flags, UINT effect_flags, UINT secondary_flags,
|
||||
const void *secondary_data, SIZE_T secondary_data_size, ID3DBlob **shader,
|
||||
ID3DBlob **error_messages);
|
||||
HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3D10Blob **blob);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -65,6 +65,8 @@ typedef int HRESULT;
|
||||
# define DXGI_ERROR_NOT_FOUND _HRESULT_TYPEDEF_(0x887a0002)
|
||||
# define DXGI_ERROR_MORE_DATA _HRESULT_TYPEDEF_(0x887a0003)
|
||||
|
||||
# define D3DERR_INVALIDCALL _HRESULT_TYPEDEF_(0x8876086c)
|
||||
|
||||
/* Basic types */
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned int DWORD;
|
||||
|
Reference in New Issue
Block a user