wined3d: Introduce wined3d_device_context_set_vertex_declaration().
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
a130d55cde
commit
55b0888314
|
@ -1887,21 +1887,9 @@ struct wined3d_device_context * CDECL wined3d_device_get_immediate_context(struc
|
|||
void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device,
|
||||
struct wined3d_vertex_declaration *declaration)
|
||||
{
|
||||
struct wined3d_state *state = device->cs->c.state;
|
||||
struct wined3d_vertex_declaration *prev;
|
||||
|
||||
TRACE("device %p, declaration %p.\n", device, declaration);
|
||||
|
||||
prev = state->vertex_declaration;
|
||||
if (declaration == prev)
|
||||
return;
|
||||
|
||||
if (declaration)
|
||||
wined3d_vertex_declaration_incref(declaration);
|
||||
state->vertex_declaration = declaration;
|
||||
wined3d_device_context_emit_set_vertex_declaration(&device->cs->c, declaration);
|
||||
if (prev)
|
||||
wined3d_vertex_declaration_decref(prev);
|
||||
wined3d_device_context_set_vertex_declaration(&device->cs->c, declaration);
|
||||
}
|
||||
|
||||
struct wined3d_vertex_declaration * CDECL wined3d_device_get_vertex_declaration(const struct wined3d_device *device)
|
||||
|
@ -2381,6 +2369,26 @@ void CDECL wined3d_device_context_set_index_buffer(struct wined3d_device_context
|
|||
wined3d_buffer_decref(prev_buffer);
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_context_set_vertex_declaration(struct wined3d_device_context *context,
|
||||
struct wined3d_vertex_declaration *declaration)
|
||||
{
|
||||
struct wined3d_state *state = context->state;
|
||||
struct wined3d_vertex_declaration *prev;
|
||||
|
||||
TRACE("context %p, declaration %p.\n", context, declaration);
|
||||
|
||||
prev = state->vertex_declaration;
|
||||
if (declaration == prev)
|
||||
return;
|
||||
|
||||
if (declaration)
|
||||
wined3d_vertex_declaration_incref(declaration);
|
||||
state->vertex_declaration = declaration;
|
||||
wined3d_device_context_emit_set_vertex_declaration(context, declaration);
|
||||
if (prev)
|
||||
wined3d_vertex_declaration_decref(prev);
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader)
|
||||
{
|
||||
TRACE("device %p, shader %p.\n", device, shader);
|
||||
|
|
|
@ -180,6 +180,7 @@
|
|||
@ cdecl wined3d_device_context_set_shader_resource_view(ptr long long ptr)
|
||||
@ 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)
|
||||
@ cdecl wined3d_device_context_set_viewports(ptr long ptr)
|
||||
|
||||
@ cdecl wined3d_output_find_closest_matching_mode(ptr ptr)
|
||||
|
|
|
@ -2584,6 +2584,8 @@ HRESULT __cdecl wined3d_device_context_set_stream_source(struct wined3d_device_c
|
|||
void __cdecl wined3d_device_context_set_unordered_access_view(struct wined3d_device_context *context,
|
||||
enum wined3d_pipeline pipeline, unsigned int idx, struct wined3d_unordered_access_view *uav,
|
||||
unsigned int initial_count);
|
||||
void __cdecl wined3d_device_context_set_vertex_declaration(struct wined3d_device_context *context,
|
||||
struct wined3d_vertex_declaration *declaration);
|
||||
void __cdecl wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
|
||||
const struct wined3d_viewport *viewports);
|
||||
|
||||
|
|
Loading…
Reference in New Issue