wined3d: Introduce wined3d_device_context_draw().

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:
Zebediah Figura 2021-03-27 14:34:23 -05:00 committed by Alexandre Julliard
parent ebf9ca12c1
commit 08e8cd1b01
3 changed files with 17 additions and 8 deletions

View File

@ -2397,6 +2397,18 @@ void CDECL wined3d_device_context_set_stream_output(struct wined3d_device_contex
wined3d_buffer_decref(prev_buffer);
}
void CDECL wined3d_device_context_draw(struct wined3d_device_context *context, unsigned int start_vertex,
unsigned int vertex_count, unsigned int start_instance, unsigned int instance_count)
{
struct wined3d_state *state = context->state;
TRACE("context %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
context, start_vertex, vertex_count, start_instance, instance_count);
wined3d_device_context_emit_draw(context, state->primitive_type, state->patch_vertex_count,
0, start_vertex, vertex_count, start_instance, instance_count, false);
}
void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader)
{
TRACE("device %p, shader %p.\n", device, shader);
@ -4441,12 +4453,9 @@ void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device
HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT start_vertex, UINT vertex_count)
{
struct wined3d_state *state = device->cs->c.state;
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type,
state->patch_vertex_count, 0, start_vertex, vertex_count, 0, 0, false);
wined3d_device_context_draw(&device->cs->c, start_vertex, vertex_count, 0, 0);
return WINED3D_OK;
}
@ -4454,13 +4463,10 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device,
UINT start_vertex, UINT vertex_count, UINT start_instance, UINT instance_count)
{
struct wined3d_state *state = device->cs->c.state;
TRACE("device %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
device, start_vertex, vertex_count, start_instance, instance_count);
wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type, state->patch_vertex_count,
0, start_vertex, vertex_count, start_instance, instance_count, false);
wined3d_device_context_draw(&device->cs->c, start_vertex, vertex_count, start_instance, instance_count);
}
void CDECL wined3d_device_draw_primitive_instanced_indirect(struct wined3d_device *device,

View File

@ -166,6 +166,7 @@
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
@ cdecl wined3d_device_validate_device(ptr ptr)
@ cdecl wined3d_device_context_draw(ptr long long long long)
@ cdecl wined3d_device_context_dispatch(ptr long long long)
@ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long)
@ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long)

View File

@ -2559,6 +2559,8 @@ void __cdecl wined3d_device_context_dispatch(struct wined3d_device_context *cont
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z);
void __cdecl wined3d_device_context_dispatch_indirect(struct wined3d_device_context *context,
struct wined3d_buffer *buffer, unsigned int offset);
void __cdecl wined3d_device_context_draw(struct wined3d_device_context *context, unsigned int start_vertex,
unsigned int vertex_count, unsigned int start_instance, unsigned int instance_count);
void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_context *context,
struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask);
void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context,