1 module aurora.directx.d3d11.d3d11_2;
2 
3 version(Windows):
4 
5 public import aurora.directx.d3d11.d3d11_1;
6 
7 public:
8 
9 ///
10 /// Constants
11 ///
12 
13 ///
14 /// Functions
15 ///
16 
17 ///
18 /// Enumerations
19 ///
20 
21 enum D3D11_TILE_MAPPING_FLAG : uint
22 {
23     NO_OVERWRITE	= 0x1
24 }
25 
26 enum D3D11_TILE_RANGE_FLAG : uint
27 {
28     NULL	= 0x1,
29     SKIP	= 0x2,
30     REUSE_SINGLE_TILE	= 0x4
31 }
32 
33 enum D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG : uint
34 {
35     TILED_RESOURCE	= 0x1
36 }
37 
38 enum D3D11_TILE_COPY_FLAG : uint
39 {
40     NO_OVERWRITE	= 0x1,
41     LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE	= 0x2,
42     SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER	= 0x4
43 }
44 
45 ///
46 /// Structures
47 ///
48 
49 struct D3D11_TILED_RESOURCE_COORDINATE {
50 	uint X;
51 	uint Y;
52 	uint Z;
53 	uint Subresource;
54 }
55 
56 struct D3D11_TILE_REGION_SIZE {
57 	uint NumTiles;
58 	bool bUseBox;
59 	uint Width;
60 	ushort Height;
61 	ushort Depth;
62 }
63 
64 struct D3D11_SUBRESOURCE_TILING {
65 	uint WidthInTiles;
66 	ushort HeightInTiles;
67 	ushort DepthInTiles;
68 	uint StartTileIndexInOverallResource;
69 }
70 
71 struct D3D11_TILE_SHAPE {
72 	uint WidthInTexels;
73 	uint HeightInTexels;
74 	uint DepthInTexels;
75 }
76 
77 struct D3D11_PACKED_MIP_DESC {
78 	ubyte NumStandardMips;
79 	ubyte NumPackedMips;
80 	uint NumTilesForPackedMips;
81 	uint StartTileIndexInOverallResource;
82 }
83 
84 ///
85 /// Interfaces
86 ///
87 
88 mixin(uuid!(ID3D11DeviceContext2, "420d5b32-b90c-4da4-bef0-359f6a24a83a"));
89 public interface ID3D11DeviceContext2 : ID3D11DeviceContext1
90 {
91 extern(Windows):
92 	void UpdateTiles(ID3D11Resource pDestTiledResource, const(D3D11_TILED_RESOURCE_COORDINATE) *pDestTileRegionStartCoordinate, const(D3D11_TILE_REGION_SIZE) *pDestTileRegionSize, const(void) *pSourceTileData, uint Flags);
93 	HRESULT CopyTileMappings(ID3D11Resource pDestTiledResource, const(D3D11_TILED_RESOURCE_COORDINATE) *pDestRegionStartCoord, ID3D11Resource pSourceTiledResource, const(D3D11_TILED_RESOURCE_COORDINATE) *pSourceRegionStartCoord, const(D3D11_TILE_REGION_SIZE) *pTileRegionSize, uint Flags);
94 	void CopyTiles(ID3D11Resource TiledResource, const(D3D11_TILED_RESOURCE_COORDINATE) *pTileRegionStartCoord, const D3D11_TILE_REGION_SIZE *pTileRegionSize, ID3D11Buffer pBuffer, ulong BufferStartOffsetInBytes, uint Flags);
95 	HRESULT ResizeTilePool(ID3D11Buffer pTilePool, ulong NewSizeInBytes);
96 	void TiledResourceBarrier(ID3D11DeviceChild pTiledResourceOrViewAccessBeforeBarrier, ID3D11DeviceChild pTiledResourceOrViewAccessAfterBarrier);
97 	HRESULT UpdateTileMappings(ID3D11Resource pTiledResource, uint NumTiledResourceRegions, const(D3D11_TILED_RESOURCE_COORDINATE) *pTiledResourceRegionStartCoordinates, const(D3D11_TILE_REGION_SIZE) *pTiledResourceRegionSizes, ID3D11Buffer pTilePool, uint NumRanges, const(uint) *pRangeFlags, const(uint) *pTilePoolStartOffsets, const(uint) *pRangeTileCounts, uint Flags);
98 }
99 
100 mixin(uuid!(ID3D11Device2, "9d06dffa-d1e5-4d07-83a8-1bb123f2f841"));
101 public interface ID3D11Device2 : ID3D11Device1
102 {
103 extern(Windows):
104 	HRESULT CheckMultisampleQualityLevels1(DXGI_FORMAT Format, uint SampleCount, uint Flags, uint* pNumQualityLevels);
105 	HRESULT CreateDeferredContext2(uint ContextFlags, ID3D11DeviceContext2 *ppDeferredContext);
106 	void GetImmediateContext2(ID3D11DeviceContext2 *ppImmediateContext);
107 	void GetResourceTiling(ID3D11Resource pTiledResource, uint *pNumTilesForEntireResource, D3D11_PACKED_MIP_DESC *pPackedMipDesc, D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, uint *pNumSubresourceTilings, uint FirstSubresourceTilingToGet, D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips);
108 }
109