diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 6530b6fc37e..1ea2765284e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -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; } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index b0ccfb8122d..7f74d4954de 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -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); } } } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4f02ae465c1..3a404e01674 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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;