Module: wine Branch: master Commit: dfdecfc2eb030d29b04edc26365eaecc5c2b0650 URL: https://source.winehq.org/git/wine.git/?a=commit;h=dfdecfc2eb030d29b04edc263...
Author: Józef Kucia jkucia@codeweavers.com Date: Fri Aug 24 15:44:04 2018 +0200
wined3d: Pass context to wined3d_texture_set_compatible_renderbuffer().
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 9d2236b..a4cfd66 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 7cc03fe..f72442d 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 bc03189..8da12d7 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,