d3d11_2.idl 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*
  2. * Copyright 2017 Ihsan Akmal
  3. *
  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.
  8. *
  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.
  13. *
  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
  17. */
  18. import "oaidl.idl";
  19. import "ocidl.idl";
  20. import "dxgi1_3.idl";
  21. import "d3dcommon.idl";
  22. import "d3d11_1.idl";
  23. const UINT D3D11_PACKED_TILE = 0xffffffff;
  24. typedef enum D3D11_TILE_MAPPING_FLAG
  25. {
  26. D3D11_TILE_MAPPING_NO_OVERWRITE = 0x1,
  27. } D3D11_TILE_MAPPING_FLAG;
  28. typedef enum D3D11_TILE_RANGE_FLAG
  29. {
  30. D3D11_TILE_RANGE_NULL = 0x1,
  31. D3D11_TILE_RANGE_SKIP = 0x2,
  32. D3D11_TILE_RANGE_REUSE_SINGLE_TILE = 0x4,
  33. } D3D11_TILE_RANGE_FLAG;
  34. typedef enum D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG
  35. {
  36. D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE = 0x1,
  37. } D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG;
  38. typedef enum D3D11_TILE_COPY_FLAG
  39. {
  40. D3D11_TILE_COPY_NO_OVERWRITE = 0x1,
  41. D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
  42. D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
  43. } D3D11_TILE_COPY_FLAG;
  44. typedef struct D3D11_TILED_RESOURCE_COORDINATE
  45. {
  46. UINT X;
  47. UINT Y;
  48. UINT Z;
  49. UINT Subresource;
  50. } D3D11_TILED_RESOURCE_COORDINATE;
  51. typedef struct D3D11_TILE_REGION_SIZE
  52. {
  53. UINT NumTiles;
  54. BOOL bUseBox;
  55. UINT Width;
  56. UINT16 Height;
  57. UINT16 Depth;
  58. } D3D11_TILE_REGION_SIZE;
  59. typedef struct D3D11_SUBRESOURCE_TILING
  60. {
  61. UINT WidthInTiles;
  62. UINT16 HeightInTiles;
  63. UINT16 DepthInTiles;
  64. UINT StartTileIndexInOverallResource;
  65. } D3D11_SUBRESOURCE_TILING;
  66. typedef struct D3D11_TILE_SHAPE
  67. {
  68. UINT WidthInTexels;
  69. UINT HeightInTexels;
  70. UINT DepthInTexels;
  71. } D3D11_TILE_SHAPE;
  72. typedef struct D3D11_PACKED_MIP_DESC
  73. {
  74. UINT8 NumStandardMips;
  75. UINT8 NumPackedMips;
  76. UINT NumTilesForPackedMips;
  77. UINT StartTileIndexInOverallResource;
  78. } D3D11_PACKED_MIP_DESC;
  79. [
  80. uuid(420d5b32-b90c-4da4-bef0-359f6a24a83a),
  81. object,
  82. local,
  83. pointer_default(unique)
  84. ]
  85. interface ID3D11DeviceContext2 : ID3D11DeviceContext1
  86. {
  87. HRESULT UpdateTileMappings(
  88. ID3D11Resource *resource,
  89. UINT region_count,
  90. const D3D11_TILED_RESOURCE_COORDINATE *region_start_coordinates,
  91. const D3D11_TILE_REGION_SIZE *region_sizes,
  92. ID3D11Buffer *pool,
  93. UINT range_count,
  94. const UINT *range_flags,
  95. const UINT *pool_start_offsets,
  96. const UINT *range_tile_counts,
  97. UINT flags
  98. );
  99. HRESULT CopyTileMappings(
  100. ID3D11Resource *dst_resource,
  101. const D3D11_TILED_RESOURCE_COORDINATE *dst_start_coordinate,
  102. ID3D11Resource *src_resource,
  103. const D3D11_TILED_RESOURCE_COORDINATE *src_start_coordinate,
  104. const D3D11_TILE_REGION_SIZE *region_size,
  105. UINT flags
  106. );
  107. void CopyTiles(
  108. ID3D11Resource *resource,
  109. const D3D11_TILED_RESOURCE_COORDINATE *start_coordinate,
  110. const D3D11_TILE_REGION_SIZE *size,
  111. ID3D11Buffer *buffer,
  112. UINT64 start_offset,
  113. UINT flags
  114. );
  115. void UpdateTiles(
  116. ID3D11Resource *dst_resource,
  117. const D3D11_TILED_RESOURCE_COORDINATE *dst_start_coordinate,
  118. const D3D11_TILE_REGION_SIZE *dst_region_size,
  119. const void *src_data,
  120. UINT flags
  121. );
  122. HRESULT ResizeTilePool(
  123. ID3D11Buffer *pool,
  124. UINT64 size
  125. );
  126. void TiledResourceBarrier(
  127. ID3D11DeviceChild *before_barrier,
  128. ID3D11DeviceChild *after_barrier
  129. );
  130. BOOL IsAnnotationEnabled();
  131. void SetMarkerInt(const WCHAR *label, int data);
  132. void BeginEventInt(const WCHAR *label, int data);
  133. void EndEvent();
  134. }
  135. [
  136. uuid(9d06dffa-d1e5-4d07-83a8-1bb123f2f841),
  137. object,
  138. local,
  139. pointer_default(unique)
  140. ]
  141. interface ID3D11Device2 : ID3D11Device1
  142. {
  143. void GetImmediateContext2(ID3D11DeviceContext2 **context);
  144. HRESULT CreateDeferredContext2(UINT flags, ID3D11DeviceContext2 **context);
  145. void GetResourceTiling(
  146. ID3D11Resource *resource,
  147. UINT *tile_count,
  148. D3D11_PACKED_MIP_DESC *mip_desc,
  149. D3D11_TILE_SHAPE *tile_shape,
  150. UINT *subresource_tiling_count,
  151. UINT first_subresource_tiling,
  152. D3D11_SUBRESOURCE_TILING *subresource_tiling
  153. );
  154. HRESULT CheckMultisampleQualityLevels1(
  155. DXGI_FORMAT format,
  156. UINT sample_count,
  157. UINT flags,
  158. UINT *quality_level_count
  159. );
  160. }