=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Try harder to keep the current context.
Alexandre Julliard
julliard at winehq.org
Thu May 25 14:42:16 CDT 2017
Module: wine
Branch: master
Commit: 1eb642aaf23bfa7f13af4e9d9207e87e39b8c016
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1eb642aaf23bfa7f13af4e9d9207e87e39b8c016
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Wed May 24 17:10:00 2017 +0200
wined3d: Try harder to keep the current context.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/context.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index e0c51f9..49b9186 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3956,6 +3956,7 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
{
struct wined3d_context *current_context = context_get_current();
struct wined3d_context *context;
+ BOOL swapchain_texture;
TRACE("device %p, texture %p, sub_resource_idx %u.\n", device, texture, sub_resource_idx);
@@ -3964,6 +3965,7 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
if (current_context && current_context->destroyed)
current_context = NULL;
+ swapchain_texture = texture && texture->swapchain;
if (!texture)
{
if (current_context
@@ -3989,7 +3991,7 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
{
context = current_context;
}
- else if (texture->swapchain)
+ else if (swapchain_texture)
{
TRACE("Rendering onscreen.\n");
@@ -4010,7 +4012,8 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
context_enter(context);
context_update_window(context);
context_setup_target(context, texture, sub_resource_idx);
- if (!context->valid) return context;
+ if (!context->valid)
+ return context;
if (context != current_context)
{
More information about the wine-cvs
mailing list