[PATCH 5/5] d3d10core: Implement d3d10_device_IAGetVertexBuffers().
Henri Verbeet
hverbeet at codeweavers.com
Tue Nov 20 15:40:22 CST 2012
---
dlls/d3d10core/device.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 2501da99..853c538 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -527,8 +527,31 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device *iface,
static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device *iface,
UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers, UINT *strides, UINT *offsets)
{
- FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p stub!\n",
+ struct d3d10_device *device = impl_from_ID3D10Device(iface);
+ unsigned int i;
+
+ TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
iface, start_slot, buffer_count, buffers, strides, offsets);
+
+ for (i = 0; i < buffer_count; ++i)
+ {
+ struct wined3d_buffer *wined3d_buffer;
+ struct d3d10_buffer *buffer_impl;
+
+ if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i,
+ &wined3d_buffer, &offsets[i], &strides[i])))
+ ERR("Failed to get vertex buffer.\n");
+
+ if (!wined3d_buffer)
+ {
+ buffers[i] = NULL;
+ continue;
+ }
+
+ buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
+ buffers[i] = &buffer_impl->ID3D10Buffer_iface;
+ ID3D10Buffer_AddRef(buffers[i]);
+ }
}
static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device *iface,
--
1.7.8.6
More information about the wine-patches
mailing list