1 module aurora.directx.d3d11.d3d11_3; 2 3 public import aurora.directx.d3d11.d3d11_2; 4 5 public: 6 7 /// 8 /// Constants 9 /// 10 11 /// 12 /// Functions 13 /// 14 15 /// 16 /// Enumerations 17 /// 18 19 enum D3D11_CONTEXT_TYPE : uint 20 { 21 TYPE_ALL = 0, 22 TYPE_3D = 1, 23 TYPE_COMPUTE = 2, 24 TYPE_COPY = 3, 25 TYPE_VIDEO = 4 26 } 27 28 enum D3D11_TEXTURE_LAYOUT : uint 29 { 30 LAYOUT_UNDEFINED = 0, 31 LAYOUT_ROW_MAJOR = 1, 32 LAYOUT_64K_STANDARD_SWIZZLE = 2 33 } 34 35 enum D3D11_CONSERVATIVE_RASTERIZATION_MODE : uint 36 { 37 OFF = 0, 38 ON = 1 39 } 40 41 enum D3D11_FENCE_FLAG : uint 42 { 43 NONE = 0x1, 44 SHARED = 0x2, 45 SHARED_CROSS_ADAPTER = 0x4 46 } 47 48 /// 49 /// Structures 50 /// 51 52 struct D3D11_TEXTURE2D_DESC1 53 { 54 uint Width; 55 uint Height; 56 uint MipLevels; 57 uint ArraySize; 58 DXGI_FORMAT Format; 59 DXGI_SAMPLE_DESC SampleDesc; 60 D3D11_USAGE Usage; 61 uint BindFlags; 62 uint CPUAccessFlags; 63 uint MiscFlags; 64 D3D11_TEXTURE_LAYOUT TextureLayout; 65 } 66 67 struct D3D11_TEXTURE3D_DESC1 68 { 69 uint Width; 70 uint Height; 71 uint Depth; 72 uint MipLevels; 73 DXGI_FORMAT Format; 74 D3D11_USAGE Usage; 75 uint BindFlags; 76 uint CPUAccessFlags; 77 uint MiscFlags; 78 D3D11_TEXTURE_LAYOUT TextureLayout; 79 } 80 81 struct D3D11_RASTERIZER_DESC2 82 { 83 D3D11_FILL_MODE FillMode; 84 D3D11_CULL_MODE CullMode; 85 bool FrontCounterClockwise; 86 int DepthBias; 87 float DepthBiasClamp; 88 float SlopeScaledDepthBias; 89 bool DepthClipEnable; 90 bool ScissorEnable; 91 bool MultisampleEnable; 92 bool AntialiasedLineEnable; 93 uint ForcedSampleCount; 94 D3D11_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster; 95 } 96 97 struct D3D11_TEX2D_SRV1 98 { 99 uint MostDetailedMip; 100 uint MipLevels; 101 uint PlaneSlice; 102 } 103 104 struct D3D11_TEX2D_ARRAY_SRV1 105 { 106 uint MostDetailedMip; 107 uint MipLevels; 108 uint FirstArraySlice; 109 uint ArraySize; 110 uint PlaneSlice; 111 } 112 113 struct D3D11_SHADER_RESOURCE_VIEW_DESC1 114 { 115 DXGI_FORMAT Format; 116 D3D11_SRV_DIMENSION ViewDimension; 117 union 118 { 119 D3D11_BUFFER_SRV Buffer; 120 D3D11_TEX1D_SRV Texture1D; 121 D3D11_TEX1D_ARRAY_SRV Texture1DArray; 122 D3D11_TEX2D_SRV1 Texture2D; 123 D3D11_TEX2D_ARRAY_SRV1 Texture2DArray; 124 D3D11_TEX2DMS_SRV Texture2DMS; 125 D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray; 126 D3D11_TEX3D_SRV Texture3D; 127 D3D11_TEXCUBE_SRV TextureCube; 128 D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray; 129 D3D11_BUFFEREX_SRV BufferEx; 130 }; 131 } 132 133 struct D3D11_TEX2D_RTV1 134 { 135 uint MipSlice; 136 uint PlaneSlice; 137 } 138 139 struct D3D11_TEX2D_ARRAY_RTV1 140 { 141 uint MipSlice; 142 uint FirstArraySlice; 143 uint ArraySize; 144 uint PlaneSlice; 145 } 146 147 struct D3D11_RENDER_TARGET_VIEW_DESC1 148 { 149 DXGI_FORMAT Format; 150 D3D11_RTV_DIMENSION ViewDimension; 151 union 152 { 153 D3D11_BUFFER_RTV Buffer; 154 D3D11_TEX1D_RTV Texture1D; 155 D3D11_TEX1D_ARRAY_RTV Texture1DArray; 156 D3D11_TEX2D_RTV1 Texture2D; 157 D3D11_TEX2D_ARRAY_RTV1 Texture2DArray; 158 D3D11_TEX2DMS_RTV Texture2DMS; 159 D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray; 160 D3D11_TEX3D_RTV Texture3D; 161 }; 162 } 163 164 struct D3D11_TEX2D_UAV1 165 { 166 uint MipSlice; 167 uint PlaneSlice; 168 } 169 170 struct D3D11_TEX2D_ARRAY_UAV1 171 { 172 uint MipSlice; 173 uint FirstArraySlice; 174 uint ArraySize; 175 uint PlaneSlice; 176 } 177 178 struct D3D11_UNORDERED_ACCESS_VIEW_DESC1 179 { 180 DXGI_FORMAT Format; 181 D3D11_UAV_DIMENSION ViewDimension; 182 union 183 { 184 D3D11_BUFFER_UAV Buffer; 185 D3D11_TEX1D_UAV Texture1D; 186 D3D11_TEX1D_ARRAY_UAV Texture1DArray; 187 D3D11_TEX2D_UAV1 Texture2D; 188 D3D11_TEX2D_ARRAY_UAV1 Texture2DArray; 189 D3D11_TEX3D_UAV Texture3D; 190 }; 191 } 192 193 struct D3D11_QUERY_DESC1 194 { 195 D3D11_QUERY Query; 196 uint MiscFlags; 197 D3D11_CONTEXT_TYPE ContextType; 198 } 199 200 /// 201 /// Interfaces 202 /// 203 204 mixin(uuid!(ID3D11Texture2D1, "51218251-1E33-4617-9CCB-4D3A4367E7BB")); 205 public interface ID3D11Texture2D1 : ID3D11Texture2D 206 { 207 extern(Windows): 208 void GetDesc1(D3D11_TEXTURE2D_DESC1 *pDesc); 209 } 210 211 mixin(uuid!(ID3D11Texture3D1, "0C711683-2853-4846-9BB0-F3E60639E46A")); 212 public interface ID3D11Texture3D1 : ID3D11Texture3D 213 { 214 extern(Windows): 215 void GetDesc1(D3D11_TEXTURE3D_DESC1 *pDesc); 216 } 217 218 mixin(uuid!(ID3D11RasterizerState2, "6fbd02fb-209f-46c4-b059-2ed15586a6ac")); 219 public interface ID3D11RasterizerState2 : ID3D11RasterizerState1 220 { 221 extern(Windows): 222 void GetDesc2(D3D11_RASTERIZER_DESC2 *pDesc); 223 } 224 225 mixin(uuid!(ID3D11ShaderResourceView1, "91308b87-9040-411d-8c67-c39253ce3802")); 226 public interface ID3D11ShaderResourceView1 : ID3D11ShaderResourceView 227 { 228 extern(Windows): 229 void GetDesc1(D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc); 230 } 231 232 mixin(uuid!(ID3D11RenderTargetView1, "ffbe2e23-f011-418a-ac56-5ceed7c5b94b")); 233 public interface ID3D11RenderTargetView1 : ID3D11RenderTargetView 234 { 235 extern(Windows): 236 void GetDesc1(D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc); 237 } 238 239 mixin(uuid!(ID3D11UnorderedAccessView1, "7b3b6153-a886-4544-ab37-6537c8500403")); 240 public interface ID3D11UnorderedAccessView1 : ID3D11UnorderedAccessView 241 { 242 extern(Windows): 243 void GetDesc1(D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc); 244 } 245 246 mixin(uuid!(ID3D11Query1, "631b4766-36dc-461d-8db6-c47e13e60916")); 247 public interface ID3D11Query1 : ID3D11Query 248 { 249 extern(Windows): 250 void GetDesc1(D3D11_QUERY_DESC1 *pDesc); 251 } 252 253 mixin(uuid!(ID3D11DeviceContext3, "b4e3c01d-e79e-4637-91b2-510e9f4c9b8f")); 254 public interface ID3D11DeviceContext3 : ID3D11DeviceContext2 255 { 256 extern(Windows): 257 void Flush1(D3D11_CONTEXT_TYPE ContextType, HANDLE hEvent); 258 void GetHardwareProtectionState(bool *pHwProtectionEnable); 259 void SetHardwareProtectionState(bool HwProtectionEnable); 260 } 261 262 mixin(uuid!(ID3D11Fence, "affde9d1-1df7-4bb7-8a34-0f46251dab80")); 263 public interface ID3D11Fence : ID3D11DeviceChild 264 { 265 extern(Windows): 266 HRESULT CreateSharedHandle(const SECURITY_ATTRIBUTES *pAttributes, uint Access, const wchar *Name, HANDLE *pHandle); 267 ulong GetCompletedValue(); 268 HRESULT SetEventOnCompletion(ulong Value, HANDLE hEvent); 269 } 270 271 mixin(uuid!(ID3D11DeviceContext4, "917600da-f58c-4c33-98d8-3e15b390fa24")); 272 public interface ID3D11DeviceContext4 : ID3D11DeviceContext3 273 { 274 extern(Windows): 275 HRESULT Signal(ID3D11Fence pFence, ulong Value); 276 HRESULT Wait(ID3D11Fence pFence,ulong Value); 277 } 278 279 mixin(uuid!(ID3D11Device3, "A05C8C37-D2C6-4732-B3A0-9CE0B0DC9AE6")); 280 public interface ID3D11Device3 : ID3D11Device2 281 { 282 extern(Windows): 283 HRESULT CreateDeferredContext3(uint ContextFlags, ID3D11DeviceContext3 *ppDeferredContext); 284 HRESULT CreateQuery1(const D3D11_QUERY_DESC1 *pQueryDesc1, ID3D11Query1 *ppQuery1); 285 HRESULT CreateRasterizerState2(const D3D11_RASTERIZER_DESC2 *pRasterizerDesc, ID3D11RasterizerState2 *ppRasterizerState); 286 HRESULT CreateRenderTargetView1(ID3D11Resource pResource, const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1, ID3D11RenderTargetView1 *ppRTView1); 287 HRESULT CreateShaderResourceView1(ID3D11Resource pResource, const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1, ID3D11ShaderResourceView1 *ppSRView1); 288 HRESULT CreateTexture2D1(const D3D11_TEXTURE2D_DESC1 *pDesc1, const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Texture2D1 *ppTexture2D); 289 HRESULT CreateTexture3D1(const D3D11_TEXTURE3D_DESC1 *pDesc1, const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Texture3D1 *ppTexture3D); 290 HRESULT CreateUnorderedAccessView1(ID3D11Resource pResource, const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1, ID3D11UnorderedAccessView1 *ppUAView1); 291 void GetImmediateContext3(ID3D11DeviceContext3 *ppImmediateContext); 292 void ReadFromSubresource(void *pDstData, uint DstRowPitch, uint DstDepthPitch, ID3D11Resource *pSrcResource, uint SrcSubresource, const D3D11_BOX *pSrcBox); 293 void WriteToSubresource(ID3D11Resource *pDstResource, uint DstSubresource, const D3D11_BOX *pDstBox, const void *pSrcData, uint SrcRowPitch, uint SrcDepthPitch); 294 }