wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_viewports().
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
b18a48eb70
commit
911ed1caf1
|
@ -1147,18 +1147,18 @@ static void wined3d_cs_exec_set_viewports(struct wined3d_cs *cs, const void *dat
|
||||||
device_invalidate_state(cs->c.device, STATE_VIEWPORT);
|
device_invalidate_state(cs->c.device, STATE_VIEWPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wined3d_cs_emit_set_viewports(struct wined3d_cs *cs, unsigned int viewport_count,
|
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
|
||||||
const struct wined3d_viewport *viewports)
|
const struct wined3d_viewport *viewports)
|
||||||
{
|
{
|
||||||
struct wined3d_cs_set_viewports *op;
|
struct wined3d_cs_set_viewports *op;
|
||||||
|
|
||||||
op = wined3d_device_context_require_space(&cs->c, FIELD_OFFSET(struct wined3d_cs_set_viewports, viewports[viewport_count]),
|
op = wined3d_device_context_require_space(context,
|
||||||
WINED3D_CS_QUEUE_DEFAULT);
|
FIELD_OFFSET(struct wined3d_cs_set_viewports,viewports[viewport_count]), WINED3D_CS_QUEUE_DEFAULT);
|
||||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORTS;
|
op->opcode = WINED3D_CS_OP_SET_VIEWPORTS;
|
||||||
memcpy(op->viewports, viewports, viewport_count * sizeof(*viewports));
|
memcpy(op->viewports, viewports, viewport_count * sizeof(*viewports));
|
||||||
op->viewport_count = viewport_count;
|
op->viewport_count = viewport_count;
|
||||||
|
|
||||||
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
|
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wined3d_cs_exec_set_scissor_rects(struct wined3d_cs *cs, const void *data)
|
static void wined3d_cs_exec_set_scissor_rects(struct wined3d_cs *cs, const void *data)
|
||||||
|
|
|
@ -1698,7 +1698,7 @@ void CDECL wined3d_device_set_viewports(struct wined3d_device *device, unsigned
|
||||||
memset(state->viewports, 0, sizeof(state->viewports));
|
memset(state->viewports, 0, sizeof(state->viewports));
|
||||||
state->viewport_count = viewport_count;
|
state->viewport_count = viewport_count;
|
||||||
|
|
||||||
wined3d_cs_emit_set_viewports(device->cs, viewport_count, viewports);
|
wined3d_device_context_emit_set_viewports(&device->cs->c, viewport_count, viewports);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDECL wined3d_device_get_viewports(const struct wined3d_device *device, unsigned int *viewport_count,
|
void CDECL wined3d_device_get_viewports(const struct wined3d_device *device, unsigned int *viewport_count,
|
||||||
|
@ -1983,7 +1983,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
|
||||||
|
|
||||||
wined3d_cs_emit_set_material(device->cs, &state->material);
|
wined3d_cs_emit_set_material(device->cs, &state->material);
|
||||||
|
|
||||||
wined3d_cs_emit_set_viewports(device->cs, state->viewport_count, state->viewports);
|
wined3d_device_context_emit_set_viewports(context, state->viewport_count, state->viewports);
|
||||||
wined3d_cs_emit_set_scissor_rects(device->cs, state->scissor_rect_count, state->scissor_rects);
|
wined3d_cs_emit_set_scissor_rects(device->cs, state->scissor_rect_count, state->scissor_rects);
|
||||||
|
|
||||||
for (i = 0; i < LIGHTMAP_SIZE; ++i)
|
for (i = 0; i < LIGHTMAP_SIZE; ++i)
|
||||||
|
@ -5191,7 +5191,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||||
state->viewports[0].min_z = 0.0f;
|
state->viewports[0].min_z = 0.0f;
|
||||||
state->viewports[0].max_z = 1.0f;
|
state->viewports[0].max_z = 1.0f;
|
||||||
state->viewport_count = 1;
|
state->viewport_count = 1;
|
||||||
wined3d_cs_emit_set_viewports(device->cs, 1, state->viewports);
|
wined3d_device_context_emit_set_viewports(&device->cs->c, 1, state->viewports);
|
||||||
|
|
||||||
SetRect(&state->scissor_rects[0], 0, 0, view->width, view->height);
|
SetRect(&state->scissor_rects[0], 0, 0, view->width, view->height);
|
||||||
state->scissor_rect_count = 1;
|
state->scissor_rect_count = 1;
|
||||||
|
|
|
@ -4793,7 +4793,6 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||||
unsigned int initial_count) DECLSPEC_HIDDEN;
|
unsigned int initial_count) DECLSPEC_HIDDEN;
|
||||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||||
void wined3d_cs_emit_set_viewports(struct wined3d_cs *cs, unsigned int viewport_count, const struct wined3d_viewport *viewports) DECLSPEC_HIDDEN;
|
|
||||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||||
|
@ -4827,6 +4826,8 @@ void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_cont
|
||||||
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN;
|
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN;
|
||||||
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
|
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
|
||||||
struct wined3d_shader *shader) DECLSPEC_HIDDEN;
|
struct wined3d_shader *shader) DECLSPEC_HIDDEN;
|
||||||
|
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
|
||||||
|
const struct wined3d_viewport *viewports) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
|
static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue