Artifact 01a31b5a860419998a796ede1d719177dc3048bf:
- File
src/win32/directx/dxgi.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0d 0a 2a 20 20 20 20 ********\..*
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0060: 20 20 20 20 20 20 20 20 20 20 20 20 20 64 78 67 dxg
0070: 69 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20 i.d
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0090: 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 20 *..*
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d *.
00e0: 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .*
00f0: 20 20 20 20 20 20 20 20 20 57 69 6e 64 6f 77 73 Windows
0100: 20 41 50 49 20 68 65 61 64 65 72 20 6d 6f 64 75 API header modu
0110: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le
0120: 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 20 *..*
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0170: 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 *..*
0180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 P
0190: 6c 61 63 65 64 20 69 6e 74 6f 20 70 75 62 6c 69 laced into publi
01a0: 63 20 64 6f 6d 61 69 6e 20 20 20 20 20 20 20 20 c domain
01b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a *
01c0: 0d 0a 5c 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ..\*************
01d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
01e0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
01f0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0200: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2f 0d 0a 6d 6f 64 **********/..mod
0210: 75 6c 65 20 77 69 6e 33 32 2e 64 69 72 65 63 74 ule win32.direct
0220: 78 2e 64 78 67 69 3b 0d 0a 0d 0a 70 72 69 76 61 x.dxgi;....priva
0230: 74 65 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e te import win32.
0240: 77 69 6e 64 6f 77 73 3b 0d 0a 0d 0a 70 72 69 76 windows;....priv
0250: 61 74 65 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 ate import win32
0260: 2e 64 69 72 65 63 74 78 2e 64 78 67 69 74 79 70 .directx.dxgityp
0270: 65 3b 0d 0a 0d 0a 65 6e 75 6d 20 7b 0d 0a 09 44 e;....enum {...D
0280: 58 47 49 5f 43 50 55 5f 41 43 43 45 53 53 5f 4e XGI_CPU_ACCESS_N
0290: 4f 4e 45 09 09 3d 20 20 30 2c 0d 0a 09 44 58 47 ONE..= 0,...DXG
02a0: 49 5f 43 50 55 5f 41 43 43 45 53 53 5f 44 59 4e I_CPU_ACCESS_DYN
02b0: 41 4d 49 43 09 09 3d 20 20 31 2c 0d 0a 09 44 58 AMIC..= 1,...DX
02c0: 47 49 5f 43 50 55 5f 41 43 43 45 53 53 5f 52 45 GI_CPU_ACCESS_RE
02d0: 41 44 5f 57 52 49 54 45 09 3d 20 20 32 2c 0d 0a AD_WRITE.= 2,..
02e0: 09 44 58 47 49 5f 43 50 55 5f 41 43 43 45 53 53 .DXGI_CPU_ACCESS
02f0: 5f 53 43 52 41 54 43 48 09 09 3d 20 20 33 2c 0d _SCRATCH..= 3,.
0300: 0a 09 44 58 47 49 5f 43 50 55 5f 41 43 43 45 53 ..DXGI_CPU_ACCES
0310: 53 5f 46 49 45 4c 44 09 09 3d 20 31 35 0d 0a 7d S_FIELD..= 15..}
0320: 0d 0a 0d 0a 65 6e 75 6d 20 7b 0d 0a 09 44 58 47 ....enum {...DXG
0330: 49 5f 55 53 41 47 45 5f 53 48 41 44 45 52 5f 49 I_USAGE_SHADER_I
0340: 4e 50 55 54 09 09 09 3d 20 30 62 30 30 5f 30 30 NPUT...= 0b00_00
0350: 30 31 30 30 30 30 2c 0d 0a 09 44 58 47 49 5f 55 010000,...DXGI_U
0360: 53 41 47 45 5f 52 45 4e 44 45 52 5f 54 41 52 47 SAGE_RENDER_TARG
0370: 45 54 5f 4f 55 54 50 55 54 09 3d 20 30 62 30 30 ET_OUTPUT.= 0b00
0380: 5f 30 30 31 30 30 30 30 30 2c 0d 0a 09 44 58 47 _00100000,...DXG
0390: 49 5f 55 53 41 47 45 5f 42 41 43 4b 5f 42 55 46 I_USAGE_BACK_BUF
03a0: 46 45 52 09 09 09 3d 20 30 62 30 30 5f 30 31 30 FER...= 0b00_010
03b0: 30 30 30 30 30 2c 0d 0a 09 44 58 47 49 5f 55 53 00000,...DXGI_US
03c0: 41 47 45 5f 53 48 41 52 45 44 09 09 09 09 3d 20 AGE_SHARED....=
03d0: 30 62 30 30 5f 31 30 30 30 30 30 30 30 2c 0d 0a 0b00_10000000,..
03e0: 09 44 58 47 49 5f 55 53 41 47 45 5f 52 45 41 44 .DXGI_USAGE_READ
03f0: 5f 4f 4e 4c 59 09 09 09 3d 20 30 62 30 31 5f 30 _ONLY...= 0b01_0
0400: 30 30 30 30 30 30 30 2c 0d 0a 09 44 58 47 49 5f 0000000,...DXGI_
0410: 55 53 41 47 45 5f 44 49 53 43 41 52 44 5f 4f 4e USAGE_DISCARD_ON
0420: 5f 50 52 45 53 45 4e 54 09 3d 20 30 62 31 30 5f _PRESENT.= 0b10_
0430: 30 30 30 30 30 30 30 30 2c 0d 0a 7d 0d 0a 61 6c 00000000,..}..al
0440: 69 61 73 20 55 49 4e 54 20 44 58 47 49 5f 55 53 ias UINT DXGI_US
0450: 41 47 45 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 44 AGE;....struct D
0460: 58 47 49 5f 46 52 41 4d 45 5f 53 54 41 54 49 53 XGI_FRAME_STATIS
0470: 54 49 43 53 20 7b 0d 0a 09 55 49 4e 54 20 50 72 TICS {...UINT Pr
0480: 65 73 65 6e 74 43 6f 75 6e 74 3b 0d 0a 09 55 49 esentCount;...UI
0490: 4e 54 20 50 72 65 73 65 6e 74 52 65 66 72 65 73 NT PresentRefres
04a0: 68 43 6f 75 6e 74 3b 0d 0a 09 55 49 4e 54 20 53 hCount;...UINT S
04b0: 79 6e 63 52 65 66 72 65 73 68 43 6f 75 6e 74 3b yncRefreshCount;
04c0: 0d 0a 09 4c 41 52 47 45 5f 49 4e 54 45 47 45 52 ...LARGE_INTEGER
04d0: 20 53 79 6e 63 51 50 43 54 69 6d 65 3b 0d 0a 09 SyncQPCTime;...
04e0: 4c 41 52 47 45 5f 49 4e 54 45 47 45 52 20 53 79 LARGE_INTEGER Sy
04f0: 6e 63 47 50 55 54 69 6d 65 3b 0d 0a 7d 0d 0a 0d ncGPUTime;..}...
0500: 0a 73 74 72 75 63 74 20 44 58 47 49 5f 4d 41 50 .struct DXGI_MAP
0510: 50 45 44 5f 52 45 43 54 20 7b 0d 0a 09 49 4e 54 PED_RECT {...INT
0520: 20 50 69 74 63 68 3b 0d 0a 09 42 59 54 45 2a 20 Pitch;...BYTE*
0530: 70 42 69 74 73 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 pBits;..}....str
0540: 75 63 74 20 44 58 47 49 5f 41 44 41 50 54 45 52 uct DXGI_ADAPTER
0550: 5f 44 45 53 43 20 7b 0d 0a 09 57 43 48 41 52 5b _DESC {...WCHAR[
0560: 31 32 38 5d 20 44 65 73 63 72 69 70 74 69 6f 6e 128] Description
0570: 3b 0d 0a 09 55 49 4e 54 20 56 65 6e 64 6f 72 49 ;...UINT VendorI
0580: 64 3b 0d 0a 09 55 49 4e 54 20 44 65 76 69 63 65 d;...UINT Device
0590: 49 64 3b 0d 0a 09 55 49 4e 54 20 53 75 62 53 79 Id;...UINT SubSy
05a0: 73 49 64 3b 0d 0a 09 55 49 4e 54 20 52 65 76 69 sId;...UINT Revi
05b0: 73 69 6f 6e 3b 0d 0a 09 53 49 5a 45 5f 54 20 44 sion;...SIZE_T D
05c0: 65 64 69 63 61 74 65 64 56 69 64 65 6f 4d 65 6d edicatedVideoMem
05d0: 6f 72 79 3b 0d 0a 09 53 49 5a 45 5f 54 20 44 65 ory;...SIZE_T De
05e0: 64 69 63 61 74 65 64 53 79 73 74 65 6d 4d 65 6d dicatedSystemMem
05f0: 6f 72 79 3b 0d 0a 09 53 49 5a 45 5f 54 20 53 68 ory;...SIZE_T Sh
0600: 61 72 65 64 53 79 73 74 65 6d 4d 65 6d 6f 72 79 aredSystemMemory
0610: 3b 0d 0a 09 4c 55 49 44 20 41 64 61 70 74 65 72 ;...LUID Adapter
0620: 4c 75 69 64 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 Luid;..}....stru
0630: 63 74 20 44 58 47 49 5f 4f 55 54 50 55 54 5f 44 ct DXGI_OUTPUT_D
0640: 45 53 43 20 7b 0d 0a 09 57 43 48 41 52 5b 33 32 ESC {...WCHAR[32
0650: 5d 20 44 65 76 69 63 65 4e 61 6d 65 3b 0d 0a 09 ] DeviceName;...
0660: 52 45 43 54 20 44 65 73 6b 74 6f 70 43 6f 6f 72 RECT DesktopCoor
0670: 64 69 6e 61 74 65 73 3b 0d 0a 09 42 4f 4f 4c 20 dinates;...BOOL
0680: 41 74 74 61 63 68 65 64 54 6f 44 65 73 6b 74 6f AttachedToDeskto
0690: 70 3b 0d 0a 09 44 58 47 49 5f 4d 4f 44 45 5f 52 p;...DXGI_MODE_R
06a0: 4f 54 41 54 49 4f 4e 20 52 6f 74 61 74 69 6f 6e OTATION Rotation
06b0: 3b 0d 0a 09 48 4d 4f 4e 49 54 4f 52 20 4d 6f 6e ;...HMONITOR Mon
06c0: 69 74 6f 72 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 itor;..}....stru
06d0: 63 74 20 44 58 47 49 5f 53 48 41 52 45 44 5f 52 ct DXGI_SHARED_R
06e0: 45 53 4f 55 52 43 45 20 7b 0d 0a 09 48 41 4e 44 ESOURCE {...HAND
06f0: 4c 45 20 48 61 6e 64 6c 65 3b 0d 0a 7d 0d 0a 0d LE Handle;..}...
0700: 0a 65 6e 75 6d 20 7b 0d 0a 09 44 58 47 49 5f 52 .enum {...DXGI_R
0710: 45 53 4f 55 52 43 45 5f 50 52 49 4f 52 49 54 59 ESOURCE_PRIORITY
0720: 5f 4d 49 4e 49 4d 55 4d 09 3d 20 30 78 32 38 30 _MINIMUM.= 0x280
0730: 30 30 30 30 30 2c 0d 0a 09 44 58 47 49 5f 52 45 00000,...DXGI_RE
0740: 53 4f 55 52 43 45 5f 50 52 49 4f 52 49 54 59 5f SOURCE_PRIORITY_
0750: 4c 4f 57 09 09 3d 20 30 78 35 30 30 30 30 30 30 LOW..= 0x5000000
0760: 30 2c 0d 0a 09 44 58 47 49 5f 52 45 53 4f 55 52 0,...DXGI_RESOUR
0770: 43 45 5f 50 52 49 4f 52 49 54 59 5f 4e 4f 52 4d CE_PRIORITY_NORM
0780: 41 4c 09 3d 20 30 78 37 38 30 30 30 30 30 30 2c AL.= 0x78000000,
0790: 0d 0a 09 44 58 47 49 5f 52 45 53 4f 55 52 43 45 ...DXGI_RESOURCE
07a0: 5f 50 52 49 4f 52 49 54 59 5f 48 49 47 48 09 09 _PRIORITY_HIGH..
07b0: 3d 20 30 78 61 30 30 30 30 30 30 30 2c 0d 0a 09 = 0xa0000000,...
07c0: 44 58 47 49 5f 52 45 53 4f 55 52 43 45 5f 50 52 DXGI_RESOURCE_PR
07d0: 49 4f 52 49 54 59 5f 4d 41 58 49 4d 55 4d 09 3d IORITY_MAXIMUM.=
07e0: 20 30 78 63 38 30 30 30 30 30 30 0d 0a 7d 0d 0a 0xc8000000..}..
07f0: 0d 0a 65 6e 75 6d 20 44 58 47 49 5f 52 45 53 49 ..enum DXGI_RESI
0800: 44 45 4e 43 59 20 7b 0d 0a 09 44 58 47 49 5f 52 DENCY {...DXGI_R
0810: 45 53 49 44 45 4e 43 59 5f 46 55 4c 4c 59 5f 52 ESIDENCY_FULLY_R
0820: 45 53 49 44 45 4e 54 09 09 09 09 3d 20 31 2c 0d ESIDENT....= 1,.
0830: 0a 09 44 58 47 49 5f 52 45 53 49 44 45 4e 43 59 ..DXGI_RESIDENCY
0840: 5f 52 45 53 49 44 45 4e 54 5f 49 4e 5f 53 48 41 _RESIDENT_IN_SHA
0850: 52 45 44 5f 4d 45 4d 4f 52 59 09 3d 20 32 2c 0d RED_MEMORY.= 2,.
0860: 0a 09 44 58 47 49 5f 52 45 53 49 44 45 4e 43 59 ..DXGI_RESIDENCY
0870: 5f 45 56 49 43 54 45 44 5f 54 4f 5f 44 49 53 4b _EVICTED_TO_DISK
0880: 09 09 09 09 3d 20 33 0d 0a 7d 0d 0a 0d 0a 73 74 ....= 3..}....st
0890: 72 75 63 74 20 44 58 47 49 5f 53 55 52 46 41 43 ruct DXGI_SURFAC
08a0: 45 5f 44 45 53 43 20 7b 0d 0a 09 55 49 4e 54 20 E_DESC {...UINT
08b0: 57 69 64 74 68 3b 0d 0a 09 55 49 4e 54 20 48 65 Width;...UINT He
08c0: 69 67 68 74 3b 0d 0a 09 44 58 47 49 5f 46 4f 52 ight;...DXGI_FOR
08d0: 4d 41 54 20 46 6f 72 6d 61 74 3b 0d 0a 09 44 58 MAT Format;...DX
08e0: 47 49 5f 53 41 4d 50 4c 45 5f 44 45 53 43 20 53 GI_SAMPLE_DESC S
08f0: 61 6d 70 6c 65 44 65 73 63 3b 0d 0a 7d 0d 0a 0d ampleDesc;..}...
0900: 0a 65 6e 75 6d 20 44 58 47 49 5f 53 57 41 50 5f .enum DXGI_SWAP_
0910: 45 46 46 45 43 54 20 7b 0d 0a 09 44 58 47 49 5f EFFECT {...DXGI_
0920: 53 57 41 50 5f 45 46 46 45 43 54 5f 44 49 53 43 SWAP_EFFECT_DISC
0930: 41 52 44 09 3d 20 30 2c 0d 0a 09 44 58 47 49 5f ARD.= 0,...DXGI_
0940: 53 57 41 50 5f 45 46 46 45 43 54 5f 53 45 51 55 SWAP_EFFECT_SEQU
0950: 45 4e 54 49 41 4c 09 3d 20 31 0d 0a 7d 0d 0a 0d ENTIAL.= 1..}...
0960: 0a 65 6e 75 6d 20 44 58 47 49 5f 53 57 41 50 5f .enum DXGI_SWAP_
0970: 43 48 41 49 4e 5f 46 4c 41 47 20 7b 0d 0a 09 44 CHAIN_FLAG {...D
0980: 58 47 49 5f 53 57 41 50 5f 43 48 41 49 4e 5f 46 XGI_SWAP_CHAIN_F
0990: 4c 41 47 5f 4e 4f 4e 50 52 45 52 4f 54 41 54 45 LAG_NONPREROTATE
09a0: 44 09 09 3d 20 31 2c 0d 0a 09 44 58 47 49 5f 53 D..= 1,...DXGI_S
09b0: 57 41 50 5f 43 48 41 49 4e 5f 46 4c 41 47 5f 41 WAP_CHAIN_FLAG_A
09c0: 4c 4c 4f 57 5f 4d 4f 44 45 5f 53 57 49 54 43 48 LLOW_MODE_SWITCH
09d0: 09 3d 20 32 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 .= 2..}....struc
09e0: 74 20 44 58 47 49 5f 53 57 41 50 5f 43 48 41 49 t DXGI_SWAP_CHAI
09f0: 4e 5f 44 45 53 43 20 7b 0d 0a 09 44 58 47 49 5f N_DESC {...DXGI_
0a00: 4d 4f 44 45 5f 44 45 53 43 20 42 75 66 66 65 72 MODE_DESC Buffer
0a10: 44 65 73 63 3b 0d 0a 09 44 58 47 49 5f 53 41 4d Desc;...DXGI_SAM
0a20: 50 4c 45 5f 44 45 53 43 20 53 61 6d 70 6c 65 44 PLE_DESC SampleD
0a30: 65 73 63 3b 0d 0a 09 44 58 47 49 5f 55 53 41 47 esc;...DXGI_USAG
0a40: 45 20 42 75 66 66 65 72 55 73 61 67 65 3b 0d 0a E BufferUsage;..
0a50: 09 55 49 4e 54 20 42 75 66 66 65 72 43 6f 75 6e .UINT BufferCoun
0a60: 74 3b 0d 0a 09 48 57 4e 44 20 4f 75 74 70 75 74 t;...HWND Output
0a70: 57 69 6e 64 6f 77 3b 0d 0a 09 42 4f 4f 4c 20 57 Window;...BOOL W
0a80: 69 6e 64 6f 77 65 64 3b 0d 0a 09 44 58 47 49 5f indowed;...DXGI_
0a90: 53 57 41 50 5f 45 46 46 45 43 54 20 53 77 61 70 SWAP_EFFECT Swap
0aa0: 45 66 66 65 63 74 3b 0d 0a 09 55 49 4e 54 20 46 Effect;...UINT F
0ab0: 6c 61 67 73 3b 0d 0a 7d 0d 0a 0d 0a 69 6e 74 65 lags;..}....inte
0ac0: 72 66 61 63 65 20 49 44 58 47 49 4f 62 6a 65 63 rface IDXGIObjec
0ad0: 74 20 3a 20 49 55 6e 6b 6e 6f 77 6e 20 7b 0d 0a t : IUnknown {..
0ae0: 09 65 78 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 .extern(Windows)
0af0: 20 3a 0d 0a 09 48 52 45 53 55 4c 54 20 53 65 74 :...HRESULT Set
0b00: 50 72 69 76 61 74 65 44 61 74 61 28 52 45 46 47 PrivateData(REFG
0b10: 55 49 44 20 4e 61 6d 65 2c 20 55 49 4e 54 20 44 UID Name, UINT D
0b20: 61 74 61 53 69 7a 65 2c 20 76 6f 69 64 2a 20 70 ataSize, void* p
0b30: 44 61 74 61 29 3b 0d 0a 09 48 52 45 53 55 4c 54 Data);...HRESULT
0b40: 20 53 65 74 50 72 69 76 61 74 65 44 61 74 61 49 SetPrivateDataI
0b50: 6e 74 65 72 66 61 63 65 28 52 45 46 47 55 49 44 nterface(REFGUID
0b60: 20 4e 61 6d 65 2c 20 49 55 6e 6b 6e 6f 77 6e 20 Name, IUnknown
0b70: 70 55 6e 6b 6e 6f 77 6e 29 3b 0d 0a 09 48 52 45 pUnknown);...HRE
0b80: 53 55 4c 54 20 47 65 74 50 72 69 76 61 74 65 44 SULT GetPrivateD
0b90: 61 74 61 28 52 45 46 47 55 49 44 20 4e 61 6d 65 ata(REFGUID Name
0ba0: 2c 20 55 49 4e 54 2a 20 70 44 61 74 61 53 69 7a , UINT* pDataSiz
0bb0: 65 2c 20 76 6f 69 64 2a 20 70 44 61 74 61 29 3b e, void* pData);
0bc0: 0d 0a 09 48 52 45 53 55 4c 54 20 47 65 74 50 61 ...HRESULT GetPa
0bd0: 72 65 6e 74 28 52 45 46 49 49 44 20 72 69 69 64 rent(REFIID riid
0be0: 2c 20 76 6f 69 64 2a 2a 20 70 70 50 61 72 65 6e , void** ppParen
0bf0: 74 29 3b 0d 0a 7d 0d 0a 0d 0a 69 6e 74 65 72 66 t);..}....interf
0c00: 61 63 65 20 49 44 58 47 49 44 65 76 69 63 65 53 ace IDXGIDeviceS
0c10: 75 62 4f 62 6a 65 63 74 20 3a 20 49 44 58 47 49 ubObject : IDXGI
0c20: 4f 62 6a 65 63 74 20 7b 0d 0a 09 65 78 74 65 72 Object {...exter
0c30: 6e 28 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 n(Windows) :...H
0c40: 52 45 53 55 4c 54 20 47 65 74 44 65 76 69 63 65 RESULT GetDevice
0c50: 28 52 45 46 49 49 44 20 72 69 69 64 2c 20 76 6f (REFIID riid, vo
0c60: 69 64 2a 2a 20 70 70 44 65 76 69 63 65 29 3b 0d id** ppDevice);.
0c70: 0a 7d 0d 0a 0d 0a 69 6e 74 65 72 66 61 63 65 20 .}....interface
0c80: 49 44 58 47 49 52 65 73 6f 75 72 63 65 20 3a 20 IDXGIResource :
0c90: 49 44 58 47 49 44 65 76 69 63 65 53 75 62 4f 62 IDXGIDeviceSubOb
0ca0: 6a 65 63 74 20 7b 0d 0a 09 65 78 74 65 72 6e 28 ject {...extern(
0cb0: 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 52 45 Windows) :...HRE
0cc0: 53 55 4c 54 20 47 65 74 53 68 61 72 65 64 48 61 SULT GetSharedHa
0cd0: 6e 64 6c 65 28 48 41 4e 44 4c 45 2a 20 70 53 68 ndle(HANDLE* pSh
0ce0: 61 72 65 64 48 61 6e 64 6c 65 29 3b 0d 0a 09 48 aredHandle);...H
0cf0: 52 45 53 55 4c 54 20 47 65 74 55 73 61 67 65 28 RESULT GetUsage(
0d00: 44 58 47 49 5f 55 53 41 47 45 2a 20 70 55 73 61 DXGI_USAGE* pUsa
0d10: 67 65 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 53 ge);...HRESULT S
0d20: 65 74 45 76 69 63 74 69 6f 6e 50 72 69 6f 72 69 etEvictionPriori
0d30: 74 79 28 55 49 4e 54 20 45 76 69 63 74 69 6f 6e ty(UINT Eviction
0d40: 50 72 69 6f 72 69 74 79 29 3b 0d 0a 09 48 52 45 Priority);...HRE
0d50: 53 55 4c 54 20 47 65 74 45 76 69 63 74 69 6f 6e SULT GetEviction
0d60: 50 72 69 6f 72 69 74 79 28 55 49 4e 54 2a 20 70 Priority(UINT* p
0d70: 45 76 69 63 74 69 6f 6e 50 72 69 6f 72 69 74 79 EvictionPriority
0d80: 29 3b 0d 0a 7d 0d 0a 0d 0a 69 6e 74 65 72 66 61 );..}....interfa
0d90: 63 65 20 49 44 58 47 49 53 75 72 66 61 63 65 20 ce IDXGISurface
0da0: 3a 20 49 44 58 47 49 44 65 76 69 63 65 53 75 62 : IDXGIDeviceSub
0db0: 4f 62 6a 65 63 74 20 7b 0d 0a 09 65 78 74 65 72 Object {...exter
0dc0: 6e 28 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 n(Windows) :...H
0dd0: 52 45 53 55 4c 54 20 47 65 74 44 65 73 63 28 44 RESULT GetDesc(D
0de0: 58 47 49 5f 53 55 52 46 41 43 45 5f 44 45 53 43 XGI_SURFACE_DESC
0df0: 2a 20 70 44 65 73 63 29 3b 0d 0a 09 48 52 45 53 * pDesc);...HRES
0e00: 55 4c 54 20 4d 61 70 28 44 58 47 49 5f 4d 41 50 ULT Map(DXGI_MAP
0e10: 50 45 44 5f 52 45 43 54 2a 20 70 4c 6f 63 6b 65 PED_RECT* pLocke
0e20: 64 52 65 63 74 2c 20 55 49 4e 54 20 4d 61 70 46 dRect, UINT MapF
0e30: 6c 61 67 73 29 3b 0d 0a 09 48 52 45 53 55 4c 54 lags);...HRESULT
0e40: 20 55 6e 6d 61 70 28 29 3b 0d 0a 7d 0d 0a 0d 0a Unmap();..}....
0e50: 69 6e 74 65 72 66 61 63 65 20 49 44 58 47 49 41 interface IDXGIA
0e60: 64 61 70 74 65 72 20 3a 20 49 44 58 47 49 4f 62 dapter : IDXGIOb
0e70: 6a 65 63 74 20 7b 0d 0a 09 65 78 74 65 72 6e 28 ject {...extern(
0e80: 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 52 45 Windows) :...HRE
0e90: 53 55 4c 54 20 45 6e 75 6d 4f 75 74 70 75 74 73 SULT EnumOutputs
0ea0: 28 55 49 4e 54 20 4f 75 74 70 75 74 2c 20 49 44 (UINT Output, ID
0eb0: 58 47 49 4f 75 74 70 75 74 2a 20 70 70 4f 75 74 XGIOutput* ppOut
0ec0: 70 75 74 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 put);...HRESULT
0ed0: 47 65 74 44 65 73 63 28 44 58 47 49 5f 41 44 41 GetDesc(DXGI_ADA
0ee0: 50 54 45 52 5f 44 45 53 43 2a 20 70 44 65 73 63 PTER_DESC* pDesc
0ef0: 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 43 68 65 );...HRESULT Che
0f00: 63 6b 49 6e 74 65 72 66 61 63 65 53 75 70 70 6f ckInterfaceSuppo
0f10: 72 74 28 52 45 46 47 55 49 44 20 49 6e 74 65 72 rt(REFGUID Inter
0f20: 66 61 63 65 4e 61 6d 65 2c 20 4c 41 52 47 45 5f faceName, LARGE_
0f30: 49 4e 54 45 47 45 52 2a 20 70 55 4d 44 56 65 72 INTEGER* pUMDVer
0f40: 73 69 6f 6e 29 3b 0d 0a 7d 0d 0a 0d 0a 69 6e 74 sion);..}....int
0f50: 65 72 66 61 63 65 20 49 44 58 47 49 4f 75 74 70 erface IDXGIOutp
0f60: 75 74 20 3a 20 49 44 58 47 49 4f 62 6a 65 63 74 ut : IDXGIObject
0f70: 20 7b 0d 0a 09 65 78 74 65 72 6e 28 57 69 6e 64 {...extern(Wind
0f80: 6f 77 73 29 20 3a 0d 0a 09 48 52 45 53 55 4c 54 ows) :...HRESULT
0f90: 20 47 65 74 44 65 73 63 28 44 58 47 49 5f 4f 55 GetDesc(DXGI_OU
0fa0: 54 50 55 54 5f 44 45 53 43 2a 20 70 44 65 73 63 TPUT_DESC* pDesc
0fb0: 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 47 65 74 );...HRESULT Get
0fc0: 44 69 73 70 6c 61 79 4d 6f 64 65 4c 69 73 74 28 DisplayModeList(
0fd0: 44 58 47 49 5f 46 4f 52 4d 41 54 20 45 6e 75 6d DXGI_FORMAT Enum
0fe0: 46 6f 72 6d 61 74 2c 20 55 49 4e 54 20 46 6c 61 Format, UINT Fla
0ff0: 67 73 2c 20 55 49 4e 54 2a 20 70 4e 75 6d 4d 6f gs, UINT* pNumMo
1000: 64 65 73 2c 20 44 58 47 49 5f 4d 4f 44 45 5f 44 des, DXGI_MODE_D
1010: 45 53 43 2a 20 70 44 65 73 63 29 3b 0d 0a 09 48 ESC* pDesc);...H
1020: 52 45 53 55 4c 54 20 46 69 6e 64 43 6c 6f 73 65 RESULT FindClose
1030: 73 74 4d 61 74 63 68 69 6e 67 4d 6f 64 65 28 44 stMatchingMode(D
1040: 58 47 49 5f 4d 4f 44 45 5f 44 45 53 43 2a 20 70 XGI_MODE_DESC* p
1050: 4d 6f 64 65 54 6f 4d 61 74 63 68 2c 20 44 58 47 ModeToMatch, DXG
1060: 49 5f 4d 4f 44 45 5f 44 45 53 43 2a 20 70 43 6c I_MODE_DESC* pCl
1070: 6f 73 65 73 74 4d 61 74 63 68 2c 20 49 55 6e 6b osestMatch, IUnk
1080: 6e 6f 77 6e 20 70 43 6f 6e 63 65 72 6e 65 64 44 nown pConcernedD
1090: 65 76 69 63 65 29 3b 0d 0a 09 48 52 45 53 55 4c evice);...HRESUL
10a0: 54 20 57 61 69 74 46 6f 72 56 42 6c 61 6e 6b 28 T WaitForVBlank(
10b0: 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 54 61 6b );...HRESULT Tak
10c0: 65 4f 77 6e 65 72 73 68 69 70 28 49 55 6e 6b 6e eOwnership(IUnkn
10d0: 6f 77 6e 20 70 44 65 76 69 63 65 2c 20 42 4f 4f own pDevice, BOO
10e0: 4c 20 45 78 63 6c 75 73 69 76 65 29 3b 0d 0a 09 L Exclusive);...
10f0: 76 6f 69 64 20 52 65 6c 65 61 73 65 4f 77 6e 65 void ReleaseOwne
1100: 72 73 68 69 70 28 29 3b 0d 0a 09 48 52 45 53 55 rship();...HRESU
1110: 4c 54 20 47 65 74 47 61 6d 6d 61 43 6f 6e 74 72 LT GetGammaContr
1120: 6f 6c 43 61 70 61 62 69 6c 69 74 69 65 73 28 44 olCapabilities(D
1130: 58 47 49 5f 47 41 4d 4d 41 5f 43 4f 4e 54 52 4f XGI_GAMMA_CONTRO
1140: 4c 5f 43 41 50 41 42 49 4c 49 54 49 45 53 2a 20 L_CAPABILITIES*
1150: 70 47 61 6d 6d 61 43 61 70 73 29 3b 0d 0a 09 48 pGammaCaps);...H
1160: 52 45 53 55 4c 54 20 53 65 74 47 61 6d 6d 61 43 RESULT SetGammaC
1170: 6f 6e 74 72 6f 6c 28 44 58 47 49 5f 47 41 4d 4d ontrol(DXGI_GAMM
1180: 41 5f 43 4f 4e 54 52 4f 4c 2a 20 70 41 72 72 61 A_CONTROL* pArra
1190: 79 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 47 65 y);...HRESULT Ge
11a0: 74 47 61 6d 6d 61 43 6f 6e 74 72 6f 6c 28 44 58 tGammaControl(DX
11b0: 47 49 5f 47 41 4d 4d 41 5f 43 4f 4e 54 52 4f 4c GI_GAMMA_CONTROL
11c0: 2a 20 70 41 72 72 61 79 29 3b 0d 0a 09 48 52 45 * pArray);...HRE
11d0: 53 55 4c 54 20 53 65 74 44 69 73 70 6c 61 79 53 SULT SetDisplayS
11e0: 75 72 66 61 63 65 28 49 44 58 47 49 53 75 72 66 urface(IDXGISurf
11f0: 61 63 65 20 70 53 63 61 6e 6f 75 74 53 75 72 66 ace pScanoutSurf
1200: 61 63 65 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 ace);...HRESULT
1210: 47 65 74 44 69 73 70 6c 61 79 53 75 72 66 61 63 GetDisplaySurfac
1220: 65 44 61 74 61 28 49 44 58 47 49 53 75 72 66 61 eData(IDXGISurfa
1230: 63 65 20 70 44 65 73 74 69 6e 61 74 69 6f 6e 29 ce pDestination)
1240: 3b 0d 0a 09 48 52 45 53 55 4c 54 20 47 65 74 46 ;...HRESULT GetF
1250: 72 61 6d 65 53 74 61 74 69 73 74 69 63 73 28 44 rameStatistics(D
1260: 58 47 49 5f 46 52 41 4d 45 5f 53 54 41 54 49 53 XGI_FRAME_STATIS
1270: 54 49 43 53 2a 20 70 53 74 61 74 73 29 3b 0d 0a TICS* pStats);..
1280: 7d 0d 0a 0d 0a 63 6f 6e 73 74 20 44 58 47 49 5f }....const DXGI_
1290: 4d 41 58 5f 53 57 41 50 5f 43 48 41 49 4e 5f 42 MAX_SWAP_CHAIN_B
12a0: 55 46 46 45 52 53 20 3d 20 31 36 3b 0d 0a 0d 0a UFFERS = 16;....
12b0: 65 6e 75 6d 20 7b 0d 0a 09 44 58 47 49 5f 50 52 enum {...DXGI_PR
12c0: 45 53 45 4e 54 5f 54 45 53 54 09 09 09 09 3d 20 ESENT_TEST....=
12d0: 30 78 30 30 30 30 30 30 30 31 2c 0d 0a 09 44 58 0x00000001,...DX
12e0: 47 49 5f 50 52 45 53 45 4e 54 5f 44 4f 5f 4e 4f GI_PRESENT_DO_NO
12f0: 54 5f 53 45 51 55 45 4e 43 45 09 3d 20 30 78 30 T_SEQUENCE.= 0x0
1300: 30 30 30 30 30 30 32 2c 0d 0a 09 44 58 47 49 5f 0000002,...DXGI_
1310: 50 52 45 53 45 4e 54 5f 52 45 53 54 41 52 54 09 PRESENT_RESTART.
1320: 09 09 3d 20 30 78 30 30 30 30 30 30 30 34 0d 0a ..= 0x00000004..
1330: 7d 0d 0a 0d 0a 69 6e 74 65 72 66 61 63 65 20 49 }....interface I
1340: 44 58 47 49 53 77 61 70 43 68 61 69 6e 20 3a 20 DXGISwapChain :
1350: 49 44 58 47 49 44 65 76 69 63 65 53 75 62 4f 62 IDXGIDeviceSubOb
1360: 6a 65 63 74 20 7b 0d 0a 09 65 78 74 65 72 6e 28 ject {...extern(
1370: 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 52 45 Windows) :...HRE
1380: 53 55 4c 54 20 50 72 65 73 65 6e 74 28 55 49 4e SULT Present(UIN
1390: 54 20 53 79 6e 63 49 6e 74 65 72 76 61 6c 2c 20 T SyncInterval,
13a0: 55 49 4e 54 20 46 6c 61 67 73 29 3b 0d 0a 09 48 UINT Flags);...H
13b0: 52 45 53 55 4c 54 20 47 65 74 42 75 66 66 65 72 RESULT GetBuffer
13c0: 28 55 49 4e 54 20 42 75 66 66 65 72 2c 20 52 45 (UINT Buffer, RE
13d0: 46 49 49 44 20 72 69 69 64 2c 20 76 6f 69 64 2a FIID riid, void*
13e0: 2a 20 70 70 53 75 72 66 61 63 65 29 3b 0d 0a 09 * ppSurface);...
13f0: 48 52 45 53 55 4c 54 20 53 65 74 46 75 6c 6c 73 HRESULT SetFulls
1400: 63 72 65 65 6e 53 74 61 74 65 28 42 4f 4f 4c 20 creenState(BOOL
1410: 46 75 6c 6c 73 63 72 65 65 6e 2c 20 49 44 58 47 Fullscreen, IDXG
1420: 49 4f 75 74 70 75 74 20 70 54 61 72 67 65 74 29 IOutput pTarget)
1430: 3b 0d 0a 09 48 52 45 53 55 4c 54 20 47 65 74 46 ;...HRESULT GetF
1440: 75 6c 6c 73 63 72 65 65 6e 53 74 61 74 65 28 42 ullscreenState(B
1450: 4f 4f 4c 2a 20 70 46 75 6c 6c 73 63 72 65 65 6e OOL* pFullscreen
1460: 2c 20 49 44 58 47 49 4f 75 74 70 75 74 2a 20 70 , IDXGIOutput* p
1470: 70 54 61 72 67 65 74 29 3b 0d 0a 09 48 52 45 53 pTarget);...HRES
1480: 55 4c 54 20 47 65 74 44 65 73 63 28 44 58 47 49 ULT GetDesc(DXGI
1490: 5f 53 57 41 50 5f 43 48 41 49 4e 5f 44 45 53 43 _SWAP_CHAIN_DESC
14a0: 2a 20 70 44 65 73 63 29 3b 0d 0a 09 48 52 45 53 * pDesc);...HRES
14b0: 55 4c 54 20 52 65 73 69 7a 65 42 75 66 66 65 72 ULT ResizeBuffer
14c0: 73 28 55 49 4e 54 20 42 75 66 66 65 72 43 6f 75 s(UINT BufferCou
14d0: 6e 74 2c 20 55 49 4e 54 20 57 69 64 74 68 2c 20 nt, UINT Width,
14e0: 55 49 4e 54 20 48 65 69 67 68 74 2c 20 44 58 47 UINT Height, DXG
14f0: 49 5f 46 4f 52 4d 41 54 20 4e 65 77 46 6f 72 6d I_FORMAT NewForm
1500: 61 74 2c 20 55 49 4e 54 20 53 77 61 70 43 68 61 at, UINT SwapCha
1510: 69 6e 46 6c 61 67 73 29 3b 0d 0a 09 48 52 45 53 inFlags);...HRES
1520: 55 4c 54 20 52 65 73 69 7a 65 54 61 72 67 65 74 ULT ResizeTarget
1530: 28 44 58 47 49 5f 4d 4f 44 45 5f 44 45 53 43 2a (DXGI_MODE_DESC*
1540: 20 70 4e 65 77 54 61 72 67 65 74 50 61 72 61 6d pNewTargetParam
1550: 65 74 65 72 73 29 3b 0d 0a 09 48 52 45 53 55 4c eters);...HRESUL
1560: 54 20 47 65 74 43 6f 6e 74 61 69 6e 69 6e 67 4f T GetContainingO
1570: 75 74 70 75 74 28 49 44 58 47 49 4f 75 74 70 75 utput(IDXGIOutpu
1580: 74 2a 20 70 70 4f 75 74 70 75 74 29 3b 0d 0a 09 t* ppOutput);...
1590: 48 52 45 53 55 4c 54 20 47 65 74 46 72 61 6d 65 HRESULT GetFrame
15a0: 53 74 61 74 69 73 74 69 63 73 28 44 58 47 49 5f Statistics(DXGI_
15b0: 46 52 41 4d 45 5f 53 54 41 54 49 53 54 49 43 53 FRAME_STATISTICS
15c0: 2a 20 70 53 74 61 74 73 29 3b 0d 0a 09 48 52 45 * pStats);...HRE
15d0: 53 55 4c 54 20 47 65 74 4c 61 73 74 50 72 65 73 SULT GetLastPres
15e0: 65 6e 74 43 6f 75 6e 74 28 55 49 4e 54 2a 20 70 entCount(UINT* p
15f0: 4c 61 73 74 50 72 65 73 65 6e 74 43 6f 75 6e 74 LastPresentCount
1600: 29 3b 0d 0a 7d 0d 0a 0d 0a 69 6e 74 65 72 66 61 );..}....interfa
1610: 63 65 20 49 44 58 47 49 46 61 63 74 6f 72 79 20 ce IDXGIFactory
1620: 3a 20 49 44 58 47 49 4f 62 6a 65 63 74 20 7b 0d : IDXGIObject {.
1630: 0a 09 65 78 74 65 72 6e 28 57 69 6e 64 6f 77 73 ..extern(Windows
1640: 29 20 3a 0d 0a 09 48 52 45 53 55 4c 54 20 45 6e ) :...HRESULT En
1650: 75 6d 41 64 61 70 74 65 72 73 28 55 49 4e 54 20 umAdapters(UINT
1660: 41 64 61 70 74 65 72 2c 20 49 44 58 47 49 41 64 Adapter, IDXGIAd
1670: 61 70 74 65 72 2a 20 70 70 41 64 61 70 74 65 72 apter* ppAdapter
1680: 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 4d 61 6b );...HRESULT Mak
1690: 65 57 69 6e 64 6f 77 41 73 73 6f 63 69 61 74 69 eWindowAssociati
16a0: 6f 6e 28 48 57 4e 44 20 57 69 6e 64 6f 77 48 61 on(HWND WindowHa
16b0: 6e 64 6c 65 2c 20 55 49 4e 54 20 46 6c 61 67 73 ndle, UINT Flags
16c0: 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 47 65 74 );...HRESULT Get
16d0: 57 69 6e 64 6f 77 41 73 73 6f 63 69 61 74 69 6f WindowAssociatio
16e0: 6e 28 48 57 4e 44 2a 20 70 57 69 6e 64 6f 77 48 n(HWND* pWindowH
16f0: 61 6e 64 6c 65 29 3b 0d 0a 09 48 52 45 53 55 4c andle);...HRESUL
1700: 54 20 43 72 65 61 74 65 53 77 61 70 43 68 61 69 T CreateSwapChai
1710: 6e 28 49 55 6e 6b 6e 6f 77 6e 20 70 44 65 76 69 n(IUnknown pDevi
1720: 63 65 2c 20 44 58 47 49 5f 53 57 41 50 5f 43 48 ce, DXGI_SWAP_CH
1730: 41 49 4e 5f 44 45 53 43 2a 20 70 44 65 73 63 2c AIN_DESC* pDesc,
1740: 20 49 44 58 47 49 53 77 61 70 43 68 61 69 6e 2a IDXGISwapChain*
1750: 20 70 70 53 77 61 70 43 68 61 69 6e 29 3b 0d 0a ppSwapChain);..
1760: 09 48 52 45 53 55 4c 54 20 43 72 65 61 74 65 53 .HRESULT CreateS
1770: 6f 66 74 77 61 72 65 41 64 61 70 74 65 72 28 48 oftwareAdapter(H
1780: 4d 4f 44 55 4c 45 20 4d 6f 64 75 6c 65 2c 20 49 MODULE Module, I
1790: 44 58 47 49 41 64 61 70 74 65 72 2a 20 70 70 41 DXGIAdapter* ppA
17a0: 64 61 70 74 65 72 29 3b 0d 0a 7d 0d 0a 0d 0a 69 dapter);..}....i
17b0: 6e 74 65 72 66 61 63 65 20 49 44 58 47 49 44 65 nterface IDXGIDe
17c0: 76 69 63 65 20 3a 20 49 44 58 47 49 4f 62 6a 65 vice : IDXGIObje
17d0: 63 74 20 7b 0d 0a 09 65 78 74 65 72 6e 28 57 69 ct {...extern(Wi
17e0: 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 52 45 53 55 ndows) :...HRESU
17f0: 4c 54 20 47 65 74 41 64 61 70 74 65 72 28 49 44 LT GetAdapter(ID
1800: 58 47 49 41 64 61 70 74 65 72 2a 20 70 41 64 61 XGIAdapter* pAda
1810: 70 74 65 72 29 3b 0d 0a 09 48 52 45 53 55 4c 54 pter);...HRESULT
1820: 20 43 72 65 61 74 65 53 75 72 66 61 63 65 28 44 CreateSurface(D
1830: 58 47 49 5f 53 55 52 46 41 43 45 5f 44 45 53 43 XGI_SURFACE_DESC
1840: 2a 20 70 44 65 73 63 2c 20 55 49 4e 54 20 4e 75 * pDesc, UINT Nu
1850: 6d 53 75 72 66 61 63 65 73 2c 20 44 58 47 49 5f mSurfaces, DXGI_
1860: 55 53 41 47 45 20 55 73 61 67 65 2c 20 44 58 47 USAGE Usage, DXG
1870: 49 5f 53 48 41 52 45 44 5f 52 45 53 4f 55 52 43 I_SHARED_RESOURC
1880: 45 2a 20 70 53 68 61 72 65 64 52 65 73 6f 75 72 E* pSharedResour
1890: 63 65 2c 20 49 44 58 47 49 53 75 72 66 61 63 65 ce, IDXGISurface
18a0: 2a 20 70 70 53 75 72 66 61 63 65 29 3b 0d 0a 09 * ppSurface);...
18b0: 48 52 45 53 55 4c 54 20 51 75 65 72 79 52 65 73 HRESULT QueryRes
18c0: 6f 75 72 63 65 52 65 73 69 64 65 6e 63 79 28 49 ourceResidency(I
18d0: 55 6e 6b 6e 6f 77 6e 2a 20 70 70 52 65 73 6f 75 Unknown* ppResou
18e0: 72 63 65 73 2c 20 44 58 47 49 5f 52 45 53 49 44 rces, DXGI_RESID
18f0: 45 4e 43 59 2a 20 70 52 65 73 69 64 65 6e 63 79 ENCY* pResidency
1900: 53 74 61 74 75 73 2c 20 55 49 4e 54 20 4e 75 6d Status, UINT Num
1910: 52 65 73 6f 75 72 63 65 73 29 3b 0d 0a 09 48 52 Resources);...HR
1920: 45 53 55 4c 54 20 53 65 74 47 50 55 54 68 72 65 ESULT SetGPUThre
1930: 61 64 50 72 69 6f 72 69 74 79 28 49 4e 54 20 50 adPriority(INT P
1940: 72 69 6f 72 69 74 79 29 3b 0d 0a 09 48 52 45 53 riority);...HRES
1950: 55 4c 54 20 47 65 74 47 50 55 54 68 72 65 61 64 ULT GetGPUThread
1960: 50 72 69 6f 72 69 74 79 28 49 4e 54 2a 20 70 50 Priority(INT* pP
1970: 72 69 6f 72 69 74 79 29 3b 0d 0a 7d 0d 0a 0d 0a riority);..}....
1980: 65 78 74 65 72 6e 28 43 29 20 63 6f 6e 73 74 20 extern(C) const
1990: 47 55 49 44 20 49 49 44 5f 49 44 58 47 49 4f 62 GUID IID_IDXGIOb
19a0: 6a 65 63 74 09 09 09 3d 20 7b 30 78 61 65 63 32 ject...= {0xaec2
19b0: 32 66 62 38 2c 20 30 78 37 36 66 33 2c 20 30 78 2fb8, 0x76f3, 0x
19c0: 34 36 33 39 2c 20 5b 30 78 39 62 2c 20 30 78 65 4639, [0x9b, 0xe
19d0: 30 2c 20 30 78 32 38 2c 20 30 78 65 62 2c 20 30 0, 0x28, 0xeb, 0
19e0: 78 34 33 2c 20 30 78 61 36 2c 20 30 78 37 61 2c x43, 0xa6, 0x7a,
19f0: 20 30 78 32 65 5d 7d 3b 0d 0a 65 78 74 65 72 6e 0x2e]};..extern
1a00: 28 43 29 20 63 6f 6e 73 74 20 47 55 49 44 20 49 (C) const GUID I
1a10: 49 44 5f 49 44 58 47 49 44 65 76 69 63 65 53 75 ID_IDXGIDeviceSu
1a20: 62 4f 62 6a 65 63 74 09 3d 20 7b 30 78 33 64 33 bObject.= {0x3d3
1a30: 65 30 33 37 39 2c 20 30 78 66 39 64 65 2c 20 30 e0379, 0xf9de, 0
1a40: 78 34 64 35 38 2c 20 5b 30 78 62 62 2c 20 30 78 x4d58, [0xbb, 0x
1a50: 36 63 2c 20 30 78 31 38 2c 20 30 78 64 36 2c 20 6c, 0x18, 0xd6,
1a60: 30 78 32 39 2c 20 30 78 39 32 2c 20 30 78 66 31 0x29, 0x92, 0xf1
1a70: 2c 20 30 78 61 36 5d 7d 3b 0d 0a 65 78 74 65 72 , 0xa6]};..exter
1a80: 6e 28 43 29 20 63 6f 6e 73 74 20 47 55 49 44 20 n(C) const GUID
1a90: 49 49 44 5f 49 44 58 47 49 52 65 73 6f 75 72 63 IID_IDXGIResourc
1aa0: 65 09 09 09 3d 20 7b 30 78 30 33 35 66 33 61 62 e...= {0x035f3ab
1ab0: 34 2c 20 30 78 34 38 32 65 2c 20 30 78 34 65 35 4, 0x482e, 0x4e5
1ac0: 30 2c 20 5b 30 78 62 34 2c 20 30 78 31 66 2c 20 0, [0xb4, 0x1f,
1ad0: 30 78 38 61 2c 20 30 78 37 66 2c 20 30 78 38 62 0x8a, 0x7f, 0x8b
1ae0: 2c 20 30 78 64 38 2c 20 30 78 39 36 2c 20 30 78 , 0xd8, 0x96, 0x
1af0: 30 62 5d 7d 3b 0d 0a 65 78 74 65 72 6e 28 43 29 0b]};..extern(C)
1b00: 20 63 6f 6e 73 74 20 47 55 49 44 20 49 49 44 5f const GUID IID_
1b10: 49 44 58 47 49 53 75 72 66 61 63 65 09 09 09 3d IDXGISurface...=
1b20: 20 7b 30 78 63 61 66 63 62 35 36 63 2c 20 30 78 {0xcafcb56c, 0x
1b30: 36 61 63 33 2c 20 30 78 34 38 38 39 2c 20 5b 30 6ac3, 0x4889, [0
1b40: 78 62 66 2c 20 30 78 34 37 2c 20 30 78 39 65 2c xbf, 0x47, 0x9e,
1b50: 20 30 78 32 33 2c 20 30 78 62 62 2c 20 30 78 64 0x23, 0xbb, 0xd
1b60: 32 2c 20 30 78 36 30 2c 20 30 78 65 63 5d 7d 3b 2, 0x60, 0xec]};
1b70: 0d 0a 65 78 74 65 72 6e 28 43 29 20 63 6f 6e 73 ..extern(C) cons
1b80: 74 20 47 55 49 44 20 49 49 44 5f 49 44 58 47 49 t GUID IID_IDXGI
1b90: 41 64 61 70 74 65 72 09 09 09 3d 20 7b 30 78 32 Adapter...= {0x2
1ba0: 34 31 31 65 37 65 31 2c 20 30 78 31 32 61 63 2c 411e7e1, 0x12ac,
1bb0: 20 30 78 34 63 63 66 2c 20 5b 30 78 62 64 2c 20 0x4ccf, [0xbd,
1bc0: 30 78 31 34 2c 20 30 78 39 37 2c 20 30 78 39 38 0x14, 0x97, 0x98
1bd0: 2c 20 30 78 65 38 2c 20 30 78 35 33 2c 20 30 78 , 0xe8, 0x53, 0x
1be0: 34 64 2c 20 30 78 63 30 5d 7d 3b 0d 0a 65 78 74 4d, 0xc0]};..ext
1bf0: 65 72 6e 28 43 29 20 63 6f 6e 73 74 20 47 55 49 ern(C) const GUI
1c00: 44 20 49 49 44 5f 49 44 58 47 49 4f 75 74 70 75 D IID_IDXGIOutpu
1c10: 74 09 09 09 3d 20 7b 30 78 61 65 30 32 65 65 64 t...= {0xae02eed
1c20: 62 2c 20 30 78 63 37 33 35 2c 20 30 78 34 36 39 b, 0xc735, 0x469
1c30: 30 2c 20 5b 30 78 38 64 2c 20 30 78 35 32 2c 20 0, [0x8d, 0x52,
1c40: 30 78 35 61 2c 20 30 78 38 64 2c 20 30 78 63 32 0x5a, 0x8d, 0xc2
1c50: 2c 20 30 78 30 32 2c 20 30 78 31 33 2c 20 30 78 , 0x02, 0x13, 0x
1c60: 61 61 5d 7d 3b 0d 0a 65 78 74 65 72 6e 28 43 29 aa]};..extern(C)
1c70: 20 63 6f 6e 73 74 20 47 55 49 44 20 49 49 44 5f const GUID IID_
1c80: 49 44 58 47 49 53 77 61 70 43 68 61 69 6e 09 09 IDXGISwapChain..
1c90: 09 3d 20 7b 30 78 33 31 30 64 33 36 61 30 2c 20 .= {0x310d36a0,
1ca0: 30 78 64 32 65 37 2c 20 30 78 34 63 30 61 2c 20 0xd2e7, 0x4c0a,
1cb0: 5b 30 78 61 61 2c 20 30 78 30 34 2c 20 30 78 36 [0xaa, 0x04, 0x6
1cc0: 61 2c 20 30 78 39 64 2c 20 30 78 32 33 2c 20 30 a, 0x9d, 0x23, 0
1cd0: 78 62 38 2c 20 30 78 38 38 2c 20 30 78 36 61 5d xb8, 0x88, 0x6a]
1ce0: 7d 3b 0d 0a 65 78 74 65 72 6e 28 43 29 20 63 6f };..extern(C) co
1cf0: 6e 73 74 20 47 55 49 44 20 49 49 44 5f 49 44 58 nst GUID IID_IDX
1d00: 47 49 46 61 63 74 6f 72 79 09 09 09 3d 20 7b 30 GIFactory...= {0
1d10: 78 37 62 37 31 36 36 65 63 2c 20 30 78 32 31 63 x7b7166ec, 0x21c
1d20: 37 2c 20 30 78 34 34 61 65 2c 20 5b 30 78 62 32 7, 0x44ae, [0xb2
1d30: 2c 20 30 78 31 61 2c 20 30 78 63 39 2c 20 30 78 , 0x1a, 0xc9, 0x
1d40: 61 65 2c 20 30 78 33 32 2c 20 30 78 31 61 2c 20 ae, 0x32, 0x1a,
1d50: 30 78 65 33 2c 20 30 78 36 39 5d 7d 3b 0d 0a 65 0xe3, 0x69]};..e
1d60: 78 74 65 72 6e 28 43 29 20 63 6f 6e 73 74 20 47 xtern(C) const G
1d70: 55 49 44 20 49 49 44 5f 49 44 58 47 49 44 65 76 UID IID_IDXGIDev
1d80: 69 63 65 09 09 09 3d 20 7b 30 78 35 34 65 63 37 ice...= {0x54ec7
1d90: 37 66 61 2c 20 30 78 31 33 37 37 2c 20 30 78 34 7fa, 0x1377, 0x4
1da0: 34 65 36 2c 20 5b 30 78 38 63 2c 20 30 78 33 32 4e6, [0x8c, 0x32
1db0: 2c 20 30 78 38 38 2c 20 30 78 66 64 2c 20 30 78 , 0x88, 0xfd, 0x
1dc0: 35 66 2c 20 30 78 34 34 2c 20 30 78 63 38 2c 20 5f, 0x44, 0xc8,
1dd0: 30 78 34 63 5d 7d 3b 0d 0a 0d 0a 0x4c]};....