Commit dc67be01 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_device_SOGetTargets().

parent 5b781d70
...@@ -713,8 +713,27 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device * ...@@ -713,8 +713,27 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device *
static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device *iface, static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device *iface,
UINT buffer_count, ID3D10Buffer **buffers, UINT *offsets) UINT buffer_count, ID3D10Buffer **buffers, UINT *offsets)
{ {
FIXME("iface %p, buffer_count %u, buffers %p, offsets %p stub!\n", struct d3d10_device *device = impl_from_ID3D10Device(iface);
unsigned int i;
TRACE("iface %p, buffer_count %u, buffers %p, offsets %p.\n",
iface, buffer_count, buffers, offsets); iface, buffer_count, buffers, offsets);
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_stream_output(device->wined3d_device, i, &offsets[i])))
{
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_RSGetState(ID3D10Device *iface, ID3D10RasterizerState **rasterizer_state) static void STDMETHODCALLTYPE d3d10_device_RSGetState(ID3D10Device *iface, ID3D10RasterizerState **rasterizer_state)
......
...@@ -1600,6 +1600,21 @@ void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT ...@@ -1600,6 +1600,21 @@ void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT
} }
} }
struct wined3d_buffer * CDECL wined3d_device_get_stream_output(struct wined3d_device *device,
UINT idx, UINT *offset)
{
TRACE("device %p, idx %u, offset %p.\n", device, idx, offset);
if (idx >= MAX_STREAM_OUT)
{
WARN("Invalid stream output %u.\n", idx);
return NULL;
}
*offset = device->stateBlock->state.stream_output[idx].offset;
return device->stateBlock->state.stream_output[idx].buffer;
}
HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx,
struct wined3d_buffer *buffer, UINT offset, UINT stride) struct wined3d_buffer *buffer, UINT offset, UINT stride)
{ {
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
@ cdecl wined3d_device_get_sampler_state(ptr long long) @ cdecl wined3d_device_get_sampler_state(ptr long long)
@ cdecl wined3d_device_get_scissor_rect(ptr ptr) @ cdecl wined3d_device_get_scissor_rect(ptr ptr)
@ cdecl wined3d_device_get_software_vertex_processing(ptr) @ cdecl wined3d_device_get_software_vertex_processing(ptr)
@ cdecl wined3d_device_get_stream_output(ptr long ptr)
@ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr) @ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr)
@ cdecl wined3d_device_get_stream_source_freq(ptr long ptr) @ cdecl wined3d_device_get_stream_source_freq(ptr long ptr)
@ cdecl wined3d_device_get_surface_from_dc(ptr ptr) @ cdecl wined3d_device_get_surface_from_dc(ptr ptr)
......
...@@ -2150,6 +2150,8 @@ DWORD __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *devi ...@@ -2150,6 +2150,8 @@ DWORD __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *devi
UINT sampler_idx, enum wined3d_sampler_state state); UINT sampler_idx, enum wined3d_sampler_state state);
void __cdecl wined3d_device_get_scissor_rect(const struct wined3d_device *device, RECT *rect); void __cdecl wined3d_device_get_scissor_rect(const struct wined3d_device *device, RECT *rect);
BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_device *device); BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_device *device);
struct wined3d_buffer * __cdecl wined3d_device_get_stream_output(struct wined3d_device *device,
UINT idx, UINT *offset);
HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *device, HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *device,
UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride); UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride);
HRESULT __cdecl wined3d_device_get_stream_source_freq(const struct wined3d_device *device, HRESULT __cdecl wined3d_device_get_stream_source_freq(const struct wined3d_device *device,
......
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