Commit f4f20e48 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass a texture to context_surface_update().

parent 31e5b4e5
......@@ -1092,7 +1092,7 @@ void context_gl_resource_released(struct wined3d_device *device,
context_enum_fbo_entries(device, name, rb_namespace, context_queue_fbo_entry_destruction);
}
void context_surface_update(struct wined3d_context *context, const struct wined3d_surface *surface)
void context_texture_update(struct wined3d_context *context, const struct wined3d_texture *texture)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
struct fbo_entry *entry = context->current_fbo;
......@@ -1102,10 +1102,10 @@ void context_surface_update(struct wined3d_context *context, const struct wined3
for (i = 0; i < gl_info->limits.buffers + 1; ++i)
{
if (surface->container->texture_rgb.name == entry->key.objects[i].object
|| surface->container->texture_srgb.name == entry->key.objects[i].object)
if (texture->texture_rgb.name == entry->key.objects[i].object
|| texture->texture_srgb.name == entry->key.objects[i].object)
{
TRACE("Updated surface %p is bound as attachment %u to the current FBO.\n", surface, i);
TRACE("Updated texture %p is bound as attachment %u to the current FBO.\n", texture, i);
context->rebind_fbo = TRUE;
return;
}
......
......@@ -912,13 +912,12 @@ void wined3d_surface_upload_data(struct wined3d_texture *texture, unsigned int s
if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE)
{
struct wined3d_surface *surface = texture->sub_resources[sub_resource_idx].u.surface;
struct wined3d_device *device = texture->resource.device;
unsigned int i;
for (i = 0; i < device->context_count; ++i)
{
context_surface_update(device->contexts[i], surface);
context_texture_update(device->contexts[i], texture);
}
}
}
......
......@@ -2185,7 +2185,7 @@ void context_state_drawbuf(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void context_state_fb(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void context_surface_update(struct wined3d_context *context, const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void context_texture_update(struct wined3d_context *context, const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void context_unmap_bo_address(struct wined3d_context *context,
const struct wined3d_bo_address *data, GLenum binding) 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