From: Andrey Gusev Subject: [PATCH] include: Add d3d11_2.idl. Message-Id: <1480971351-16006-1-git-send-email-andrey.goosev@gmail.com> Date: Mon, 5 Dec 2016 22:55:51 +0200 Signed-off-by: Andrey Gusev --- include/Makefile.in | 1 + include/d3d11_2.idl | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 include/d3d11_2.idl diff --git a/include/Makefile.in b/include/Makefile.in index 401b02b..f3fe6e4 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -39,6 +39,7 @@ IDL_SRCS = \ d3d10sdklayers.idl \ d3d11.idl \ d3d11_1.idl \ + d3d11_2.idl \ d3d11sdklayers.idl \ d3dcommon.idl \ d3dx10core.idl \ diff --git a/include/d3d11_2.idl b/include/d3d11_2.idl new file mode 100644 index 0000000..124e114 --- /dev/null +++ b/include/d3d11_2.idl @@ -0,0 +1,152 @@ +/* + * Copyright 2016 Andrey Gusev + * + * 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 "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 struct D3D11_PACKED_MIP_DESC { + UINT8 NumStandardMips; + UINT8 NumPackedMips; + UINT NumTilesForPackedMips; + UINT StartTileIndexInOverallResource; +} D3D11_PACKED_MIP_DESC; + +typedef struct D3D11_TILE_SHAPE { + UINT WidthInTexels; + UINT HeightInTexels; + UINT DepthInTexels; +} D3D11_TILE_SHAPE; + +typedef struct D3D11_SUBRESOURCE_TILING { + UINT WidthInTiles; + UINT16 HeightInTiles; + UINT16 DepthInTiles; + UINT StartTileIndexInOverallResource; +} D3D11_SUBRESOURCE_TILING; + +[ + uuid(420d5b32-b90c-4da4-bef0-359f6a24a83a), + object, + local, + pointer_default(unique) +] +interface ID3D11DeviceContext2 : ID3D11DeviceContext1 +{ + 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); + + HRESULT CopyTileMappings( + ID3D11Resource *pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate, + ID3D11Resource *pSourceTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE *pTileRegionSize, + UINT Flags); + + void CopyTiles( + ID3D11Resource *pTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE *pTileRegionSize, + ID3D11Buffer *pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags); + + void UpdateTiles( + ID3D11Resource *pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE *pDestTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE *pDestTileRegionSize, + const void *pSourceTileData, + UINT Flags); + + HRESULT ResizeTilePool( + ID3D11Buffer *pTilePool, + UINT64 NewSizeInBytes); + + void TiledResourceBarrier( + ID3D11DeviceChild *pTiledResourceOrViewAccessBeforeBarrier, + ID3D11DeviceChild *pTiledResourceOrViewAccessAfterBarrier); + + BOOL IsAnnotationEnabled(); + + void SetMarkerInt( + LPCWSTR pLabel, + INT Data); + + void BeginEventInt( + LPCWSTR pLabel, + INT Data); + + void EndEvent(); +} + +[ + uuid(9d06dffa-d1e5-4d07-83a8-1bb123f2f841), + object, + local, + pointer_default(unique) +] +interface ID3D11Device2 : ID3D11Device1 +{ + void GetImmediateContext2( + ID3D11DeviceContext2 **ppImmediateContext); + + HRESULT CreateDeferredContext2( + UINT ContextFlags, + ID3D11DeviceContext2 **ppDeferredContext); + + void GetResourceTilling( + ID3D11Resource *pTiledResource, + UINT *pNumTilesForEntireResource, + D3D11_PACKED_MIP_DESC *pPackedMipDesc, + D3D11_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + UINT *pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + D3D11_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + HRESULT CheckMultisampleQualityLevels1( + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + UINT *pNumQualityLevels); +} -- 2.7.4