2 * Copyright 2017 Ihsan Akmal
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 import
"d3dcommon.idl";
25 const UINT D3D11_PACKED_TILE
= 0xffffffff;
27 typedef enum D3D11_TILE_MAPPING_FLAG
29 D3D11_TILE_MAPPING_NO_OVERWRITE
= 0x1,
30 } D3D11_TILE_MAPPING_FLAG
;
32 typedef enum D3D11_TILE_RANGE_FLAG
34 D3D11_TILE_RANGE_NULL
= 0x1,
35 D3D11_TILE_RANGE_SKIP
= 0x2,
36 D3D11_TILE_RANGE_REUSE_SINGLE_TILE
= 0x4,
37 } D3D11_TILE_RANGE_FLAG
;
39 typedef enum D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG
41 D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE
= 0x1,
42 } D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG
;
44 typedef enum D3D11_TILE_COPY_FLAG
46 D3D11_TILE_COPY_NO_OVERWRITE
= 0x1,
47 D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE
= 0x2,
48 D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER
= 0x4,
49 } D3D11_TILE_COPY_FLAG
;
51 typedef struct D3D11_TILED_RESOURCE_COORDINATE
57 } D3D11_TILED_RESOURCE_COORDINATE
;
59 typedef struct D3D11_TILE_REGION_SIZE
66 } D3D11_TILE_REGION_SIZE
;
68 typedef struct D3D11_SUBRESOURCE_TILING
73 UINT StartTileIndexInOverallResource
;
74 } D3D11_SUBRESOURCE_TILING
;
76 typedef struct D3D11_TILE_SHAPE
83 typedef struct D3D11_PACKED_MIP_DESC
85 UINT8 NumStandardMips
;
87 UINT NumTilesForPackedMips
;
88 UINT StartTileIndexInOverallResource
;
89 } D3D11_PACKED_MIP_DESC
;
92 uuid(420d5b32
-b90c
-4da4
-bef0
-359f6a24a83a
),
95 pointer_default(unique)
97 interface ID3D11DeviceContext2
: ID3D11DeviceContext1
99 HRESULT UpdateTileMappings
(
100 ID3D11Resource
*resource
,
102 const D3D11_TILED_RESOURCE_COORDINATE
*region_start_coordinates
,
103 const D3D11_TILE_REGION_SIZE
*region_sizes
,
106 const UINT
*range_flags
,
107 const UINT
*pool_start_offsets
,
108 const UINT
*range_tile_counts
,
111 HRESULT CopyTileMappings
(
112 ID3D11Resource
*dst_resource
,
113 const D3D11_TILED_RESOURCE_COORDINATE
*dst_start_coordinate
,
114 ID3D11Resource
*src_resource
,
115 const D3D11_TILED_RESOURCE_COORDINATE
*src_start_coordinate
,
116 const D3D11_TILE_REGION_SIZE
*region_size
,
120 ID3D11Resource
*resource
,
121 const D3D11_TILED_RESOURCE_COORDINATE
*start_coordinate
,
122 const D3D11_TILE_REGION_SIZE
*size
,
123 ID3D11Buffer
*buffer
,
128 ID3D11Resource
*dst_resource
,
129 const D3D11_TILED_RESOURCE_COORDINATE
*dst_start_coordinate
,
130 const D3D11_TILE_REGION_SIZE
*dst_region_size
,
131 const void *src_data
,
134 HRESULT ResizeTilePool
(
138 void TiledResourceBarrier
(
139 ID3D11DeviceChild
*before_barrier
,
140 ID3D11DeviceChild
*after_barrier
142 BOOL IsAnnotationEnabled
();
143 void SetMarkerInt
(const WCHAR
*label
, int data
);
144 void BeginEventInt
(const WCHAR
*label
, int data
);
149 uuid(9d06dffa
-d1e5
-4d07
-83a8
-1bb123f2f841
),
152 pointer_default(unique)
154 interface ID3D11Device2
: ID3D11Device1
156 void GetImmediateContext2
(ID3D11DeviceContext2
**context
);
157 HRESULT CreateDeferredContext2
(UINT flags
, ID3D11DeviceContext2
**context
);
158 void GetResourceTiling
(
159 ID3D11Resource
*resource
,
161 D3D11_PACKED_MIP_DESC
*mip_desc
,
162 D3D11_TILE_SHAPE
*tile_shape
,
163 UINT
*subresource_tiling_count
,
164 UINT first_subresource_tiling
,
165 D3D11_SUBRESOURCE_TILING
*subresource_tiling
167 HRESULT CheckMultisampleQualityLevels1
(
171 UINT
*quality_level_count