Commit 77bc74c6 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass a wined3d_context_gl structure to wined3d_texture_gl_bind_and_dirtify().

parent d29f0545
......@@ -2242,7 +2242,7 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
wined3d_texture_get_pitch(src_texture, op->src_sub_resource_idx % src_texture->level_count,
&row_pitch, &slice_pitch);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(dst_texture), context, FALSE);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(dst_texture), wined3d_context_gl(context), FALSE);
wined3d_texture_upload_data(dst_texture, op->dst_sub_resource_idx, context,
dst_texture->resource.format, &op->src_box, wined3d_const_bo_address(&addr),
row_pitch, slice_pitch, op->dst_box.left, op->dst_box.top, op->dst_box.front, FALSE);
......@@ -2340,7 +2340,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
wined3d_texture_prepare_texture(texture, context, FALSE);
else
wined3d_texture_load_location(texture, op->sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context, FALSE);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), wined3d_context_gl(context), FALSE);
wined3d_box_set(&src_box, 0, 0, box->right - box->left, box->bottom - box->top, 0, box->back - box->front);
wined3d_texture_upload_data(texture, op->sub_resource_idx, context, texture->resource.format, &src_box,
......
......@@ -687,7 +687,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
TRACE("Using upload conversion.\n");
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(dst_texture), context, FALSE);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(dst_texture), wined3d_context_gl(context), FALSE);
wined3d_texture_upload_data(dst_texture, 0, context, src_format, &src_box,
wined3d_const_bo_address(&src_data), src_row_pitch, src_slice_pitch, 0, 0, 0, FALSE);
......@@ -858,7 +858,7 @@ void texture2d_load_fb_texture(struct wined3d_texture_gl *texture_gl,
device_invalidate_state(device, STATE_FRAMEBUFFER);
wined3d_texture_prepare_texture(&texture_gl->t, context, srgb);
wined3d_texture_gl_bind_and_dirtify(texture_gl, context, srgb);
wined3d_texture_gl_bind_and_dirtify(texture_gl, wined3d_context_gl(context), srgb);
TRACE("Reading back offscreen render target %p, %u.\n", texture_gl, sub_resource_idx);
......@@ -1445,7 +1445,7 @@ BOOL texture2d_load_sysmem(struct wined3d_texture *texture, unsigned int sub_res
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
{
struct wined3d_bo_address data;
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context,
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), wined3d_context_gl(context),
!(sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB));
wined3d_texture_get_memory(texture, sub_resource_idx, &data, dst_location);
wined3d_texture_download_data(texture, sub_resource_idx, context, &data);
......@@ -1612,7 +1612,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
}
wined3d_texture_prepare_texture(texture, context, srgb);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context, srgb);
wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), wined3d_context_gl(context), srgb);
wined3d_texture_get_pitch(texture, level, &src_row_pitch, &src_slice_pitch);
format = texture->resource.format;
......
......@@ -906,7 +906,7 @@ void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view *
}
else
{
wined3d_texture_gl_bind_and_dirtify(texture_gl, context, srgb);
wined3d_texture_gl_bind_and_dirtify(texture_gl, wined3d_context_gl(context), srgb);
gl_info->gl_ops.gl.p_glTexParameteri(texture_gl->target, GL_TEXTURE_BASE_LEVEL, base_level);
gl_info->gl_ops.gl.p_glTexParameteri(texture_gl->target, GL_TEXTURE_MAX_LEVEL, max_level);
}
......
......@@ -3602,7 +3602,7 @@ void wined3d_texture_gl_apply_sampler_desc(struct wined3d_texture_gl *texture_gl
void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
struct wined3d_context_gl *context_gl, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_gl_set_compatible_renderbuffer(struct wined3d_texture_gl *texture_gl,
struct wined3d_context *context, unsigned int level,
const struct wined3d_rendertarget_info *rt) DECLSPEC_HIDDEN;
......
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