ddraw: Use a less offensive handle table implementation for surfaces.
[wine/hramrach.git] / dlls / d3d10 / shader.c
blobd5d9e1655070fc5a65cefe586a1a3a3228a96125
1 /*
2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 * Copyright 2010 Rico Schüller
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.
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.
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
21 #include "config.h"
22 #include "wine/port.h"
24 #include "d3d10_private.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
28 /* IUnknown methods */
30 static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_QueryInterface(ID3D10ShaderReflection *iface, REFIID riid, void **object)
32 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
34 if (IsEqualGUID(riid, &IID_ID3D10ShaderReflection)
35 || IsEqualGUID(riid, &IID_IUnknown))
37 IUnknown_AddRef(iface);
38 *object = iface;
39 return S_OK;
42 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
44 *object = NULL;
45 return E_NOINTERFACE;
48 static ULONG STDMETHODCALLTYPE d3d10_shader_reflection_AddRef(ID3D10ShaderReflection *iface)
50 struct d3d10_shader_reflection *This = (struct d3d10_shader_reflection *)iface;
51 ULONG refcount = InterlockedIncrement(&This->refcount);
53 TRACE("%p increasing refcount to %u\n", This, refcount);
55 return refcount;
58 static ULONG STDMETHODCALLTYPE d3d10_shader_reflection_Release(ID3D10ShaderReflection *iface)
60 struct d3d10_shader_reflection *This = (struct d3d10_shader_reflection *)iface;
61 ULONG refcount = InterlockedDecrement(&This->refcount);
63 TRACE("%p decreasing refcount to %u\n", This, refcount);
65 if (!refcount)
67 HeapFree(GetProcessHeap(), 0, This);
70 return refcount;
73 /* ID3D10ShaderReflection methods */
75 static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetDesc(ID3D10ShaderReflection *iface, D3D10_SHADER_DESC *desc)
77 FIXME("iface %p, desc %p stub!\n", iface, desc);
79 return E_NOTIMPL;
82 static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByIndex(
83 ID3D10ShaderReflection *iface, UINT index)
85 FIXME("iface %p, index %u stub!\n", iface, index);
87 return NULL;
90 static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByName(
91 ID3D10ShaderReflection *iface, LPCSTR name)
93 FIXME("iface %p, name \"%s\" stub!\n", iface, name);
95 return NULL;
98 static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc(
99 ID3D10ShaderReflection *iface, UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc)
101 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
103 return E_NOTIMPL;
106 static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetInputParameterDesc(
107 ID3D10ShaderReflection *iface, UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc)
109 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
111 return E_NOTIMPL;
114 static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetOutputParameterDesc(
115 ID3D10ShaderReflection *iface, UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc)
117 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
119 return E_NOTIMPL;
122 const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl =
124 /* IUnknown methods */
125 d3d10_shader_reflection_QueryInterface,
126 d3d10_shader_reflection_AddRef,
127 d3d10_shader_reflection_Release,
128 /* ID3D10Effect methods */
129 d3d10_shader_reflection_GetDesc,
130 d3d10_shader_reflection_GetConstantBufferByIndex,
131 d3d10_shader_reflection_GetConstantBufferByName,
132 d3d10_shader_reflection_GetResourceBindingDesc,
133 d3d10_shader_reflection_GetInputParameterDesc,
134 d3d10_shader_reflection_GetOutputParameterDesc,