Rebase against 84cae8c3ea2614fce65d5d499159de9d530444ef.

[ntdll-x86_64_set_cpu_context]
Removed patch to allow to set debug registers separately in NtSetContextThread
(accepted upstream).
This commit is contained in:
Sebastian Lackner 2016-03-27 05:12:49 +02:00
parent 15f62469af
commit e9f11bd51b
12 changed files with 168 additions and 249 deletions

View File

@ -7,7 +7,7 @@ are part of **Wine Staging** and are licensed under the terms of the
[LGPLv2.1](#gnu-lgpl-version-21), to stay compatible with Wine:
```
Copyright (C) 2014-2015 the Wine Staging project authors.
Copyright (C) 2014-2016 the Wine Staging project authors.
Wine Staging is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -91,7 +91,7 @@ for more details.*
* Allow to edit winecfg library override by double clicking
* Allow to open files/directories without any access rights in order to query attributes
* Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE. ([Wine Bug #12652](https://bugs.winehq.org/show_bug.cgi?id=12652))
* Allow to set debug registers separately in NtSetContextThread ([Wine Bug #39454](https://bugs.winehq.org/show_bug.cgi?id=39454))
* ~~Allow to set debug registers separately in NtSetContextThread~~ ([Wine Bug #39454](https://bugs.winehq.org/show_bug.cgi?id=39454))
* Allow to set pixel format for desktop window
* Allow to specify default display frequency in registry
* Also send WM_CAPTURECHANGE when capture has not changed ([Wine Bug #13683](https://bugs.winehq.org/show_bug.cgi?id=13683))

View File

@ -918,7 +918,7 @@ index 6dbf8c0..9a9fe47 100644
+
+-----------------------------------------------------------------------
+
Copyright (c) 1993-2015 the Wine project authors (see the file AUTHORS
Copyright (c) 1993-2016 the Wine project authors (see the file AUTHORS
for a complete list)
Wine is free software; you can redistribute it and/or modify it under

View File

@ -1,20 +1,20 @@
From ac9076b71ddda6d430fe80fcfe62a47c2dcc9dc9 Mon Sep 17 00:00:00 2001
From 97c810889b2ffe7408c2f185a2e7e399ce13d014 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 15:28:00 -0600
Subject: ntdll: Implement storing DOS attributes in NtCreateFile.
---
dlls/ntdll/file.c | 79 ++++++++++++++++++++++++++++----------------
dlls/ntdll/tests/directory.c | 22 +++++-------
dlls/ntdll/tests/directory.c | 24 +++++---------
include/wine/port.h | 2 ++
libs/port/xattr.c | 20 +++++++++++
4 files changed, 80 insertions(+), 43 deletions(-)
4 files changed, 81 insertions(+), 44 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 521ab64..b4187d4 100644
index 17ad605..2381e3c 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -205,6 +205,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
@@ -223,6 +223,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
return ret;
}
@ -36,7 +36,7 @@ index 521ab64..b4187d4 100644
/**************************************************************************
* FILE_CreateFile (internal)
* Open a file.
@@ -216,6 +231,8 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -234,6 +249,8 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
ULONG attributes, ULONG sharing, ULONG disposition,
ULONG options, PVOID ea_buffer, ULONG ea_length )
{
@ -45,7 +45,7 @@ index 521ab64..b4187d4 100644
ANSI_STRING unix_name;
BOOL created = FALSE;
@@ -259,39 +276,37 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -287,39 +304,37 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->u.Status = STATUS_SUCCESS;
}
@ -112,7 +112,7 @@ index 521ab64..b4187d4 100644
if (io->u.Status == STATUS_SUCCESS)
{
@@ -313,6 +328,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -341,6 +356,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->Information = FILE_OVERWRITTEN;
break;
}
@ -124,7 +124,7 @@ index 521ab64..b4187d4 100644
}
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
{
@@ -320,6 +340,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -348,6 +368,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
}
@ -133,7 +133,7 @@ index 521ab64..b4187d4 100644
}
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index f190ff4..68b5406 100644
index 7b1002a..aa8e97f 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -51,7 +51,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *
@ -144,10 +144,11 @@ index f190ff4..68b5406 100644
BOOL attr_done; /* set if attributes were tested for this file already */
const DWORD attr; /* desired attribute */
const char *name; /* filename to use */
@@ -60,13 +59,13 @@ static struct testfile_s {
@@ -60,14 +59,14 @@ static struct testfile_s {
int nfound; /* How many were found (expect 1) */
WCHAR nameW[20]; /* unicode version of name (filled in later) */
} testfiles[] = {
- { 0, 0, FILE_ATTRIBUTE_NORMAL, "longfilename.tmp", NULL, "normal" },
- { 0, 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" },
- { 1, 0, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" },
- { 1, 0, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" },
@ -155,6 +156,7 @@ index f190ff4..68b5406 100644
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, ".", NULL, ". directory" },
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "..", NULL, ".. directory" },
- { 0, 0, 0, NULL }
+ { 0, FILE_ATTRIBUTE_NORMAL, "longfilename.tmp", NULL, "normal" },
+ { 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" },
+ { 0, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" },
+ { 0, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" },
@ -165,7 +167,7 @@ index f190ff4..68b5406 100644
};
static const int max_test_dir_size = 20; /* size of above plus some for .. etc */
@@ -147,12 +146,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
@@ -148,12 +147,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
if (namelen != len || memcmp(nameW, testfiles[i].nameW, len*sizeof(WCHAR)))
continue;
if (!testfiles[i].attr_done) {
@ -180,7 +182,7 @@ index f190ff4..68b5406 100644
}
testfiles[i].nfound++;
diff --git a/include/wine/port.h b/include/wine/port.h
index cc572f3..9e2b8165 100644
index 445a25e..04ae7a6 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -373,6 +373,8 @@ extern int xattr_fget( int filedes, const char *name, void *value, size_t size )
@ -221,5 +223,5 @@ index 6918c99..683e7a6 100644
+#endif
+}
--
1.9.1
2.7.1

View File

@ -1,61 +0,0 @@
From f70ddf43d18cfeae70f0021005048c628b08c2b3 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 29 Nov 2015 00:34:04 +0100
Subject: ntdll: Allow to set debug registers separately in NtSetContextThread.
---
dlls/ntdll/signal_x86_64.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 524de68..abe2072 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -1800,11 +1800,12 @@ __ASM_GLOBAL_FUNC( RtlCaptureContext,
"ret" );
/***********************************************************************
- * set_cpu_context
+ * __wine_restore_regs
*
* Set the new CPU context.
*/
-__ASM_GLOBAL_FUNC( set_cpu_context,
+extern void __wine_restore_regs( const CONTEXT *context );
+__ASM_GLOBAL_FUNC( __wine_restore_regs,
"subq $40,%rsp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 40\n\t")
"ldmxcsr 0x34(%rdi)\n\t" /* context->MxCsr */
@@ -1852,6 +1853,29 @@ __ASM_GLOBAL_FUNC( set_cpu_context,
"movq 0xb0(%rdi),%rdi\n\t" /* context->Rdi */
"iretq" );
+
+/***********************************************************************
+ * set_cpu_context
+ *
+ * Set the new CPU context. Used by NtSetContextThread.
+ */
+void set_cpu_context( const CONTEXT *context )
+{
+ DWORD flags = context->ContextFlags & ~CONTEXT_AMD64;
+
+ if (flags & CONTEXT_DEBUG_REGISTERS)
+ FIXME( "setting debug registers not supported\n" );
+
+ if (flags & CONTEXT_FULL)
+ {
+ if (!(flags & CONTEXT_CONTROL))
+ FIXME( "setting partial context (%x) not supported\n", flags );
+ else
+ __wine_restore_regs( context );
+ }
+}
+
+
/***********************************************************************
* copy_context
*
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [39454] Allow to set debug registers separately in NtSetContextThread

View File

@ -52,14 +52,14 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "a981d3738014339cd0fae1e7f5aa9429222ee03d"
echo "84cae8c3ea2614fce65d5d499159de9d530444ef"
}
# Show version information
version()
{
echo "Wine Staging 1.8"
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
echo " commit $(upstream_commit)"
@ -220,7 +220,6 @@ patch_enable_all ()
enable_ntdll_WinSqm="$1"
enable_ntdll_WriteWatches="$1"
enable_ntdll_Zero_mod_name="$1"
enable_ntdll_x86_64_set_cpu_context="$1"
enable_ntoskrnl_DriverTest="$1"
enable_ntoskrnl_Stubs="$1"
enable_nvapi_Stub_DLL="$1"
@ -774,9 +773,6 @@ patch_enable ()
ntdll-Zero_mod_name)
enable_ntdll_Zero_mod_name="$2"
;;
ntdll-x86_64_set_cpu_context)
enable_ntdll_x86_64_set_cpu_context="$2"
;;
ntoskrnl-DriverTest)
enable_ntoskrnl_DriverTest="$2"
;;
@ -4557,21 +4553,6 @@ if test "$enable_ntdll_Zero_mod_name" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-x86_64_set_cpu_context
# |
# | This patchset fixes the following Wine bugs:
# | * [#39454] Allow to set debug registers separately in NtSetContextThread
# |
# | Modified files:
# | * dlls/ntdll/signal_x86_64.c
# |
if test "$enable_ntdll_x86_64_set_cpu_context" -eq 1; then
patch_apply ntdll-x86_64_set_cpu_context/0001-ntdll-Allow-to-set-debug-registers-separately-in-NtS.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Allow to set debug registers separately in NtSetContextThread.", 1 },';
) >> "$patchlist"
fi
# Patchset ntoskrnl-DriverTest
# |
# | Modified files:

View File

@ -1,4 +1,4 @@
From 5fd25633a2e78ad336af898e466f4afc2e2ab1a0 Mon Sep 17 00:00:00 2001
From 188253a48866f5120620f71087ace68b16e8ab10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 12:22:30 +0100
Subject: wined3d: Move surface locations into the resource.
@ -60,7 +60,7 @@ index 3761830..943a829 100644
else
SetRectEmpty(&current_rect);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 94934a5..c971031 100644
index 51cf4f7..8611f9c 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
@ -153,15 +153,14 @@ index 94934a5..c971031 100644
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3810,21 +3811,21 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return;
@@ -3811,20 +3812,20 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
}
wined3d_surface_prepare(surface, context, location);
- if (surface->locations & WINED3D_LOCATION_DISCARDED)
+ if (surface->resource.locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Surface was discarded, no need copy data.\n");
wined3d_surface_prepare(surface, context, location);
- surface->locations &= ~WINED3D_LOCATION_DISCARDED;
- surface->locations |= location;
+ surface->resource.locations &= ~WINED3D_LOCATION_DISCARDED;
@ -414,10 +413,10 @@ index 94934a5..c971031 100644
/* Upload */
if (scale)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 93ede78..91a5495 100644
index 6e55345..d174690 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2409,7 +2409,6 @@ struct wined3d_surface
@@ -2410,7 +2410,6 @@ struct wined3d_surface
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
void *user_memory;
@ -426,5 +425,5 @@ index 93ede78..91a5495 100644
DWORD flags;
--
2.6.2
2.7.1

View File

@ -1830,7 +1830,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_swapchain *swapchain;
struct wined3d_surface *current_rt;
@@ -1300,8 +1346,17 @@
@@ -1301,8 +1347,17 @@
GLfloat fog_coord_value;
GLfloat color[4], fogstart, fogend, fogcolor[4];
GLuint dummy_arbfp_prog;
@ -1848,7 +1848,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
@@ -1444,8 +1499,12 @@
@@ -1445,8 +1500,12 @@
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device,
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
@ -1861,7 +1861,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
@@ -2028,7 +2087,11 @@
@@ -2029,7 +2088,11 @@
struct wined3d_state
{
DWORD flags;
@ -1873,7 +1873,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2073,6 +2136,7 @@
@@ -2074,6 +2137,7 @@
DWORD render_states[WINEHIGHEST_RENDER_STATE + 1];
};
@ -1881,7 +1881,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_gl_bo
{
GLuint name;
@@ -2081,6 +2145,7 @@
@@ -2082,6 +2146,7 @@
UINT size;
};
@ -1889,7 +1889,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
#define WINED3D_UNMAPPED_STAGE ~0U
/* Multithreaded flag. Removed from the public header to signal that
@@ -2136,11 +2201,23 @@
@@ -2137,11 +2202,23 @@
struct wined3d_rendertarget_view *back_buffer_view;
struct wined3d_swapchain **swapchains;
UINT swapchain_count;
@ -1913,7 +1913,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* For rendering to a texture using glCopyTexImage */
GLuint depth_blt_texture;
@@ -2151,6 +2228,9 @@
@@ -2152,6 +2229,9 @@
UINT xScreenSpace;
UINT yScreenSpace;
UINT cursorWidth, cursorHeight;
@ -1923,7 +1923,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HCURSOR hardwareCursor;
/* The Wine logo texture */
@@ -2182,6 +2262,7 @@
@@ -2183,6 +2263,7 @@
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -1931,7 +1931,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
@@ -2193,6 +2274,11 @@
@@ -2194,6 +2275,11 @@
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_delete_opengl_contexts_cs(struct wined3d_device *device,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -1943,7 +1943,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2212,9 +2298,11 @@
@@ -2213,9 +2299,11 @@
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
@ -1955,7 +1955,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_resource
@@ -2239,6 +2327,7 @@
@@ -2240,6 +2328,7 @@
UINT depth;
UINT size;
DWORD priority;
@ -1963,7 +1963,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data;
UINT custom_row_pitch, custom_slice_pitch;
struct wined3d_gl_bo *buffer, *map_buffer;
@@ -2246,6 +2335,10 @@
@@ -2247,6 +2336,10 @@
DWORD locations;
LONG access_fence;
BOOL unmap_dirtify;
@ -1974,7 +1974,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *parent;
const struct wined3d_parent_ops *parent_ops;
@@ -2270,6 +2363,7 @@
@@ -2271,6 +2364,7 @@
void *parent, const struct wined3d_parent_ops *parent_ops,
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -1982,7 +1982,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_changed(struct wined3d_resource *resource,
@@ -2318,6 +2412,15 @@
@@ -2319,6 +2413,15 @@
{
while(InterlockedCompareExchange(&resource->access_fence, 0, 0));
}
@ -1998,7 +1998,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
@@ -2402,7 +2505,9 @@
@@ -2403,7 +2506,9 @@
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
@ -2008,7 +2008,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_texture_bind(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
@@ -2436,9 +2541,16 @@
@@ -2437,9 +2542,16 @@
struct wined3d_resource resource;
struct wined3d_texture *container;
@ -2025,7 +2025,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
@@ -2446,6 +2558,7 @@
@@ -2447,6 +2559,7 @@
return CONTAINING_RECORD(resource, struct wined3d_volume, resource);
}
@ -2033,7 +2033,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
@@ -2461,6 +2574,27 @@
@@ -2462,6 +2575,27 @@
struct wined3d_surface_dib
{
HBITMAP DIBsection;
@ -2061,7 +2061,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT bitmap_size;
};
@@ -2486,7 +2620,11 @@
@@ -2487,7 +2621,11 @@
struct wined3d_surface_ops
{
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
@ -2073,7 +2073,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_surface
@@ -2494,12 +2632,26 @@
@@ -2495,12 +2633,26 @@
struct wined3d_resource resource;
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
@ -2100,7 +2100,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
GLuint rb_multisample;
GLuint rb_resolved;
GLenum texture_target;
@@ -2543,11 +2695,22 @@
@@ -2544,11 +2696,22 @@
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
@ -2123,7 +2123,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
DWORD location) DECLSPEC_HIDDEN;
@@ -2559,6 +2722,7 @@
@@ -2560,6 +2723,7 @@
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
@ -2131,7 +2131,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
@@ -2573,6 +2737,17 @@
@@ -2574,6 +2738,17 @@
void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@ -2149,7 +2149,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2594,8 +2769,10 @@
@@ -2595,8 +2770,10 @@
GLuint name;
};
@ -2160,7 +2160,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration_element
{
const struct wined3d_format *format;
@@ -2624,8 +2801,10 @@
@@ -2625,8 +2802,10 @@
BOOL half_float_conv_needed;
};
@ -2171,7 +2171,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_saved_states
{
DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
@@ -2693,6 +2872,7 @@
@@ -2694,6 +2873,7 @@
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2179,7 +2179,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2743,6 +2923,32 @@
@@ -2744,6 +2924,32 @@
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
@ -2212,7 +2212,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
@@ -2792,6 +2998,7 @@
@@ -2793,6 +2999,7 @@
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
@ -2220,7 +2220,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -2855,6 +3062,7 @@
@@ -2856,6 +3063,7 @@
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
@ -2228,7 +2228,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
@@ -2869,8 +3077,12 @@
@@ -2870,8 +3078,12 @@
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@ -2241,7 +2241,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_query
@@ -2884,12 +3096,16 @@
@@ -2885,12 +3097,16 @@
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
@ -2258,7 +2258,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -2916,7 +3132,9 @@
@@ -2917,7 +3133,9 @@
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@ -2268,7 +2268,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -2941,11 +3159,15 @@
@@ -2942,11 +3160,15 @@
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2284,7 +2284,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -2984,8 +3206,10 @@
@@ -2985,8 +3207,10 @@
return surface_from_resource(resource);
}
@ -2295,7 +2295,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -2998,8 +3222,12 @@
@@ -2999,8 +3223,12 @@
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
@ -2308,7 +2308,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_swapchain
@@ -3038,8 +3266,10 @@
@@ -3039,8 +3267,10 @@
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -2319,7 +2319,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/*****************************************************************************
* Utility function prototypes
@@ -3242,7 +3472,9 @@
@@ -3243,7 +3473,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;
@ -7826,15 +7826,15 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3543,6 +4354,7 @@
return;
@@ -3544,6 +4355,7 @@
}
wined3d_surface_prepare(surface, context, location);
+#if defined(STAGING_CSMT)
if (surface->resource.locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Surface was discarded, no need copy data.\n");
@@ -3558,6 +4370,23 @@
@@ -3558,6 +4370,22 @@
{
FIXME("No up to date depth stencil location.\n");
surface->resource.locations |= location;
@ -7842,7 +7842,6 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
+ if (surface->locations & WINED3D_LOCATION_DISCARDED)
+ {
+ TRACE("Surface was discarded, no need copy data.\n");
+ wined3d_surface_prepare(surface, context, location);
+ surface->locations &= ~WINED3D_LOCATION_DISCARDED;
+ surface->locations |= location;
+ surface->ds_current_size.cx = surface->resource.width;
@ -7858,7 +7857,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3621,9 +4450,13 @@
@@ -3621,9 +4449,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -7872,7 +7871,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else if (location == WINED3D_LOCATION_DRAWABLE)
@@ -3639,9 +4472,13 @@
@@ -3639,9 +4471,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -7886,7 +7885,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else
@@ -3649,6 +4486,7 @@
@@ -3649,6 +4485,7 @@
ERR("Invalid location (%#x) specified.\n", location);
}
@ -7894,7 +7893,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->resource.locations |= location;
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
@@ -3681,6 +4519,124 @@
@@ -3681,6 +4518,124 @@
FIXME("Can't load surface %p with location flags %s into sysmem.\n",
surface, wined3d_debug_location(surface->resource.locations));
@ -8019,7 +8018,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3689,12 +4645,14 @@
@@ -3689,12 +4644,14 @@
{
RECT r;
@ -8034,7 +8033,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& wined3d_resource_is_offscreen(&surface->container->resource))
{
@@ -3703,7 +4661,11 @@
@@ -3703,7 +4660,11 @@
}
surface_get_rect(surface, NULL, &r);
@ -8046,7 +8045,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -3718,6 +4680,7 @@
@@ -3718,6 +4679,7 @@
struct wined3d_device *device = surface->resource.device;
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
@ -8054,7 +8053,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
UINT width, src_row_pitch, src_slice_pitch, dst_pitch;
struct wined3d_bo_address data;
struct wined3d_format format;
@@ -3744,6 +4707,24 @@
@@ -3744,6 +4706,24 @@
}
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
@ -8079,7 +8078,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
@@ -3759,6 +4740,7 @@
@@ -3759,6 +4739,7 @@
return WINED3D_OK;
}
@ -8087,7 +8086,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
&& (!srgb || (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
@@ -3766,6 +4748,15 @@
@@ -3766,6 +4747,15 @@
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
DWORD src_location = surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED ?
@ -8103,7 +8102,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE;
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -3780,6 +4771,7 @@
@@ -3780,6 +4770,7 @@
if (srgb)
{
@ -8111,7 +8110,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding))
== WINED3D_LOCATION_TEXTURE_RGB)
{
@@ -3814,6 +4806,42 @@
@@ -3814,6 +4805,42 @@
width = surface->resource.width;
wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
@ -8154,7 +8153,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -3822,7 +4850,11 @@
@@ -3822,7 +4849,11 @@
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
* getting called. */
@ -8166,7 +8165,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
TRACE("Removing the pbo attached to surface %p.\n", surface);
@@ -3831,6 +4863,7 @@
@@ -3831,6 +4862,7 @@
else
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
@ -8174,7 +8173,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_resource_prepare_map_memory(&surface->resource, context);
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
wined3d_resource_free_bo(&surface->resource);
@@ -3838,6 +4871,14 @@
@@ -3838,6 +4870,14 @@
}
wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data);
@ -8189,7 +8188,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -3852,9 +4893,15 @@
@@ -3852,9 +4892,15 @@
context_release(context);
return E_OUTOFMEMORY;
}
@ -8205,7 +8204,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
data.addr = mem;
}
else if (conversion)
@@ -3874,6 +4921,7 @@
@@ -3874,6 +4920,7 @@
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -8213,7 +8212,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
width, height, palette, &texture->async.gl_color_key);
src_row_pitch = dst_pitch;
@@ -3882,6 +4930,16 @@
@@ -3882,6 +4929,16 @@
wined3d_surface_upload_data(surface, gl_info, &format, &src_rect,
src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
@ -8230,7 +8229,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HeapFree(GetProcessHeap(), 0, mem);
@@ -3895,11 +4953,19 @@
@@ -3895,11 +4952,19 @@
const RECT rect = {0, 0, surface->resource.width, surface->resource.height};
DWORD src_location;
@ -8250,7 +8249,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_location = WINED3D_LOCATION_TEXTURE_SRGB;
else /* surface_blt_fbo will load the source location if necessary. */
src_location = WINED3D_LOCATION_TEXTURE_RGB;
@@ -3908,41 +4974,87 @@
@@ -3908,41 +4973,87 @@
surface, src_location, &rect, surface, dst_location, &rect);
}
@ -8347,7 +8346,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
switch (location)
@@ -3956,7 +5068,11 @@
@@ -3956,7 +5067,11 @@
case WINED3D_LOCATION_DRAWABLE:
if (FAILED(hr = surface_load_drawable(surface, context)))
@ -8359,7 +8358,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
case WINED3D_LOCATION_RB_RESOLVED:
@@ -3968,7 +5084,11 @@
@@ -3968,7 +5083,11 @@
case WINED3D_LOCATION_TEXTURE_SRGB:
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
@ -8371,7 +8370,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
default:
@@ -3976,12 +5096,21 @@
@@ -3976,12 +5095,21 @@
break;
}
@ -8393,7 +8392,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
@@ -4090,6 +5219,7 @@
@@ -4090,6 +5218,7 @@
const RECT *dst_rect, const struct wined3d_color *color)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -8401,7 +8400,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view, *view_ptr = &view;
struct wined3d_fb_state fb = {&view_ptr, NULL, 1};
struct wined3d_texture *texture = dst_surface->container;
@@ -4110,6 +5240,21 @@
@@ -4110,6 +5239,21 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
@ -8423,7 +8422,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4118,6 +5263,7 @@
@@ -4118,6 +5262,7 @@
const RECT *dst_rect, float depth)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -8431,7 +8430,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view;
struct wined3d_fb_state fb = {NULL, &view};
struct wined3d_texture *texture = dst_surface->container;
@@ -4133,6 +5279,20 @@
@@ -4133,6 +5278,20 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0);
@ -8452,7 +8451,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4169,8 +5329,13 @@
@@ -4169,8 +5328,13 @@
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@ -8466,7 +8465,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
const struct blit_shader ffp_blit = {
@@ -4326,6 +5491,7 @@
@@ -4326,6 +5490,7 @@
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
{
@ -8474,7 +8473,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
const struct wined3d_format *src_format, *dst_format;
unsigned int src_fmt_flags, dst_fmt_flags;
@@ -4360,6 +5526,28 @@
@@ -4360,6 +5525,28 @@
wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch);
src_data = dst_data;
src_row_pitch = dst_row_pitch;
@ -8503,7 +8502,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = dst_surface->resource.format;
dst_format = src_format;
dst_fmt_flags = dst_surface->container->resource.format_flags;
@@ -4371,12 +5559,14 @@
@@ -4371,12 +5558,14 @@
dst_fmt_flags = dst_surface->container->resource.format_flags;
if (src_surface)
{
@ -8518,7 +8517,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_surface->resource.format->id != src_surface->resource.format->id)
{
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
@@ -4387,9 +5577,13 @@
@@ -4387,9 +5576,13 @@
}
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
}
@ -8532,7 +8531,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = src_surface->resource.format;
src_fmt_flags = src_surface->container->resource.format_flags;
}
@@ -4399,8 +5593,12 @@
@@ -4399,8 +5592,12 @@
src_fmt_flags = dst_fmt_flags;
}
@ -8545,7 +8544,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
bpp = dst_surface->resource.format->byte_count;
@@ -4411,12 +5609,24 @@
@@ -4411,12 +5608,24 @@
width = (dst_rect->right - dst_rect->left) * bpp;
if (src_surface)
@ -8570,7 +8569,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
{
@@ -4451,7 +5661,11 @@
@@ -4451,7 +5660,11 @@
}
hr = surface_cpu_blt_compressed(sbase, dbuf,
@ -8582,7 +8581,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format, flags, fx);
goto release;
}
@@ -4459,7 +5673,11 @@
@@ -4459,7 +5672,11 @@
/* First, all the 'source-less' blits */
if (flags & WINEDDBLT_COLORFILL)
{
@ -8594,7 +8593,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
flags &= ~WINEDDBLT_COLORFILL;
}
@@ -4509,6 +5727,7 @@
@@ -4509,6 +5726,7 @@
for (y = 0; y < dstheight; ++y)
{
memcpy(dbuf, sbuf, width);
@ -8602,7 +8601,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf += src_row_pitch;
dbuf += dst_row_pitch;
}
@@ -4522,6 +5741,21 @@
@@ -4522,6 +5740,21 @@
{
sbuf -= src_row_pitch;
dbuf -= dst_row_pitch;
@ -8624,7 +8623,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
memcpy(dbuf, sbuf, width);
}
}
@@ -4531,8 +5765,13 @@
@@ -4531,8 +5764,13 @@
for (y = 0; y < dstheight; ++y)
{
memmove(dbuf, sbuf, width);
@ -8638,7 +8637,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4541,9 +5780,15 @@
@@ -4541,9 +5779,15 @@
/* Stretching in y direction only. */
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8654,7 +8653,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4553,6 +5798,7 @@
@@ -4553,6 +5797,7 @@
int last_sy = -1;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8662,7 +8661,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf = sbase + (sy >> 16) * src_row_pitch;
if ((sy >> 16) == (last_sy >> 16))
@@ -4560,6 +5806,15 @@
@@ -4560,6 +5805,15 @@
/* This source row is the same as last source row -
* Copy the already stretched row. */
memcpy(dbuf, dbuf - dst_row_pitch, width);
@ -8678,7 +8677,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -4606,6 +5861,7 @@
@@ -4606,6 +5860,7 @@
}
#undef STRETCH_ROW
}
@ -8686,7 +8685,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dbuf += dst_row_pitch;
last_sy = sy;
}
@@ -4614,6 +5870,16 @@
@@ -4614,6 +5869,16 @@
else
{
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
@ -8703,7 +8702,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
@@ -4663,7 +5929,11 @@
@@ -4663,7 +5928,11 @@
LONG tmpxy;
dTopLeft = dbuf;
dTopRight = dbuf + ((dstwidth - 1) * bpp);
@ -8715,7 +8714,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
@@ -4740,6 +6010,7 @@
@@ -4740,6 +6009,7 @@
flags &= ~(WINEDDBLT_DDFX);
}
@ -8723,7 +8722,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
#define COPY_COLORKEY_FX(type) \
do { \
const type *s; \
@@ -4761,6 +6032,29 @@
@@ -4761,6 +6031,29 @@
d = (type *)(((BYTE *)d) + dstyinc); \
} \
} while(0)
@ -8753,7 +8752,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
switch (bpp)
{
@@ -4779,7 +6073,11 @@
@@ -4779,7 +6072,11 @@
BYTE *d = dbuf, *dx;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8765,7 +8764,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dx = d;
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
{
@@ -4810,10 +6108,12 @@
@@ -4810,10 +6107,12 @@
}
}
@ -8778,7 +8777,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
error:
if (flags && FIXME_ON(d3d_surface))
{
@@ -4821,6 +6121,7 @@
@@ -4821,6 +6120,7 @@
}
release:
@ -8786,7 +8785,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_data)
{
wined3d_resource_release_map_ptr(&dst_surface->resource, context);
@@ -4839,6 +6140,14 @@
@@ -4839,6 +6139,14 @@
wined3d_texture_decref(src_texture);
if (context)
context_release(context);
@ -8801,7 +8800,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -4883,6 +6192,7 @@
@@ -4883,6 +6191,7 @@
cpu_blit_blit_surface,
};
@ -8809,7 +8808,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
@@ -4890,6 +6200,16 @@
@@ -4890,6 +6199,16 @@
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
@ -8826,7 +8825,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -4901,6 +6221,106 @@
@@ -4901,6 +6220,106 @@
| WINEDDBLT_DONOTWAIT
| WINEDDBLT_ALPHATEST;
@ -8933,7 +8932,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -4943,8 +6363,13 @@
@@ -4943,8 +6362,13 @@
}
scale = src_surface
@ -8947,7 +8946,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->container->resource.format_flags
@@ -4964,6 +6389,7 @@
@@ -4964,6 +6388,7 @@
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -8955,7 +8954,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
@@ -4974,6 +6400,24 @@
@@ -4974,6 +6399,24 @@
if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding,
src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect)))
return;
@ -8980,7 +8979,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
else
@@ -4982,8 +6426,13 @@
@@ -4982,8 +6425,13 @@
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@ -8994,7 +8993,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5004,8 +6453,13 @@
@@ -5004,8 +6452,13 @@
palette, fx->u5.dwFillColor, &color))
goto fallback;
@ -9008,7 +9007,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -5027,8 +6481,13 @@
@@ -5027,8 +6480,13 @@
{
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST;
}
@ -9022,7 +9021,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
/* Upload */
if (scale)
@@ -5037,6 +6496,7 @@
@@ -5037,6 +6495,7 @@
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -9030,7 +9029,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
POINT dst_point = {dst_rect->left, dst_rect->top};
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect)))
@@ -5049,6 +6509,19 @@
@@ -5049,6 +6508,19 @@
context_release(context);
}
return;
@ -9050,7 +9049,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -5072,6 +6545,7 @@
@@ -5072,6 +6544,7 @@
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -9058,7 +9057,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
}
@@ -5280,6 +6754,54 @@
@@ -5280,6 +6753,54 @@
wined3d_surface_location_invalidated,
wined3d_surface_load_location,
};
@ -9113,7 +9112,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
@@ -5341,7 +6863,11 @@
@@ -5341,7 +6862,11 @@
}
surface->container = container;
@ -9125,7 +9124,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5373,9 +6899,14 @@
@@ -5373,9 +6898,14 @@
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -9140,7 +9139,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
return hr;
@@ -5402,7 +6933,11 @@
@@ -5402,7 +6932,11 @@
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
{
WARN("Failed to initialize surface, returning %#x.\n", hr);

View File

@ -1,4 +1,4 @@
From 864636075386f9057b53c8e076978d95dd782360 Mon Sep 17 00:00:00 2001
From f4b934195547ad54ccb5d5adbde92f982e362723 Mon Sep 17 00:00:00 2001
From: Ken Thomases <ken@codeweavers.com>
Date: Sun, 14 Sep 2014 19:46:53 -0500
Subject: Revert "wined3d: Track if a context's private hdc has had its pixel
@ -11,10 +11,10 @@ This reverts commit f3aa4812382caa459b9b612f66998c6ea8257594.
2 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index d3f7629..11c8804 100644
index d83cad5..c11dd08 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -800,13 +800,9 @@ static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
@@ -815,13 +815,9 @@ static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BOOL private, int format)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -30,7 +30,7 @@ index d3f7629..11c8804 100644
if (!current)
{
@@ -820,7 +816,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
@@ -835,7 +831,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
context->restore_pf = 0;
context->restore_pf_win = private ? NULL : WindowFromDC(dc);
@ -39,7 +39,7 @@ index d3f7629..11c8804 100644
}
/* By default WGL doesn't allow pixel format adjustments but we need it
@@ -847,7 +843,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
@@ -862,7 +858,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
context->restore_pf_win = win;
}
@ -48,7 +48,7 @@ index d3f7629..11c8804 100644
}
/* OpenGL doesn't allow pixel format adjustments. Print an error and
@@ -857,11 +853,6 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
@@ -872,11 +868,6 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
ERR("Unable to set pixel format %d on device context %p. Already using format %d.\n",
format, dc, current);
return TRUE;
@ -60,7 +60,7 @@ index d3f7629..11c8804 100644
}
static BOOL context_set_gl_context(struct wined3d_context *ctx)
@@ -947,7 +938,6 @@ static void context_update_window(struct wined3d_context *context)
@@ -962,7 +953,6 @@ static void context_update_window(struct wined3d_context *context)
context->win_handle = context->swapchain->win_handle;
context->hdc_is_private = FALSE;
@ -68,7 +68,7 @@ index d3f7629..11c8804 100644
context->needs_set = 1;
context->valid = 1;
@@ -1189,8 +1179,7 @@ static void context_enter(struct wined3d_context *context)
@@ -1223,8 +1213,7 @@ static void context_enter(struct wined3d_context *context)
context->restore_dc = wglGetCurrentDC();
context->needs_set = 1;
}
@ -78,7 +78,7 @@ index d3f7629..11c8804 100644
context->needs_set = 1;
}
}
@@ -1598,7 +1587,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1662,7 +1651,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
ret->win_handle = swapchain->win_handle;
ret->hdc = hdc;
ret->hdc_is_private = hdc_is_private;
@ -87,20 +87,20 @@ index d3f7629..11c8804 100644
ret->needs_set = 1;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4373805..d98fcae 100644
index 3000ab5..6dbf52e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1158,9 +1158,8 @@ struct wined3d_context
@@ -1195,9 +1195,8 @@ struct wined3d_context
DWORD rebind_fbo : 1;
DWORD needs_set : 1;
DWORD hdc_is_private : 1;
- DWORD hdc_has_format : 1; /* only meaningful if hdc_is_private */
DWORD update_shader_resource_bindings : 1;
- DWORD padding : 15;
+ DWORD padding : 16;
- DWORD padding : 14;
+ DWORD padding : 15;
DWORD shader_update_mask;
DWORD constant_update_mask;
DWORD numbered_array_mask;
--
2.2.1
2.7.1

View File

@ -1,4 +1,4 @@
From cb2d95c1590eb4e9e8eb18ad81297d30dc8b9f85 Mon Sep 17 00:00:00 2001
From eb2f60a5106f76e9d1d8666edb4161ee091dc41e Mon Sep 17 00:00:00 2001
From: Ken Thomases <ken@codeweavers.com>
Date: Sun, 14 Sep 2014 19:47:03 -0500
Subject: Revert "wined3d: Track if a context's hdc is private so we never need
@ -11,10 +11,10 @@ This reverts commit 272873823e9beff91ea1a62845fc7e5f94a9636f.
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 40b5ef1..0e3d539 100644
index c11dd08..10e484c 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -797,7 +797,7 @@ static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
@@ -812,7 +812,7 @@ static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
return ret;
}
@ -23,7 +23,7 @@ index 40b5ef1..0e3d539 100644
{
const struct wined3d_gl_info *gl_info = context->gl_info;
int current = GetPixelFormat(dc);
@@ -815,7 +815,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
@@ -830,7 +830,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
}
context->restore_pf = 0;
@ -32,7 +32,7 @@ index 40b5ef1..0e3d539 100644
return TRUE;
}
@@ -834,12 +834,12 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
@@ -849,12 +849,12 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
return FALSE;
}
@ -47,7 +47,7 @@ index 40b5ef1..0e3d539 100644
context->restore_pf_win = win;
}
@@ -860,7 +860,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
@@ -875,7 +875,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
struct wined3d_swapchain *swapchain = ctx->swapchain;
BOOL backup = FALSE;
@ -56,7 +56,7 @@ index 40b5ef1..0e3d539 100644
{
WARN("Failed to set pixel format %d on device context %p.\n",
ctx->pixel_format, ctx->hdc);
@@ -893,7 +893,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
@@ -908,7 +908,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
return FALSE;
}
@ -65,7 +65,7 @@ index 40b5ef1..0e3d539 100644
{
ERR("Failed to set pixel format %d on device context %p.\n",
ctx->pixel_format, dc);
@@ -937,7 +937,6 @@ static void context_update_window(struct wined3d_context *context)
@@ -952,7 +952,6 @@ static void context_update_window(struct wined3d_context *context)
wined3d_release_dc(context->win_handle, context->hdc);
context->win_handle = context->swapchain->win_handle;
@ -73,7 +73,7 @@ index 40b5ef1..0e3d539 100644
context->needs_set = 1;
context->valid = 1;
@@ -1388,7 +1387,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1446,7 +1445,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
int swap_interval;
DWORD state;
HDC hdc;
@ -81,7 +81,7 @@ index 40b5ef1..0e3d539 100644
TRACE("swapchain %p, target %p, window %p.\n", swapchain, target, swapchain->win_handle);
@@ -1456,9 +1454,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1519,9 +1517,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
{
WARN("Failed to retrieve device context, trying swapchain backup.\n");
@ -92,7 +92,7 @@ index 40b5ef1..0e3d539 100644
{
ERR("Failed to retrieve a device context.\n");
goto out;
@@ -1509,7 +1505,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1587,7 +1583,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
ret->gl_info = gl_info;
@ -101,7 +101,7 @@ index 40b5ef1..0e3d539 100644
{
ERR("Failed to set pixel format %d on device context %p.\n", pixel_format, hdc);
context_release(ret);
@@ -1586,7 +1582,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1650,7 +1646,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
ret->glCtx = ctx;
ret->win_handle = swapchain->win_handle;
ret->hdc = hdc;
@ -110,20 +110,20 @@ index 40b5ef1..0e3d539 100644
ret->needs_set = 1;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 0b9b767..926f1dc 100644
index b060f53..c6390a2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1159,9 +1159,8 @@ struct wined3d_context
DWORD lowest_disabled_stage : 4; /* Max MAX_TEXTURES, 8 */
@@ -1193,9 +1193,8 @@ struct wined3d_context
DWORD use_immediate_mode_draw : 1;
DWORD rebind_fbo : 1;
DWORD needs_set : 1;
- DWORD hdc_is_private : 1;
DWORD update_shader_resource_bindings : 1;
- DWORD padding : 16;
+ DWORD padding : 17;
- DWORD padding : 15;
+ DWORD padding : 16;
DWORD shader_update_mask;
DWORD constant_update_mask;
DWORD numbered_array_mask;
--
2.3.1
2.7.1

View File

@ -59,7 +59,7 @@ upstream_commit()
version()
{{
echo "Wine Staging {latest_staging_version}"
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
echo " commit $(upstream_commit)"