Henri Verbeet : wined3d: Move the "needs_set" field from struct wined3d_context to struct wined3d_context_gl.

Alexandre Julliard julliard at winehq.org
Thu Jun 6 17:05:19 CDT 2019


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jun  6 17:39:05 2019 +0430

wined3d: Move the "needs_set" field from struct wined3d_context to struct wined3d_context_gl.

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

---

 dlls/wined3d/context.c         | 16 ++++++++--------
 dlls/wined3d/wined3d_private.h |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 129d4da..fb745e2 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1282,7 +1282,7 @@ static BOOL wined3d_context_gl_set_gl_context(struct wined3d_context_gl *context
 
         context_gl->c.valid = 1;
     }
-    context_gl->c.needs_set = 0;
+    context_gl->needs_set = 0;
 
     return TRUE;
 }
@@ -1314,7 +1314,7 @@ static void wined3d_context_gl_update_window(struct wined3d_context_gl *context_
     context_gl->window = context_gl->c.swapchain->win_handle;
     context_gl->dc_is_private = FALSE;
     context_gl->dc_has_format = FALSE;
-    context_gl->c.needs_set = 1;
+    context_gl->needs_set = 1;
     context_gl->c.valid = 1;
 
     if (!(context_gl->dc = GetDCEx(context_gl->window, 0, DCX_USESTYLE | DCX_CACHE)))
@@ -1583,7 +1583,7 @@ void wined3d_context_gl_release(struct wined3d_context_gl *context_gl)
     if (!--context->level)
     {
         if (wined3d_context_gl_restore_pixel_format(context_gl))
-            context->needs_set = 1;
+            context_gl->needs_set = 1;
         if (context_gl->restore_ctx)
         {
             TRACE("Restoring GL context %p on device context %p.\n", context_gl->restore_ctx, context_gl->restore_dc);
@@ -1629,11 +1629,11 @@ static void wined3d_context_gl_enter(struct wined3d_context_gl *context_gl)
                     current_gl, wglGetCurrentDC());
             context_gl->restore_ctx = current_gl;
             context_gl->restore_dc = wglGetCurrentDC();
-            context_gl->c.needs_set = 1;
+            context_gl->needs_set = 1;
         }
-        else if (!context_gl->c.needs_set && !(context_gl->dc_is_private && context_gl->dc_has_format)
+        else if (!context_gl->needs_set && !(context_gl->dc_is_private && context_gl->dc_has_format)
                 && context_gl->pixel_format != context_gl->c.gl_info->gl_ops.wgl.p_wglGetPixelFormat(context_gl->dc))
-            context_gl->c.needs_set = 1;
+            context_gl->needs_set = 1;
     }
 }
 
@@ -2133,7 +2133,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
 
     context_gl->gl_ctx = ctx;
     context_gl->dc_has_format = TRUE;
-    context->needs_set = 1;
+    context_gl->needs_set = 1;
 
     /* Set up the context defaults */
     if (!context_set_current(context))
@@ -4191,7 +4191,7 @@ static void wined3d_context_gl_activate(struct wined3d_context_gl *context_gl,
         if (!context_set_current(&context_gl->c))
             ERR("Failed to activate the new context.\n");
     }
-    else if (context_gl->c.needs_set)
+    else if (context_gl->needs_set)
     {
         wined3d_context_gl_set_gl_context(context_gl);
     }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6652794..5b37e96 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1926,7 +1926,7 @@ struct wined3d_context
     DWORD fixed_function_usage_map : 8; /* WINED3D_MAX_TEXTURES, 8 */
     DWORD lowest_disabled_stage : 4;    /* Max WINED3D_MAX_TEXTURES, 8 */
     DWORD use_immediate_mode_draw : 1;
-    DWORD needs_set : 1;
+    DWORD uses_uavs : 1;
     DWORD transform_feedback_active : 1;
     DWORD transform_feedback_paused : 1;
 
@@ -1934,10 +1934,9 @@ struct wined3d_context
     DWORD update_compute_shader_resource_bindings : 1;
     DWORD update_unordered_access_view_bindings : 1;
     DWORD update_compute_unordered_access_view_bindings : 1;
-    DWORD uses_uavs : 1;
     DWORD shader_update_mask : 6; /* WINED3D_SHADER_TYPE_COUNT, 6 */
     DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
-    DWORD padding : 13;
+    DWORD padding : 14;
 
     DWORD constant_update_mask;
     DWORD numbered_array_mask;
@@ -1975,7 +1974,8 @@ struct wined3d_context_gl
     uint32_t diffuse_attrib_to_1 : 1;
     uint32_t rebind_fbo : 1;
     uint32_t untracked_material_count : 2; /* Max value 2 */
-    uint32_t padding : 25;
+    uint32_t needs_set : 1;
+    uint32_t padding : 24;
 
     uint32_t default_attrib_value_set;
 




More information about the wine-cvs mailing list