quartz: Add IAMFilterMiscFlags to null renderer.
[wine] / dlls / d3dcompiler_43 / reflection.c
1 /*
2  * Copyright 2009 Henri Verbeet for CodeWeavers
3  * Copyright 2010 Rico Schüller
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  *
19  */
20
21 #include "config.h"
22 #include "wine/port.h"
23
24 #include "d3dcompiler_private.h"
25
26 WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
27
28 /* IUnknown methods */
29
30 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_QueryInterface(ID3D11ShaderReflection *iface, REFIID riid, void **object)
31 {
32     TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
33
34     if (IsEqualGUID(riid, &IID_ID3D11ShaderReflection)
35             || IsEqualGUID(riid, &IID_IUnknown))
36     {
37         IUnknown_AddRef(iface);
38         *object = iface;
39         return S_OK;
40     }
41
42     WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
43
44     *object = NULL;
45     return E_NOINTERFACE;
46 }
47
48 static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_AddRef(ID3D11ShaderReflection *iface)
49 {
50     struct d3dcompiler_shader_reflection *This = (struct d3dcompiler_shader_reflection *)iface;
51     ULONG refcount = InterlockedIncrement(&This->refcount);
52
53     TRACE("%p increasing refcount to %u\n", This, refcount);
54
55     return refcount;
56 }
57
58 static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_Release(ID3D11ShaderReflection *iface)
59 {
60     struct d3dcompiler_shader_reflection *This = (struct d3dcompiler_shader_reflection *)iface;
61     ULONG refcount = InterlockedDecrement(&This->refcount);
62
63     TRACE("%p decreasing refcount to %u\n", This, refcount);
64
65     if (!refcount)
66     {
67         HeapFree(GetProcessHeap(), 0, This);
68     }
69
70     return refcount;
71 }
72
73 /* ID3D11ShaderReflection methods */
74
75 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11ShaderReflection *iface, D3D11_SHADER_DESC *desc)
76 {
77     FIXME("iface %p, desc %p stub!\n", iface, desc);
78
79     return E_NOTIMPL;
80 }
81
82 static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByIndex(
83         ID3D11ShaderReflection *iface, UINT index)
84 {
85     FIXME("iface %p, index %u stub!\n", iface, index);
86
87     return NULL;
88 }
89
90 static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName(
91         ID3D11ShaderReflection *iface, LPCSTR name)
92 {
93     FIXME("iface %p, name \"%s\" stub!\n", iface, name);
94
95     return NULL;
96 }
97
98 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDesc(
99         ID3D11ShaderReflection *iface, UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc)
100 {
101     FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
102
103     return E_NOTIMPL;
104 }
105
106 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameterDesc(
107         ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
108 {
109     FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
110
111     return E_NOTIMPL;
112 }
113
114 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParameterDesc(
115         ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
116 {
117     FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
118
119     return E_NOTIMPL;
120 }
121
122 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantParameterDesc(
123         ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
124 {
125     FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
126
127     return E_NOTIMPL;
128 }
129
130 static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetVariableByName(
131         ID3D11ShaderReflection *iface, LPCSTR name)
132 {
133     FIXME("iface %p, name %s stub!\n", iface, name);
134
135     return NULL;
136 }
137
138 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName(
139         ID3D11ShaderReflection *iface, LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc)
140 {
141     FIXME("iface %p, name %s, desc %p stub!\n", iface, name, desc);
142
143     return E_NOTIMPL;
144 }
145
146 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovInstructionCount(
147         ID3D11ShaderReflection *iface)
148 {
149     FIXME("iface %p stub!\n", iface);
150
151     return 0;
152 }
153
154 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovcInstructionCount(
155         ID3D11ShaderReflection *iface)
156 {
157     FIXME("iface %p stub!\n", iface);
158
159     return 0;
160 }
161
162 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConversionInstructionCount(
163         ID3D11ShaderReflection *iface)
164 {
165     FIXME("iface %p stub!\n", iface);
166
167     return 0;
168 }
169
170 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetBitwiseInstructionCount(
171         ID3D11ShaderReflection *iface)
172 {
173     FIXME("iface %p stub!\n", iface);
174
175     return 0;
176 }
177
178 static D3D_PRIMITIVE STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetGSInputPrimitive(
179         ID3D11ShaderReflection *iface)
180 {
181     FIXME("iface %p stub!\n", iface);
182
183     return 0;
184 }
185
186 static BOOL STDMETHODCALLTYPE d3dcompiler_shader_reflection_IsSampleFrequencyShader(
187         ID3D11ShaderReflection *iface)
188 {
189     FIXME("iface %p stub!\n", iface);
190
191     return 0;
192 }
193
194 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetNumInterfaceSlots(
195         ID3D11ShaderReflection *iface)
196 {
197     FIXME("iface %p stub!\n", iface);
198
199     return 0;
200 }
201
202 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMinFeatureLevel(
203         ID3D11ShaderReflection *iface, D3D_FEATURE_LEVEL *level)
204 {
205     FIXME("iface %p, level %p stub!\n", iface, level);
206
207     return E_NOTIMPL;
208 }
209
210 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetThreadGroupSize(
211         ID3D11ShaderReflection *iface, UINT *sizex, UINT *sizey, UINT *sizez)
212 {
213     FIXME("iface %p, sizex %p, sizey %p, sizez %p stub!\n", iface, sizex, sizey, sizez);
214
215     return 0;
216 }
217
218 const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl =
219 {
220     /* IUnknown methods */
221     d3dcompiler_shader_reflection_QueryInterface,
222     d3dcompiler_shader_reflection_AddRef,
223     d3dcompiler_shader_reflection_Release,
224     /* ID3D11ShaderReflection methods */
225     d3dcompiler_shader_reflection_GetDesc,
226     d3dcompiler_shader_reflection_GetConstantBufferByIndex,
227     d3dcompiler_shader_reflection_GetConstantBufferByName,
228     d3dcompiler_shader_reflection_GetResourceBindingDesc,
229     d3dcompiler_shader_reflection_GetInputParameterDesc,
230     d3dcompiler_shader_reflection_GetOutputParameterDesc,
231     d3dcompiler_shader_reflection_GetPatchConstantParameterDesc,
232     d3dcompiler_shader_reflection_GetVariableByName,
233     d3dcompiler_shader_reflection_GetResourceBindingDescByName,
234     d3dcompiler_shader_reflection_GetMovInstructionCount,
235     d3dcompiler_shader_reflection_GetMovcInstructionCount,
236     d3dcompiler_shader_reflection_GetConversionInstructionCount,
237     d3dcompiler_shader_reflection_GetBitwiseInstructionCount,
238     d3dcompiler_shader_reflection_GetGSInputPrimitive,
239     d3dcompiler_shader_reflection_IsSampleFrequencyShader,
240     d3dcompiler_shader_reflection_GetNumInterfaceSlots,
241     d3dcompiler_shader_reflection_GetMinFeatureLevel,
242     d3dcompiler_shader_reflection_GetThreadGroupSize,
243 };