Commit d3aebfed authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_cs_require_space().

parent 864a9f3e
......@@ -455,10 +455,10 @@ struct wined3d_cs_stop
enum wined3d_cs_op opcode;
};
static inline void *wined3d_cs_require_space(struct wined3d_cs *cs,
static inline void *wined3d_device_context_require_space(struct wined3d_device_context *context,
size_t size, enum wined3d_cs_queue_id queue_id)
{
return cs->c.ops->require_space(&cs->c, size, queue_id);
return context->ops->require_space(context, size, queue_id);
}
static inline void wined3d_device_context_submit(struct wined3d_device_context *context,
......@@ -625,7 +625,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
unsigned int i;
LONG pending;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_PRESENT;
op->dst_window_override = dst_window_override;
op->swapchain = swapchain;
......@@ -686,7 +686,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
rt_count = flags & WINED3DCLEAR_TARGET ? cs->device->adapter->d3d_info.limits.max_rt_count : 0;
op = wined3d_cs_require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]),
op = wined3d_device_context_require_space(&cs->c, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]),
WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_CLEAR;
op->flags = flags & (WINED3DCLEAR_TARGET | WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL);
......@@ -722,7 +722,7 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined
size_t size;
size = FIELD_OFFSET(struct wined3d_cs_clear, rects[1]) + sizeof(struct wined3d_fb_state);
op = wined3d_cs_require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, size, WINED3D_CS_QUEUE_DEFAULT);
op->fb = (void *)&op->rects[1];
op->opcode = WINED3D_CS_OP_CLEAR;
......@@ -890,7 +890,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
const struct wined3d_state *state = cs->device->state;
struct wined3d_cs_dispatch *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_DISPATCH;
op->parameters.indirect = FALSE;
op->parameters.u.direct.group_count_x = group_count_x;
......@@ -908,7 +908,7 @@ void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs,
const struct wined3d_state *state = cs->device->state;
struct wined3d_cs_dispatch *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_DISPATCH;
op->parameters.indirect = TRUE;
op->parameters.u.indirect.buffer = buffer;
......@@ -1049,7 +1049,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, enum wined3d_primitive_type pri
const struct wined3d_state *state = cs->device->state;
struct wined3d_cs_draw *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_DRAW;
op->primitive_type = primitive_type;
op->patch_vertex_count = patch_vertex_count;
......@@ -1073,7 +1073,7 @@ void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, enum wined3d_primitive
const struct wined3d_state *state = cs->device->state;
struct wined3d_cs_draw *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_DRAW;
op->primitive_type = primitive_type;
op->patch_vertex_count = patch_vertex_count;
......@@ -1101,7 +1101,7 @@ void wined3d_cs_emit_flush(struct wined3d_cs *cs)
{
struct wined3d_cs_flush *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_FLUSH;
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
......@@ -1120,7 +1120,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
{
struct wined3d_cs_set_predication *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
op->predicate = predicate;
op->value = value;
......@@ -1145,7 +1145,7 @@ void wined3d_cs_emit_set_viewports(struct wined3d_cs *cs, unsigned int viewport_
{
struct wined3d_cs_set_viewports *op;
op = wined3d_cs_require_space(cs, FIELD_OFFSET(struct wined3d_cs_set_viewports, viewports[viewport_count]),
op = wined3d_device_context_require_space(&cs->c, FIELD_OFFSET(struct wined3d_cs_set_viewports, viewports[viewport_count]),
WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_VIEWPORTS;
memcpy(op->viewports, viewports, viewport_count * sizeof(*viewports));
......@@ -1170,7 +1170,7 @@ void wined3d_cs_emit_set_scissor_rects(struct wined3d_cs *cs, unsigned int rect_
{
struct wined3d_cs_set_scissor_rects *op;
op = wined3d_cs_require_space(cs, FIELD_OFFSET(struct wined3d_cs_set_scissor_rects, rects[rect_count]),
op = wined3d_device_context_require_space(&cs->c, FIELD_OFFSET(struct wined3d_cs_set_scissor_rects, rects[rect_count]),
WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECTS;
memcpy(op->rects, rects, rect_count * sizeof(*rects));
......@@ -1200,7 +1200,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
{
struct wined3d_cs_set_rendertarget_view *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
op->view_idx = view_idx;
op->view = view;
......@@ -1248,7 +1248,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
{
struct wined3d_cs_set_depth_stencil_view *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
......@@ -1267,7 +1267,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
{
struct wined3d_cs_set_vertex_declaration *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
......@@ -1299,7 +1299,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
{
struct wined3d_cs_set_stream_source *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE;
op->stream_idx = stream_idx;
op->buffer = buffer;
......@@ -1325,7 +1325,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
{
struct wined3d_cs_set_stream_source_freq *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ;
op->stream_idx = stream_idx;
op->frequency = frequency;
......@@ -1358,7 +1358,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
{
struct wined3d_cs_set_stream_output *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_STREAM_OUTPUT;
op->stream_idx = stream_idx;
op->buffer = buffer;
......@@ -1390,7 +1390,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
{
struct wined3d_cs_set_index_buffer *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_INDEX_BUFFER;
op->buffer = buffer;
op->format_id = format_id;
......@@ -1420,7 +1420,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
{
struct wined3d_cs_set_constant_buffer *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_CONSTANT_BUFFER;
op->type = type;
op->cb_idx = cb_idx;
......@@ -1511,7 +1511,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
{
struct wined3d_cs_set_texture *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
op->stage = stage;
op->texture = texture;
......@@ -1543,7 +1543,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
{
struct wined3d_cs_set_shader_resource_view *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
op->type = type;
op->view_idx = view_idx;
......@@ -1576,7 +1576,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
{
struct wined3d_cs_set_unordered_access_view *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
op->pipeline = pipeline;
op->view_idx = view_idx;
......@@ -1602,7 +1602,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
{
struct wined3d_cs_set_sampler *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SAMPLER;
op->type = type;
op->sampler_idx = sampler_idx;
......@@ -1627,7 +1627,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
{
struct wined3d_cs_set_shader *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SHADER;
op->type = type;
op->shader = shader;
......@@ -1656,7 +1656,7 @@ void wined3d_cs_emit_set_blend_state(struct wined3d_cs *cs, struct wined3d_blend
{
struct wined3d_cs_set_blend_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_BLEND_STATE;
op->state = state;
op->factor = *blend_factor;
......@@ -1684,7 +1684,7 @@ void wined3d_cs_emit_set_depth_stencil_state(struct wined3d_cs *cs,
{
struct wined3d_cs_set_depth_stencil_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_STATE;
op->state = state;
op->stencil_ref = stencil_ref;
......@@ -1705,7 +1705,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
{
struct wined3d_cs_set_rasterizer_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
......@@ -1724,7 +1724,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
{
struct wined3d_cs_set_render_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
op->state = state;
op->value = value;
......@@ -1745,7 +1745,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
{
struct wined3d_cs_set_texture_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_TEXTURE_STATE;
op->stage = stage;
op->state = state;
......@@ -1767,7 +1767,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
{
struct wined3d_cs_set_sampler_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SAMPLER_STATE;
op->sampler_idx = sampler_idx;
op->state = state;
......@@ -1790,7 +1790,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
{
struct wined3d_cs_set_transform *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
op->state = state;
op->matrix = *matrix;
......@@ -1810,7 +1810,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
{
struct wined3d_cs_set_clip_plane *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
op->plane_idx = plane_idx;
op->plane = *plane;
......@@ -1886,7 +1886,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
{
struct wined3d_cs_set_color_key *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
op->texture = texture;
op->flags = flags;
......@@ -1913,7 +1913,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
{
struct wined3d_cs_set_material *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
......@@ -1961,7 +1961,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
{
struct wined3d_cs_set_light *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
......@@ -1994,7 +1994,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
{
struct wined3d_cs_set_light_enable *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
op->idx = idx;
op->enable = enable;
......@@ -2066,7 +2066,7 @@ static void wined3d_cs_mt_push_constants(struct wined3d_device_context *context,
size_t size;
size = count * wined3d_cs_push_constant_info[p].size;
op = wined3d_cs_require_space(cs, FIELD_OFFSET(struct wined3d_cs_push_constants, constants[size]),
op = wined3d_device_context_require_space(&cs->c, FIELD_OFFSET(struct wined3d_cs_push_constants, constants[size]),
WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
op->type = p;
......@@ -2090,7 +2090,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
{
struct wined3d_cs_reset_state *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_RESET_STATE;
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
......@@ -2107,7 +2107,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
{
struct wined3d_cs_callback *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_CALLBACK;
op->callback = callback;
op->object = object;
......@@ -2171,7 +2171,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
{
struct wined3d_cs_query_issue *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
op->query = query;
op->flags = flags;
......@@ -2193,7 +2193,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
{
struct wined3d_cs_preload_resource *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
op->resource = resource;
......@@ -2215,7 +2215,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
{
struct wined3d_cs_unload_resource *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
op->resource = resource;
......@@ -2243,7 +2243,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
* increasing the map count would be visible to applications. */
wined3d_not_from_cs(cs);
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op->opcode = WINED3D_CS_OP_MAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
......@@ -2273,7 +2273,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
wined3d_not_from_cs(cs);
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op->opcode = WINED3D_CS_OP_UNMAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
......@@ -2393,7 +2393,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
{
struct wined3d_cs_blt_sub_resource *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_BLT_SUB_RESOURCE;
op->dst_resource = dst_resource;
op->dst_sub_resource_idx = dst_sub_resource_idx;
......@@ -2482,7 +2482,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
{
struct wined3d_cs_update_sub_resource *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
......@@ -2525,7 +2525,7 @@ void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs,
{
struct wined3d_cs_add_dirty_texture_region *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION;
op->texture = texture;
op->layer = layer;
......@@ -2553,7 +2553,7 @@ void wined3d_cs_emit_clear_unordered_access_view_uint(struct wined3d_cs *cs,
{
struct wined3d_cs_clear_unordered_access_view *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW;
op->view = view;
op->clear_value = *clear_value;
......@@ -2581,7 +2581,7 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff
{
struct wined3d_cs_copy_uav_counter *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_COPY_UAV_COUNTER;
op->buffer = dst_buffer;
op->offset = offset;
......@@ -2605,7 +2605,7 @@ void wined3d_cs_emit_generate_mipmaps(struct wined3d_cs *cs, struct wined3d_shad
{
struct wined3d_cs_generate_mipmaps *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_GENERATE_MIPMAPS;
op->view = view;
......@@ -2618,7 +2618,7 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
{
struct wined3d_cs_stop *op;
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_STOP;
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
......
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