Henri Verbeet : wined3d: Get rid of the "d3d_initialized" check in wined3d_texture_update_map_binding().

Alexandre Julliard julliard at winehq.org
Wed Jun 3 16:40:56 CDT 2020


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Jun  3 15:58:06 2020 +0430

wined3d: Get rid of the "d3d_initialized" check in wined3d_texture_update_map_binding().

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

---

 dlls/wined3d/texture.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index bef2c4ec30..f0b25ce90d 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -769,11 +769,10 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
     unsigned int sub_count = texture->level_count * texture->layer_count;
     struct wined3d_device *device = texture->resource.device;
     DWORD map_binding = texture->update_map_binding;
-    struct wined3d_context *context = NULL;
+    struct wined3d_context *context;
     unsigned int i;
 
-    if (device->d3d_initialized)
-        context = context_acquire(device, NULL, 0);
+    context = context_acquire(device, NULL, 0);
 
     for (i = 0; i < sub_count; ++i)
     {
@@ -784,8 +783,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
             wined3d_texture_remove_buffer_object(texture, i, wined3d_context_gl(context)->gl_info);
     }
 
-    if (context)
-        context_release(context);
+    context_release(context);
 
     texture->resource.map_binding = map_binding;
     texture->update_map_binding = 0;




More information about the wine-cvs mailing list