1 module aurora.directx.d3d11.d3dcsx;
2 
3 version(Windows):
4 
5 import aurora.directx.com;
6 import aurora.directx.dxgi;
7 import aurora.directx.d3d11;
8 
9 //
10 // Constants
11 //
12 
13 enum int D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS = 4;
14 enum int D3DX11_FFT_MAX_TEMP_BUFFERS = 4;
15 enum int D3DX11_FFT_MAX_DIMENSIONS = 32;
16 
17 //
18 // Enumerations
19 //
20 
21 public enum D3DX11_FFT_CREATE_FLAG : int { 
22 	DO_NOT_ADDREF_BUFFERS  = 0x01L
23 }
24 
25 public enum D3DX11_FFT_DATA_TYPE : int { 
26 	REAL,
27 	COMPLEX
28 }
29 
30 public enum D3DX11_FFT_DIM_MASK : int { 
31 	MASK_1D  = 0x1,
32 	MASK_2D  = 0x3,
33 	MASK_3D  = 0x7
34 }
35 
36 public enum D3DX11_SCAN_DATA_TYPE : int { 
37 	FLOAT  = 1,
38 	INT = 2,
39 	UINT = 3
40 }
41 
42 public enum D3DX11_SCAN_DIRECTION : int { 
43 	FORWARD   = 1,
44 	BACKWARD = 2
45 }
46 
47 public enum D3DX11_SCAN_OPCODE : int { 
48 	ADD  = 1,
49 	MIN = 2,
50 	MAX = 3,
51 	MUL = 4,
52 	AND = 5,
53 	OR = 6,
54 	XOR = 7
55 }
56 
57 //
58 // Structures
59 //
60 
61 public struct D3DX11_FFT_BUFFER_INFO {
62 	uint NumTempBufferSizes;
63 	uint[D3DX11_FFT_MAX_TEMP_BUFFERS] TempBufferFloatSizes;
64 	uint NumPrecomputeBufferSizes;
65 	uint[D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS] PrecomputeBufferFloatSizes;
66 }
67 
68 public struct D3DX11_FFT_DESC {
69 	uint NumDimensions;
70 	uint[D3DX11_FFT_MAX_DIMENSIONS] ElementLengths;
71 	uint DimensionMask;
72 	D3DX11_FFT_DATA_TYPE Type;
73 }
74 
75 //
76 // Functions
77 //
78 
79 extern(Windows) HRESULT D3DX11CreateScan(ID3D11DeviceContext pDeviceContext, uint MaxElementScanSize, uint MaxScanCount, ID3DX11Scan *ppScan);
80 extern(Windows) HRESULT D3DX11CreateSegmentedScan(ID3D11DeviceContext pDeviceContext, uint MaxElementScanSize, ID3DX11SegmentedScan *ppScan);
81 extern(Windows) HRESULT D3DX11CreateFFT(ID3D11DeviceContext pDeviceContext,	const(D3DX11_FFT_DESC) *pDesc, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
82 extern(Windows) HRESULT D3DX11CreateFFT1DComplex(ID3D11DeviceContext pDeviceContext, uint X, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
83 extern(Windows) HRESULT D3DX11CreateFFT1DReal(ID3D11DeviceContext pDeviceContext, uint X, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
84 extern(Windows) HRESULT D3DX11CreateFFT2DComplex(ID3D11DeviceContext pDeviceContext, uint X, uint Y, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
85 extern(Windows) HRESULT D3DX11CreateFFT2DReal(ID3D11DeviceContext *pDeviceContext, uint X, uint Y, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
86 extern(Windows) HRESULT D3DX11CreateFFT3DComplex(ID3D11DeviceContext *pDeviceContext, uint X, uint Y, uint Z, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
87 extern(Windows) HRESULT D3DX11CreateFFT3DReal(ID3D11DeviceContext *pDeviceContext, uint X, uint Y, uint Z, uint Flags, D3DX11_FFT_BUFFER_INFO *pBufferInfo, ID3DX11FFT *ppFFT);
88 
89 //
90 // Interfaces
91 //
92 
93 mixin(uuid!(ID3DX11FFT, "b3f7a938-4c93-4310-a675-b30d6de50553"));
94 public interface ID3DX11FFT : IUnknown
95 {
96 extern(Windows):
97 	HRESULT AttachBuffersAndPrecompute(uint NumTempBuffers, const(ID3D11UnorderedAccessView) *ppTempBuffers, uint NumPrecomputeBuffers, const(ID3D11UnorderedAccessView) *ppPrecomputeBuffers);
98 	HRESULT ForwardTransform(const(ID3D11UnorderedAccessView) pInputBuffer, ID3D11UnorderedAccessView *ppOutputBuffer);
99 	float GetForwardScale();
100 	float GetInverseScale();
101 	HRESULT InverseTransform(const(ID3D11UnorderedAccessView) pInputBuffer, ID3D11UnorderedAccessView *ppOutputBuffer);
102 	HRESULT SetForwardScale(float ForwardScale);
103 	HRESULT SetInverseScale(float InverseScale);
104 }
105 
106 mixin(uuid!(ID3DX11Scan, "5089b68f-e71d-4d38-be8e-f363b95a9405"));
107 public interface ID3DX11Scan : IUnknown
108 {
109 extern(Windows):
110 	HRESULT Multiscan(D3DX11_SCAN_DATA_TYPE ElementType, D3DX11_SCAN_OPCODE OpCode, uint ElementScanSize, uint ElementScanPitch, uint ScanCount, ID3D11UnorderedAccessView pSrc, ID3D11UnorderedAccessView pDst);
111 	HRESULT Scan(D3DX11_SCAN_DATA_TYPE ElementType, D3DX11_SCAN_OPCODE OpCode, uint ElementScanSize, ID3D11UnorderedAccessView pSrc, ID3D11UnorderedAccessView pDst);
112 	HRESULT SetScanDirection(D3DX11_SCAN_DIRECTION Direction);
113 }
114 
115 mixin(uuid!(ID3DX11SegmentedScan, "a915128c-d954-4c79-bfe1-64db923194d6"));
116 public interface ID3DX11SegmentedScan : IUnknown
117 {
118 extern(Windows):
119 	HRESULT SegScan(D3DX11_SCAN_DATA_TYPE ElementType, D3DX11_SCAN_OPCODE OpCode, uint ElementScanSize, ID3D11UnorderedAccessView pSrc, ID3D11UnorderedAccessView pSrcElementFlags, ID3D11UnorderedAccessView pDst);
120 	HRESULT SetScanDirection(D3DX11_SCAN_DIRECTION Direction);
121 }