d3d10_1.idl 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * Copyright 2010 Jacek Caban for CodeWeavers
  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. cpp_quote("#ifndef _D3D10_1_CONSTANTS")
  21. cpp_quote("#define _D3D10_1_CONSTANTS")
  22. const UINT D3D10_1_DEFAULT_SAMPLE_MASK = 0xffffffff;
  23. const UINT D3D10_1_GS_INPUT_REGISTER_COUNT = 32;
  24. const UINT D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
  25. const UINT D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
  26. const UINT D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
  27. const UINT D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
  28. const UINT D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
  29. const UINT D3D10_1_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
  30. const UINT D3D10_1_SHADER_MAJOR_VERSION = 4;
  31. const UINT D3D10_1_SHADER_MINOR_VERSION = 1;
  32. const UINT D3D10_1_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
  33. const UINT D3D10_1_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 256;
  34. const UINT D3D10_1_SO_BUFFER_SLOT_COUNT = 4;
  35. const UINT D3D10_1_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER = 1;
  36. const UINT D3D10_1_SO_SINGLE_BUFFER_COMPONENT_LIMIT = 64;
  37. const UINT D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT = 32;
  38. const UINT D3D10_1_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
  39. const UINT D3D10_1_VS_INPUT_REGISTER_COUNT = 32;
  40. const UINT D3D10_1_VS_OUTPUT_REGISTER_COUNT = 32;
  41. cpp_quote("#endif")
  42. cpp_quote("#define D3D10_1_FLOAT16_FUSED_TOLERANCE_IN_ULP (0.6)")
  43. cpp_quote("#define D3D10_1_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP (0.6f)")
  44. import "d3d10.idl";
  45. cpp_quote("#include <d3d10_1shader.h>")
  46. typedef enum D3D10_FEATURE_LEVEL1
  47. {
  48. D3D10_FEATURE_LEVEL_10_0 = 0xa000,
  49. D3D10_FEATURE_LEVEL_10_1 = 0xa100,
  50. D3D10_FEATURE_LEVEL_9_1 = 0x9100,
  51. D3D10_FEATURE_LEVEL_9_2 = 0x9200,
  52. D3D10_FEATURE_LEVEL_9_3 = 0x9300
  53. } D3D10_FEATURE_LEVEL1;
  54. typedef struct D3D10_RENDER_TARGET_BLEND_DESC1
  55. {
  56. BOOL BlendEnable;
  57. D3D10_BLEND SrcBlend;
  58. D3D10_BLEND DestBlend;
  59. D3D10_BLEND_OP BlendOp;
  60. D3D10_BLEND SrcBlendAlpha;
  61. D3D10_BLEND DestBlendAlpha;
  62. D3D10_BLEND_OP BlendOpAlpha;
  63. UINT8 RenderTargetWriteMask;
  64. } D3D10_RENDER_TARGET_BLEND_DESC1;
  65. typedef struct D3D10_BLEND_DESC1
  66. {
  67. BOOL AlphaToCoverageEnable;
  68. BOOL IndependentBlendEnable;
  69. D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT];
  70. } D3D10_BLEND_DESC1;
  71. [
  72. uuid(edad8d99-8a35-4d6d-8566-2ea276cde161),
  73. object,
  74. local,
  75. pointer_default(unique)
  76. ]
  77. interface ID3D10BlendState1 : ID3D10BlendState
  78. {
  79. void GetDesc1([out] D3D10_BLEND_DESC1 *pDesc);
  80. }
  81. typedef struct D3D10_TEXCUBE_ARRAY_SRV1
  82. {
  83. UINT MostDetailedMip;
  84. UINT MipLevels;
  85. UINT First2DArrayFace;
  86. UINT NumCubes;
  87. } D3D10_TEXCUBE_ARRAY_SRV1;
  88. typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION1;
  89. typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1
  90. {
  91. DXGI_FORMAT Format;
  92. D3D10_SRV_DIMENSION1 ViewDimension;
  93. union {
  94. D3D10_BUFFER_SRV Buffer;
  95. D3D10_TEX1D_SRV Texture1D;
  96. D3D10_TEX1D_ARRAY_SRV Texture1DArray;
  97. D3D10_TEX2D_SRV Texture2D;
  98. D3D10_TEX2D_ARRAY_SRV Texture2DArray;
  99. D3D10_TEX2DMS_SRV Texture2DMS;
  100. D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray;
  101. D3D10_TEX3D_SRV Texture3D;
  102. D3D10_TEXCUBE_SRV TextureCube;
  103. D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray;
  104. };
  105. } D3D10_SHADER_RESOURCE_VIEW_DESC1;
  106. [
  107. uuid(9b7e4c87-342c-4106-a19f-4f2704f689f0),
  108. object,
  109. local,
  110. pointer_default(unique)
  111. ]
  112. interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView
  113. {
  114. void GetDesc1([out] D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc);
  115. }
  116. [
  117. uuid(9b7e4c8f-342c-4106-a19f-4f2704f689f0),
  118. object,
  119. local,
  120. pointer_default(unique)
  121. ]
  122. interface ID3D10Device1 : ID3D10Device
  123. {
  124. HRESULT CreateShaderResourceView1(
  125. [in] ID3D10Resource *pResource,
  126. [in, out] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc,
  127. [out] ID3D10ShaderResourceView1 **ppSRView);
  128. HRESULT CreateBlendState1(
  129. [in] const D3D10_BLEND_DESC1 *pBlendStateDesc,
  130. [out] ID3D10BlendState1 **ppBlendState);
  131. D3D10_FEATURE_LEVEL1 GetFeatureLevel();
  132. }
  133. const UINT D3D10_1_SDK_VERSION = 0x20;
  134. cpp_quote("HRESULT WINAPI D3D10CreateDevice1(IDXGIAdapter*,D3D10_DRIVER_TYPE,")
  135. cpp_quote(" HMODULE,UINT,D3D10_FEATURE_LEVEL1,UINT,ID3D10Device1**);")
  136. [local] HRESULT __stdcall D3D10CreateDeviceAndSwapChain1(IDXGIAdapter *adapter, enum D3D10_DRIVER_TYPE driver_type,
  137. HMODULE swrast, UINT flags, D3D10_FEATURE_LEVEL1 feature_level, UINT sdk_version,
  138. DXGI_SWAP_CHAIN_DESC *swapchain_desc, IDXGISwapChain **swapchain, ID3D10Device1 **device);