[PATCH 2/4] wined3d: Pass context to wined3d_texture_set_compatible_renderbuffer().

Józef Kucia jkucia at codeweavers.com
Fri Aug 24 08:44:04 CDT 2018


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 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 9d2236bc17a0..a4cfd66dfc42 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 7cc03fe4821e..f72442d1ddfe 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 bc031890960e..8da12d7cf3f3 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,
-- 
2.16.4




More information about the wine-devel mailing list