Henri Verbeet : wined3d: Get rid of the "target" parameter to context_create().

Alexandre Julliard julliard at winehq.org
Mon May 6 15:38:50 CDT 2019


Module: wine
Branch: master
Commit: 186ae1ad7863a67871babba24586a1e2ca48c0f4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=186ae1ad7863a67871babba24586a1e2ca48c0f4

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon May  6 21:34:27 2019 +0430

wined3d: Get rid of the "target" parameter to context_create().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context.c         | 4 ++--
 dlls/wined3d/swapchain.c       | 4 ++--
 dlls/wined3d/wined3d_private.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 7e7ab09..3b1832f 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1966,9 +1966,9 @@ static BOOL wined3d_context_init(struct wined3d_context *context, struct wined3d
     return TRUE;
 }
 
-struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
-        struct wined3d_texture *target, const struct wined3d_format *ds_format)
+struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, const struct wined3d_format *ds_format)
 {
+    struct wined3d_texture *target = swapchain->front_buffer;
     struct wined3d_device *device = swapchain->device;
     struct wined3d_context_gl *context_gl;
     struct wined3d_context *context;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 4ac091f..7210682 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -739,7 +739,7 @@ static void wined3d_swapchain_cs_init(void *object)
     for (i = 0; i < ARRAY_SIZE(formats); ++i)
     {
         swapchain->ds_format = wined3d_get_format(adapter, formats[i], WINED3D_BIND_DEPTH_STENCIL);
-        if ((swapchain->context[0] = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format)))
+        if ((swapchain->context[0] = context_create(swapchain, swapchain->ds_format)))
             break;
         TRACE("Depth stencil format %s is not supported, trying next format.\n", debug_d3dformat(formats[i]));
     }
@@ -1085,7 +1085,7 @@ static struct wined3d_context *swapchain_create_context(struct wined3d_swapchain
 
     TRACE("Creating a new context for swapchain %p, thread %u.\n", swapchain, GetCurrentThreadId());
 
-    if (!(ctx = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format)))
+    if (!(ctx = context_create(swapchain, swapchain->ds_format)))
     {
         ERR("Failed to create a new context for the swapchain\n");
         return NULL;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e698c79..02177a9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2196,7 +2196,7 @@ void context_check_fbo_status(const struct wined3d_context *context, GLenum targ
 void context_copy_bo_address(struct wined3d_context *context,
         const struct wined3d_bo_address *dst, GLenum dst_binding,
         const struct wined3d_bo_address *src, GLenum src_binding, size_t size) DECLSPEC_HIDDEN;
-struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_texture *target,
+struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
         const struct wined3d_format *ds_format) DECLSPEC_HIDDEN;
 HGLRC context_create_wgl_attribs(const struct wined3d_gl_info *gl_info, HDC hdc, HGLRC share_ctx) DECLSPEC_HIDDEN;
 void wined3d_context_destroy(struct wined3d_context *context) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list