Commit 1993727e authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d8: Get rid of IDirect3DVertexBuffer8Impl.

parent e3ecfa59
...@@ -103,7 +103,6 @@ void fixup_caps(WINED3DCAPS *pWineCaps) DECLSPEC_HIDDEN; ...@@ -103,7 +103,6 @@ void fixup_caps(WINED3DCAPS *pWineCaps) DECLSPEC_HIDDEN;
typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl; typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl; typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl; typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl;
typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl;
struct d3d8 struct d3d8
{ {
...@@ -235,25 +234,18 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, struct d3d8_device *device, ...@@ -235,25 +234,18 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, struct d3d8_device *device,
DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) DECLSPEC_HIDDEN; DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) DECLSPEC_HIDDEN;
IDirect3DSurface8Impl *unsafe_impl_from_IDirect3DSurface8(IDirect3DSurface8 *iface) DECLSPEC_HIDDEN; IDirect3DSurface8Impl *unsafe_impl_from_IDirect3DSurface8(IDirect3DSurface8 *iface) DECLSPEC_HIDDEN;
/* ---------------------- */ struct d3d8_vertexbuffer
/* IDirect3DVertexBuffer8 */
/* ---------------------- */
/*****************************************************************************
* IDirect3DVertexBuffer8 implementation structure
*/
struct IDirect3DVertexBuffer8Impl
{ {
IDirect3DVertexBuffer8 IDirect3DVertexBuffer8_iface; IDirect3DVertexBuffer8 IDirect3DVertexBuffer8_iface;
LONG ref; LONG refcount;
struct wined3d_buffer *wineD3DVertexBuffer; struct wined3d_buffer *wined3d_buffer;
IDirect3DDevice8 *parentDevice; IDirect3DDevice8 *parent_device;
DWORD fvf; DWORD fvf;
}; };
HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, struct d3d8_device *device, HRESULT vertexbuffer_init(struct d3d8_vertexbuffer *buffer, struct d3d8_device *device,
UINT size, DWORD usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN; UINT size, DWORD usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN;
IDirect3DVertexBuffer8Impl *unsafe_impl_from_IDirect3DVertexBuffer8(IDirect3DVertexBuffer8 *iface) DECLSPEC_HIDDEN; struct d3d8_vertexbuffer *unsafe_impl_from_IDirect3DVertexBuffer8(IDirect3DVertexBuffer8 *iface) DECLSPEC_HIDDEN;
struct d3d8_indexbuffer struct d3d8_indexbuffer
{ {
......
...@@ -773,7 +773,7 @@ static HRESULT WINAPI d3d8_device_CreateVertexBuffer(IDirect3DDevice8 *iface, UI ...@@ -773,7 +773,7 @@ static HRESULT WINAPI d3d8_device_CreateVertexBuffer(IDirect3DDevice8 *iface, UI
DWORD usage, DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer8 **buffer) DWORD usage, DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer8 **buffer)
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
IDirect3DVertexBuffer8Impl *object; struct d3d8_vertexbuffer *object;
HRESULT hr; HRESULT hr;
TRACE("iface %p, size %u, usage %#x, fvf %#x, pool %#x, buffer %p.\n", TRACE("iface %p, size %u, usage %#x, fvf %#x, pool %#x, buffer %p.\n",
...@@ -1964,7 +1964,7 @@ static HRESULT WINAPI d3d8_device_ProcessVertices(IDirect3DDevice8 *iface, UINT ...@@ -1964,7 +1964,7 @@ static HRESULT WINAPI d3d8_device_ProcessVertices(IDirect3DDevice8 *iface, UINT
UINT dst_idx, UINT vertex_count, IDirect3DVertexBuffer8 *dst_buffer, DWORD flags) UINT dst_idx, UINT vertex_count, IDirect3DVertexBuffer8 *dst_buffer, DWORD flags)
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
IDirect3DVertexBuffer8Impl *dst = unsafe_impl_from_IDirect3DVertexBuffer8(dst_buffer); struct d3d8_vertexbuffer *dst = unsafe_impl_from_IDirect3DVertexBuffer8(dst_buffer);
HRESULT hr; HRESULT hr;
TRACE("iface %p, src_start_idx %u, dst_idx %u, vertex_count %u, dst_buffer %p, flags %#x.\n", TRACE("iface %p, src_start_idx %u, dst_idx %u, vertex_count %u, dst_buffer %p, flags %#x.\n",
...@@ -1972,7 +1972,7 @@ static HRESULT WINAPI d3d8_device_ProcessVertices(IDirect3DDevice8 *iface, UINT ...@@ -1972,7 +1972,7 @@ static HRESULT WINAPI d3d8_device_ProcessVertices(IDirect3DDevice8 *iface, UINT
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = wined3d_device_process_vertices(device->wined3d_device, src_start_idx, dst_idx, hr = wined3d_device_process_vertices(device->wined3d_device, src_start_idx, dst_idx,
vertex_count, dst->wineD3DVertexBuffer, NULL, flags, dst->fvf); vertex_count, dst->wined3d_buffer, NULL, flags, dst->fvf);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
...@@ -2632,7 +2632,7 @@ static HRESULT WINAPI d3d8_device_SetStreamSource(IDirect3DDevice8 *iface, ...@@ -2632,7 +2632,7 @@ static HRESULT WINAPI d3d8_device_SetStreamSource(IDirect3DDevice8 *iface,
UINT stream_idx, IDirect3DVertexBuffer8 *buffer, UINT stride) UINT stream_idx, IDirect3DVertexBuffer8 *buffer, UINT stride)
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
IDirect3DVertexBuffer8Impl *buffer_impl = unsafe_impl_from_IDirect3DVertexBuffer8(buffer); struct d3d8_vertexbuffer *buffer_impl = unsafe_impl_from_IDirect3DVertexBuffer8(buffer);
HRESULT hr; HRESULT hr;
TRACE("iface %p, stream_idx %u, buffer %p, stride %u.\n", TRACE("iface %p, stream_idx %u, buffer %p, stride %u.\n",
...@@ -2640,7 +2640,7 @@ static HRESULT WINAPI d3d8_device_SetStreamSource(IDirect3DDevice8 *iface, ...@@ -2640,7 +2640,7 @@ static HRESULT WINAPI d3d8_device_SetStreamSource(IDirect3DDevice8 *iface,
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = wined3d_device_set_stream_source(device->wined3d_device, stream_idx, hr = wined3d_device_set_stream_source(device->wined3d_device, stream_idx,
buffer_impl ? buffer_impl->wineD3DVertexBuffer : NULL, 0, stride); buffer_impl ? buffer_impl->wined3d_buffer : NULL, 0, stride);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
...@@ -2650,7 +2650,7 @@ static HRESULT WINAPI d3d8_device_GetStreamSource(IDirect3DDevice8 *iface, ...@@ -2650,7 +2650,7 @@ static HRESULT WINAPI d3d8_device_GetStreamSource(IDirect3DDevice8 *iface,
UINT stream_idx, IDirect3DVertexBuffer8 **buffer, UINT *stride) UINT stream_idx, IDirect3DVertexBuffer8 **buffer, UINT *stride)
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
IDirect3DVertexBuffer8Impl *buffer_impl; struct d3d8_vertexbuffer *buffer_impl;
struct wined3d_buffer *wined3d_buffer = NULL; struct wined3d_buffer *wined3d_buffer = NULL;
HRESULT hr; HRESULT hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment