mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 20:53:35 +00:00
wined3d: Introduce wined3d_device_context_set_stream_output().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5fac8fb5fd
commit
5df6103ce0
|
@ -1224,27 +1224,9 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
|||
void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT idx,
|
||||
struct wined3d_buffer *buffer, UINT offset)
|
||||
{
|
||||
struct wined3d_stream_output *stream;
|
||||
struct wined3d_buffer *prev_buffer;
|
||||
|
||||
TRACE("device %p, idx %u, buffer %p, offset %u.\n", device, idx, buffer, offset);
|
||||
|
||||
if (idx >= WINED3D_MAX_STREAM_OUTPUT_BUFFERS)
|
||||
{
|
||||
WARN("Invalid stream output %u.\n", idx);
|
||||
return;
|
||||
}
|
||||
|
||||
stream = &device->cs->c.state->stream_output[idx];
|
||||
prev_buffer = stream->buffer;
|
||||
|
||||
if (buffer)
|
||||
wined3d_buffer_incref(buffer);
|
||||
stream->buffer = buffer;
|
||||
stream->offset = offset;
|
||||
wined3d_device_context_emit_set_stream_output(&device->cs->c, idx, buffer, offset);
|
||||
if (prev_buffer)
|
||||
wined3d_buffer_decref(prev_buffer);
|
||||
wined3d_device_context_set_stream_output(&device->cs->c, idx, buffer, offset);
|
||||
}
|
||||
|
||||
struct wined3d_buffer * CDECL wined3d_device_get_stream_output(struct wined3d_device *device,
|
||||
|
@ -2389,6 +2371,32 @@ void CDECL wined3d_device_context_set_vertex_declaration(struct wined3d_device_c
|
|||
wined3d_vertex_declaration_decref(prev);
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_context_set_stream_output(struct wined3d_device_context *context, unsigned int idx,
|
||||
struct wined3d_buffer *buffer, unsigned int offset)
|
||||
{
|
||||
struct wined3d_stream_output *stream;
|
||||
struct wined3d_buffer *prev_buffer;
|
||||
|
||||
TRACE("context %p, idx %u, buffer %p, offset %u.\n", context, idx, buffer, offset);
|
||||
|
||||
if (idx >= WINED3D_MAX_STREAM_OUTPUT_BUFFERS)
|
||||
{
|
||||
WARN("Invalid stream output %u.\n", idx);
|
||||
return;
|
||||
}
|
||||
|
||||
stream = &context->state->stream_output[idx];
|
||||
prev_buffer = stream->buffer;
|
||||
|
||||
if (buffer)
|
||||
wined3d_buffer_incref(buffer);
|
||||
stream->buffer = buffer;
|
||||
stream->offset = offset;
|
||||
wined3d_device_context_emit_set_stream_output(context, idx, buffer, offset);
|
||||
if (prev_buffer)
|
||||
wined3d_buffer_decref(prev_buffer);
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader)
|
||||
{
|
||||
TRACE("device %p, shader %p.\n", device, shader);
|
||||
|
|
|
@ -178,6 +178,7 @@
|
|||
@ cdecl wined3d_device_context_set_scissor_rects(ptr long ptr)
|
||||
@ cdecl wined3d_device_context_set_shader(ptr long ptr)
|
||||
@ cdecl wined3d_device_context_set_shader_resource_view(ptr long long ptr)
|
||||
@ cdecl wined3d_device_context_set_stream_output(ptr long ptr long)
|
||||
@ cdecl wined3d_device_context_set_stream_source(ptr long ptr long long)
|
||||
@ cdecl wined3d_device_context_set_unordered_access_view(ptr long long ptr long)
|
||||
@ cdecl wined3d_device_context_set_vertex_declaration(ptr ptr)
|
||||
|
|
|
@ -2579,6 +2579,8 @@ void __cdecl wined3d_device_context_set_shader(struct wined3d_device_context *co
|
|||
enum wined3d_shader_type type, struct wined3d_shader *shader);
|
||||
void __cdecl wined3d_device_context_set_shader_resource_view(struct wined3d_device_context *context,
|
||||
enum wined3d_shader_type type, unsigned int idx, struct wined3d_shader_resource_view *view);
|
||||
void __cdecl wined3d_device_context_set_stream_output(struct wined3d_device_context *context, unsigned int idx,
|
||||
struct wined3d_buffer *buffer, unsigned int offset);
|
||||
HRESULT __cdecl wined3d_device_context_set_stream_source(struct wined3d_device_context *context,
|
||||
unsigned int stream_idx, struct wined3d_buffer *buffer, unsigned int offset, unsigned int stride);
|
||||
void __cdecl wined3d_device_context_set_unordered_access_view(struct wined3d_device_context *context,
|
||||
|
|
Loading…
Reference in a new issue