From dfdecfc2eb030d29b04edc26365eaecc5c2b0650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 24 Aug 2018 15:44:04 +0200 Subject: [PATCH] wined3d: Pass context to wined3d_texture_set_compatible_renderbuffer(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context.c | 2 +- dlls/wined3d/texture.c | 7 +++---- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 9d2236bc17a..a4cfd66dfc4 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -608,7 +608,7 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context, } else if (depth_stencil->resource->type == WINED3D_RTYPE_TEXTURE_2D) { - wined3d_texture_set_compatible_renderbuffer(ds_texture, ds_level, &render_targets[0]); + wined3d_texture_set_compatible_renderbuffer(ds_texture, context, ds_level, &render_targets[0]); } } diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 7cc03fe4821..f72442d1ddf 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1453,15 +1453,14 @@ HRESULT CDECL wined3d_texture_set_color_key(struct wined3d_texture *texture, /* TODO: We should synchronize the renderbuffer's content with the texture's content. */ /* Context activation is done by the caller. */ void wined3d_texture_set_compatible_renderbuffer(struct wined3d_texture *texture, - unsigned int level, const struct wined3d_rendertarget_info *rt) + struct wined3d_context *context, unsigned int level, const struct wined3d_rendertarget_info *rt) { + const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_renderbuffer_entry *entry; - const struct wined3d_gl_info *gl_info; unsigned int src_width, src_height; unsigned int width, height; GLuint renderbuffer = 0; - gl_info = &texture->resource.device->adapter->gl_info; if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT]) return; @@ -1528,7 +1527,7 @@ void wined3d_texture_set_compatible_renderbuffer(struct wined3d_texture *texture texture->current_renderbuffer = entry; } - checkGLcall("set_compatible_renderbuffer"); + checkGLcall("set compatible renderbuffer"); } HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT width, UINT height, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index bc031890960..8da12d7cf3f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3366,7 +3366,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; void wined3d_texture_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; -void wined3d_texture_set_compatible_renderbuffer(struct wined3d_texture *texture, +void wined3d_texture_set_compatible_renderbuffer(struct wined3d_texture *texture, struct wined3d_context *context, unsigned int level, const struct wined3d_rendertarget_info *rt) DECLSPEC_HIDDEN; void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN; void wined3d_texture_set_swapchain(struct wined3d_texture *texture,