~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/d3d10core/buffer.c

Version: ~ [ wine-1.5.31 ] ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Copyright 2009 Henri Verbeet 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  */
 19 
 20 #include "config.h"
 21 #include "wine/port.h"
 22 
 23 #include "d3d10core_private.h"
 24 
 25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10core);
 26 
 27 /* IUnknown methods */
 28 
 29 static HRESULT STDMETHODCALLTYPE d3d10_buffer_QueryInterface(ID3D10Buffer *iface, REFIID riid, void **object)
 30 {
 31     TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
 32 
 33     if (IsEqualGUID(riid, &IID_ID3D10Buffer)
 34             || IsEqualGUID(riid, &IID_ID3D10Resource)
 35             || IsEqualGUID(riid, &IID_ID3D10DeviceChild)
 36             || IsEqualGUID(riid, &IID_IUnknown))
 37     {
 38         IUnknown_AddRef(iface);
 39         *object = iface;
 40         return S_OK;
 41     }
 42 
 43     WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
 44 
 45     *object = NULL;
 46     return E_NOINTERFACE;
 47 }
 48 
 49 static ULONG STDMETHODCALLTYPE d3d10_buffer_AddRef(ID3D10Buffer *iface)
 50 {
 51     struct d3d10_buffer *This = (struct d3d10_buffer *)iface;
 52     ULONG refcount = InterlockedIncrement(&This->refcount);
 53 
 54     TRACE("%p increasing refcount to %u\n", This, refcount);
 55 
 56     return refcount;
 57 }
 58 
 59 static ULONG STDMETHODCALLTYPE d3d10_buffer_Release(ID3D10Buffer *iface)
 60 {
 61     struct d3d10_buffer *This = (struct d3d10_buffer *)iface;
 62     ULONG refcount = InterlockedDecrement(&This->refcount);
 63 
 64     TRACE("%p decreasing refcount to %u\n", This, refcount);
 65 
 66     if (!refcount)
 67     {
 68         IWineD3DBuffer_Release(This->wined3d_buffer);
 69         HeapFree(GetProcessHeap(), 0, This);
 70     }
 71 
 72     return refcount;
 73 }
 74 
 75 /* ID3D10DeviceChild methods */
 76 
 77 static void STDMETHODCALLTYPE d3d10_buffer_GetDevice(ID3D10Buffer *iface, ID3D10Device **device)
 78 {
 79     FIXME("iface %p, device %p stub!\n", iface, device);
 80 }
 81 
 82 static HRESULT STDMETHODCALLTYPE d3d10_buffer_GetPrivateData(ID3D10Buffer *iface,
 83         REFGUID guid, UINT *data_size, void *data)
 84 {
 85     FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
 86             iface, debugstr_guid(guid), data_size, data);
 87 
 88     return E_NOTIMPL;
 89 }
 90 
 91 static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateData(ID3D10Buffer *iface,
 92         REFGUID guid, UINT data_size, const void *data)
 93 {
 94     FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
 95             iface, debugstr_guid(guid), data_size, data);
 96 
 97     return E_NOTIMPL;
 98 }
 99 
100 static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateDataInterface(ID3D10Buffer *iface,
101         REFGUID guid, const IUnknown *data)
102 {
103     FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
104 
105     return E_NOTIMPL;
106 }
107 
108 /* ID3D10Resource methods */
109 
110 static void STDMETHODCALLTYPE d3d10_buffer_GetType(ID3D10Buffer *iface, D3D10_RESOURCE_DIMENSION *resource_dimension)
111 {
112     TRACE("iface %p, resource_dimension %p\n", iface, resource_dimension);
113 
114     *resource_dimension = D3D10_RESOURCE_DIMENSION_BUFFER;
115 }
116 
117 static void STDMETHODCALLTYPE d3d10_buffer_SetEvictionPriority(ID3D10Buffer *iface, UINT eviction_priority)
118 {
119     FIXME("iface %p, eviction_priority %u stub!\n", iface, eviction_priority);
120 }
121 
122 static UINT STDMETHODCALLTYPE d3d10_buffer_GetEvictionPriority(ID3D10Buffer *iface)
123 {
124     FIXME("iface %p stub!\n", iface);
125 
126     return 0;
127 }
128 
129 /* ID3D10Buffer methods */
130 
131 static HRESULT STDMETHODCALLTYPE d3d10_buffer_Map(ID3D10Buffer *iface, D3D10_MAP map_type, UINT map_flags, void **data)
132 {
133     FIXME("iface %p, map_type %u, map_flags %#x, data %p stub!\n", iface, map_type, map_flags, data);
134 
135     return E_NOTIMPL;
136 }
137 
138 static void STDMETHODCALLTYPE d3d10_buffer_Unmap(ID3D10Buffer *iface)
139 {
140     FIXME("iface %p stub!\n", iface);
141 }
142 
143 static void STDMETHODCALLTYPE d3d10_buffer_GetDesc(ID3D10Buffer *iface, D3D10_BUFFER_DESC *desc)
144 {
145     FIXME("iface %p, desc %p stub!\n", iface, desc);
146 }
147 
148 const struct ID3D10BufferVtbl d3d10_buffer_vtbl =
149 {
150     /* IUnknown methods */
151     d3d10_buffer_QueryInterface,
152     d3d10_buffer_AddRef,
153     d3d10_buffer_Release,
154     /* ID3D10DeviceChild methods */
155     d3d10_buffer_GetDevice,
156     d3d10_buffer_GetPrivateData,
157     d3d10_buffer_SetPrivateData,
158     d3d10_buffer_SetPrivateDataInterface,
159     /* ID3D10Resource methods */
160     d3d10_buffer_GetType,
161     d3d10_buffer_SetEvictionPriority,
162     d3d10_buffer_GetEvictionPriority,
163     /* ID3D10Buffer methods */
164     d3d10_buffer_Map,
165     d3d10_buffer_Unmap,
166     d3d10_buffer_GetDesc,
167 };
168 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.