From a63e0466cf00547261945ba190227b49c503d677 Mon Sep 17 00:00:00 2001
From: Martell Malone <martellmalone@gmail.com>
Date: Tue, 3 Feb 2015 03:42:27 +0000
Subject: [PATCH] Added d3d11_2.idl for dx 11.2

---
 include/d3d11_2.idl | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 196 insertions(+)
 create mode 100644 include/d3d11_2.idl

diff --git a/include/d3d11_2.idl b/include/d3d11_2.idl
new file mode 100644
index 0000000..9437f51
--- /dev/null
+++ b/include/d3d11_2.idl
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2015 Martell Malone
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "oaidl.idl";
+import "ocidl.idl";
+import "dxgi1_3.idl";
+import "d3dcommon.idl";
+import "d3d11_1.idl";
+
+typedef struct D3D11_TILED_RESOURCE_COORDINATE
+{
+    UINT X;
+    UINT Y;
+    UINT Z;
+    UINT Subresource; 
+} D3D11_TILED_RESOURCE_COORDINATE;
+
+typedef struct D3D11_TILE_REGION_SIZE
+{
+    UINT NumTiles; 
+    BOOL bUseBox; 
+    UINT Width; 
+    UINT16 Height;
+    UINT16 Depth;
+} D3D11_TILE_REGION_SIZE;
+
+typedef enum D3D11_TILE_MAPPING_FLAG
+{
+    D3D11_TILE_MAPPING_NO_OVERWRITE = 0x1,
+} D3D11_TILE_MAPPING_FLAG;
+
+typedef enum D3D11_TILE_RANGE_FLAG
+{
+    D3D11_TILE_RANGE_NULL = 0x1,
+    D3D11_TILE_RANGE_SKIP = 0x2,
+    D3D11_TILE_RANGE_REUSE_SINGLE_TILE = 0x4,
+} D3D11_TILE_RANGE_FLAG;
+
+typedef struct D3D11_SUBRESOURCE_TILING
+{
+    UINT WidthInTiles;
+    UINT16 HeightInTiles;
+    UINT16 DepthInTiles;
+    UINT StartTileIndexInOverallResource;
+} D3D11_SUBRESOURCE_TILING;
+
+const UINT D3D11_PACKED_TILE = 0xffffffff;
+
+typedef struct D3D11_TILE_SHAPE
+{
+    UINT WidthInTexels; 
+    UINT HeightInTexels;
+    UINT DepthInTexels;
+} D3D11_TILE_SHAPE;
+
+typedef struct D3D11_PACKED_MIP_DESC
+{
+    UINT8 NumStandardMips;
+    UINT8 NumPackedMips;
+    UINT NumTilesForPackedMips;
+    UINT StartTileIndexInOverallResource;
+} D3D11_PACKED_MIP_DESC;
+
+typedef enum D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG
+{
+    D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE = 0x1,
+} D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG;
+
+typedef enum D3D11_TILE_COPY_FLAG 
+{
+    D3D11_TILE_COPY_NO_OVERWRITE = 0x01,
+    D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
+    D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
+} D3D11_TILE_COPY_FLAG;
+
+[
+    uuid(420d5b32-b90c-4da4-bef0-359f6a24a83a),
+    object,
+    local,
+    pointer_default(unique)
+]
+interface ID3D11DeviceContext2 : ID3D11DeviceContext1
+{
+    HRESULT UpdateTileMappings(
+        [in] ID3D11Resource *resource,
+        [in] UINT num_resources,
+        [in, size_is(num_resources)] const D3D11_TILED_RESOURCE_COORDINATE *coordinates, 
+        [in, size_is(num_resources)] const D3D11_TILE_REGION_SIZE *regionsize, 
+        [in] ID3D11Buffer *pool,
+        [in] UINT num_ranges, 
+        [in, size_is(num_resources)] const UINT *rangeflags,
+        [in, size_is(num_resources)] const UINT *pooloffset, 
+        [in, size_is(num_resources)] const UINT *tilecount, 
+        [in] UINT flags
+    );
+
+    HRESULT CopyTileMappings(
+        [in] ID3D11Resource *dest_resource,
+        [in] const D3D11_TILED_RESOURCE_COORDINATE *dest_coordinate, 
+        [in] ID3D11Resource *source_resource,
+        [in] const D3D11_TILED_RESOURCE_COORDINATE *source_coordinate,
+        [in] const D3D11_TILE_REGION_SIZE *regionsize,
+        [in] UINT flags
+    );
+
+    void CopyTiles(
+        [in] ID3D11Resource *resource,
+        [in] const D3D11_TILED_RESOURCE_COORDINATE *coordinate, 
+        [in] const D3D11_TILE_REGION_SIZE *regionsize,                     
+        [in] ID3D11Buffer *buffer, 
+        [in] UINT64 bufferoffset, 
+        [in] UINT flags 
+    );
+
+    void UpdateTiles(
+        [in] ID3D11Resource *resource,
+        [in] const D3D11_TILED_RESOURCE_COORDINATE *coordinate, 
+        [in] const D3D11_TILE_REGION_SIZE *regionsize, 
+        [in] const void *data, 
+        [in] UINT flags
+    );
+
+    HRESULT ResizeTilePool(
+        [in] ID3D11Buffer *pool,
+        [in] UINT64 size
+    );
+
+    void TiledResourceBarrier(
+        [in] ID3D11DeviceChild *resource_before,
+        [in] ID3D11DeviceChild *resource_after
+    );
+
+    BOOL IsAnnotationEnabled();
+
+    void SetMarkerInt( 
+        [in] LPCWSTR pLabel,
+        INT Data
+    );
+    
+    void BeginEventInt(
+        [in] LPCWSTR pLabel,
+        INT Data
+    );
+    
+    void EndEvent();
+}
+
+[
+    uuid(9d06dffa-d1e5-4d07-83a8-1bb123f2f841),
+    object,
+    local,
+    pointer_default(unique)
+]
+interface ID3D11Device2 : ID3D11Device1
+{
+    void GetImmediateContext2(
+        [out] ID3D11DeviceContext2 **context
+    );
+
+    HRESULT CreateDeferredContext2(
+        UINT flags,
+        [out] ID3D11DeviceContext2 **context
+    );
+
+    void GetResourceTiling( 
+        [in] ID3D11Resource *resource,
+        [out] UINT *num_resource,
+        [out] D3D11_PACKED_MIP_DESC *mip_desc, 
+        [out] D3D11_TILE_SHAPE *tile_shape, 
+        [in, out] UINT* num_subresource, 
+        [in] UINT first_subresource, 
+        [size_is(num_resources)] D3D11_SUBRESOURCE_TILING *subresource_tiling
+    );
+
+    HRESULT CheckMultisampleQualityLevels1(
+        [in]  DXGI_FORMAT format,
+        [in]  UINT samp_count,
+        [in]  UINT flags, 
+        [out] UINT *num_levels
+    );
+}
-- 
2.2.2

