Rebase against upstream commit 79a0dece8b2a27979835076914a21f468515d8b6, remove several patches accepted upstream.

This commit is contained in:
Sebastian Lackner 2015-01-16 05:05:54 +01:00
parent 3e7445275a
commit 8692907421
35 changed files with 383 additions and 623 deletions

View File

@ -47,7 +47,7 @@ Included bug fixes and improvements
**Bugs fixed in Wine Staging 1.7.34-1 [135]:**
* ATL IOCS data should not be stored in GWLP_USERDATA ([Wine Bug #21767](https://bugs.winehq.org/show_bug.cgi?id=21767))
* ~~ATL IOCS data should not be stored in GWLP_USERDATA~~ ([Wine Bug #21767](https://bugs.winehq.org/show_bug.cgi?id=21767))
* Add Dynamic DST exceptions for Israel Standard Time ([Wine Bug #36374](https://bugs.winehq.org/show_bug.cgi?id=36374))
* Add default ACLs for user shell folders
* Add nvapi stubs required for GPU PhysX support
@ -65,7 +65,7 @@ Included bug fixes and improvements
* Avoid race-conditions of async WSARecv() operations with write watches.
* Basic support for CUDA
* Black & White needs DXTn software decoding support ([Wine Bug #14939](https://bugs.winehq.org/show_bug.cgi?id=14939))
* Correctly treat '.' when checking for empty directories ([Wine Bug #26272](https://bugs.winehq.org/show_bug.cgi?id=26272))
* ~~Correctly treat '.' when checking for empty directories~~ ([Wine Bug #26272](https://bugs.winehq.org/show_bug.cgi?id=26272))
* CreateProcess does not prioritize the working directory over the system search path ([Wine Bug #23934](https://bugs.winehq.org/show_bug.cgi?id=23934))
* D3DCompileShader should filter specific warning messages ([Wine Bug #33770](https://bugs.winehq.org/show_bug.cgi?id=33770))
* Do not fail when a used context is passed to wglShareLists ([Wine Bug #11436](https://bugs.winehq.org/show_bug.cgi?id=11436))
@ -112,7 +112,7 @@ Included bug fixes and improvements
* Implement an Arial replacement font ([Wine Bug #32323](https://bugs.winehq.org/show_bug.cgi?id=32323))
* Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042))
* Improvement for heap allocation performance
* Initialize irp.Tail.Overlay.OriginalFileObject with stub file object ([Wine Bug #37537](https://bugs.winehq.org/show_bug.cgi?id=37537))
* ~~Initialize irp.Tail.Overlay.OriginalFileObject with stub file object~~ ([Wine Bug #37537](https://bugs.winehq.org/show_bug.cgi?id=37537))
* Lego Stunt Rally requires DXTn software de/encoding support ([Wine Bug #25486](https://bugs.winehq.org/show_bug.cgi?id=25486))
* Limit cross thread access to ImmSet* functions ([Wine Bug #35361](https://bugs.winehq.org/show_bug.cgi?id=35361))
* Lockfree algorithm for filedescriptor cache (improves file access speed)

3
debian/changelog vendored
View File

@ -10,6 +10,9 @@ wine-staging (1.7.35) UNRELEASED; urgency=low
* Added patch to fix init of LONGLONG variable with a negative value in TGA decoder.
* Removed patch to set last error on success in WSARecv (accepted upstream).
* Removed patch to fix handling of subdirectory in FtpFindFirstFile (accepted upstream).
* Removed patch to initialize irp.Tail.Overlay.OriginalFileObject with stub file object (accepted upstream).
* Removed patch to fix incorrect behaviour of PathIsDirectoryEmptyW (accepted upstream).
* Removed patch to store IOCS data in a property instead of GWLP_USERDATA (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 12 Jan 2015 13:06:22 +0100
wine-staging (1.7.34-1) unstable; urgency=low

View File

@ -146,11 +146,12 @@ def _stable_compholio_version():
if distro.lower() != "unreleased":
return version
def _latest_wine_commit():
def _latest_wine_commit(commit=None):
"""Get latest wine commit."""
if not os.path.isdir(config.path_wine):
raise PatchUpdaterError("Please create a symlink to the wine repository in %s" % config.path_wine)
commit = subprocess.check_output(["git", "rev-parse", "origin/master"], cwd=config.path_wine).strip()
if commit is None:
commit = subprocess.check_output(["git", "rev-parse", "origin/master"], cwd=config.path_wine).strip()
assert len(commit) == 40
return commit
@ -650,7 +651,7 @@ if __name__ == "__main__":
try:
# Get information about Wine and Compholio version
latest_wine_commit = _latest_wine_commit()
latest_wine_commit = _latest_wine_commit(sys.argv[1] if len(sys.argv) >= 2 else None)
stable_compholio_version = _stable_compholio_version()
# Read current and stable patches

View File

@ -1,71 +0,0 @@
From 4d79656ea8c30f14fcd4a8e6a901e7b50ea50eef Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Thu, 17 Apr 2014 04:34:30 +0800
Subject: atl: Don't use GWLP_USERDATA to store IOCS to avoid conflict with
Apps.
---
dlls/atl/atl_ax.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
index 5bafbf1..45936e8 100644
--- a/dlls/atl/atl_ax.c
+++ b/dlls/atl/atl_ax.c
@@ -38,6 +38,8 @@
#include "wine/unicode.h"
+#define WINE_IOCS_PROPERTY "WINE_IOCS"
+
WINE_DEFAULT_DEBUG_CHANNEL(atl);
typedef struct IOCS {
@@ -150,7 +152,7 @@ static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */
if ( This->hWnd )
{
SetWindowLongPtrW( This->hWnd, GWLP_WNDPROC, (ULONG_PTR) This->OrigWndProc );
- SetWindowLongPtrW( This->hWnd, GWLP_USERDATA, 0 );
+ RemovePropA( This->hWnd, WINE_IOCS_PROPERTY );
This->hWnd = NULL;
}
if ( This->control )
@@ -906,7 +908,7 @@ static LRESULT IOCS_OnWndProc( IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam,
static LRESULT CALLBACK AtlHost_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
- IOCS *This = (IOCS*) GetWindowLongPtrW( hWnd, GWLP_USERDATA );
+ IOCS *This = (IOCS *)GetPropA( hWnd, WINE_IOCS_PROPERTY );
return IOCS_OnWndProc( This, hWnd, wMsg, wParam, lParam );
}
@@ -915,7 +917,7 @@ static HRESULT IOCS_Attach( IOCS *This, HWND hWnd, IUnknown *pUnkControl ) /* su
This->hWnd = hWnd;
IUnknown_QueryInterface( pUnkControl, &IID_IOleObject, (void**)&This->control );
IOleObject_SetClientSite( This->control, &This->IOleClientSite_iface );
- SetWindowLongPtrW( hWnd, GWLP_USERDATA, (ULONG_PTR) This );
+ SetPropA( hWnd, WINE_IOCS_PROPERTY, This );
This->OrigWndProc = (WNDPROC)SetWindowLongPtrW( hWnd, GWLP_WNDPROC, (ULONG_PTR) AtlHost_wndproc );
return S_OK;
@@ -1329,7 +1331,7 @@ HRESULT WINAPI AtlAxGetHost(HWND hWnd, IUnknown **host)
*host = NULL;
- This = (IOCS*) GetWindowLongPtrW( hWnd, GWLP_USERDATA );
+ This = (IOCS *)GetPropA( hWnd, WINE_IOCS_PROPERTY );
if ( !This )
{
WARN("No container attached to %p\n", hWnd );
@@ -1351,7 +1353,7 @@ HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
*pUnk = NULL;
- This = (IOCS*) GetWindowLongPtrW( hWnd, GWLP_USERDATA );
+ This = (IOCS *)GetPropA ( hWnd, WINE_IOCS_PROPERTY );
if ( !This || !This->control )
{
WARN("No control attached to %p\n", hWnd );
--
1.7.9.5

View File

@ -1 +0,0 @@
Fixes: [21767] ATL IOCS data should not be stored in GWLP_USERDATA

View File

@ -1,51 +0,0 @@
From b8a93a6c879b8bd2d49cb43755cf8180d5372525 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 10 Nov 2014 23:48:14 +0100
Subject: ntoskrnl: Initialize irp.Tail.Overlay.OriginalFileObject with stub
file object.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 1d87110..aee68b3 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -142,6 +142,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
IRP irp;
MDL mdl;
IO_STACK_LOCATION irpsp;
+ FILE_OBJECT file;
PDRIVER_DISPATCH dispatch = device->DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL];
NTSTATUS status;
LARGE_INTEGER count;
@@ -152,6 +153,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
memset( &irp, 0x55, sizeof(irp) );
memset( &irpsp, 0x66, sizeof(irpsp) );
memset( &mdl, 0x77, sizeof(mdl) );
+ memset( &file, 0x88, sizeof(file) );
irp.RequestorMode = UserMode;
if ((code & 3) == METHOD_BUFFERED)
@@ -166,6 +168,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
irp.UserBuffer = out_buff;
irp.MdlAddress = &mdl;
irp.Tail.Overlay.s.u2.CurrentStackLocation = &irpsp;
+ irp.Tail.Overlay.OriginalFileObject = &file;
irp.UserIosb = NULL;
irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL;
@@ -182,6 +185,9 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
mdl.ByteCount = *out_size;
mdl.ByteOffset = 0;
+ file.FsContext = NULL;
+ file.FsContext2 = NULL;
+
device->CurrentIrp = &irp;
KeQueryTickCount( &count ); /* update the global KeTickCount */
--
2.1.3

View File

@ -1 +0,0 @@
Fixes: [37537] Initialize irp.Tail.Overlay.OriginalFileObject with stub file object

View File

@ -60,7 +60,6 @@ patch_enable_all ()
enable_Miscellaneous="$1"
enable_Pipelight="$1"
enable_Staging="$1"
enable_atl_IOCS_Property="$1"
enable_comctl32_LoadIconMetric="$1"
enable_configure_Absolute_RPATH="$1"
enable_d3d9_Surface_Refcount="$1"
@ -128,7 +127,6 @@ patch_enable_all ()
enable_ntdll_WinSqm="$1"
enable_ntoskrnl_Emulator="$1"
enable_ntoskrnl_Irp_Status="$1"
enable_ntoskrnl_Stub_FileObject="$1"
enable_nvapi_Stub_DLL="$1"
enable_nvcuda_CUDA_Support="$1"
enable_nvcuvid_CUDA_Video_Support="$1"
@ -153,7 +151,6 @@ patch_enable_all ()
enable_shell32_RunDLL_CallEntry16="$1"
enable_shell32_SHCreateSessionKey="$1"
enable_shell32_SHFileOperation="$1"
enable_shlwapi_PathIsDirectoryEmptyW="$1"
enable_shlwapi_UrlCombine="$1"
enable_slc_SLGetWindowsInformation="$1"
enable_urlmon_CoInternetSetFeatureEnabled="$1"
@ -208,9 +205,6 @@ patch_enable ()
Staging)
enable_Staging="$2"
;;
atl-IOCS_Property)
enable_atl_IOCS_Property="$2"
;;
comctl32-LoadIconMetric)
enable_comctl32_LoadIconMetric="$2"
;;
@ -412,9 +406,6 @@ patch_enable ()
ntoskrnl-Irp_Status)
enable_ntoskrnl_Irp_Status="$2"
;;
ntoskrnl-Stub_FileObject)
enable_ntoskrnl_Stub_FileObject="$2"
;;
nvapi-Stub_DLL)
enable_nvapi_Stub_DLL="$2"
;;
@ -487,9 +478,6 @@ patch_enable ()
shell32-SHFileOperation)
enable_shell32_SHFileOperation="$2"
;;
shlwapi-PathIsDirectoryEmptyW)
enable_shlwapi_PathIsDirectoryEmptyW="$2"
;;
shlwapi-UrlCombine)
enable_shlwapi_UrlCombine="$2"
;;
@ -1033,21 +1021,6 @@ if test "$enable_Staging" -eq 1; then
) >> "$patchlist"
fi
# Patchset atl-IOCS_Property
# |
# | This patchset fixes the following Wine bugs:
# | * [#21767] ATL IOCS data should not be stored in GWLP_USERDATA
# |
# | Modified files:
# | * dlls/atl/atl_ax.c
# |
if test "$enable_atl_IOCS_Property" -eq 1; then
patch_apply atl-IOCS_Property/0001-atl-Don-t-use-GWLP_USERDATA-to-store-IOCS-to-avoid-c.patch
(
echo '+ { "Qian Hong", "atl: Don'\''t use GWLP_USERDATA to store IOCS to avoid conflict with Apps.", 1 },';
) >> "$patchlist"
fi
# Patchset comctl32-LoadIconMetric
# |
# | This patchset fixes the following Wine bugs:
@ -2172,21 +2145,6 @@ if test "$enable_ntoskrnl_Irp_Status" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntoskrnl-Stub_FileObject
# |
# | This patchset fixes the following Wine bugs:
# | * [#37537] Initialize irp.Tail.Overlay.OriginalFileObject with stub file object
# |
# | Modified files:
# | * dlls/ntoskrnl.exe/ntoskrnl.c
# |
if test "$enable_ntoskrnl_Stub_FileObject" -eq 1; then
patch_apply ntoskrnl-Stub_FileObject/0001-ntoskrnl-Initialize-irp.Tail.Overlay.OriginalFileObj.patch
(
echo '+ { "Sebastian Lackner", "ntoskrnl: Initialize irp.Tail.Overlay.OriginalFileObject with stub file object.", 1 },';
) >> "$patchlist"
fi
# Patchset nvcuda-CUDA_Support
# |
# | Modified files:
@ -2623,21 +2581,6 @@ if test "$enable_shell32_SHFileOperation" -eq 1; then
) >> "$patchlist"
fi
# Patchset shlwapi-PathIsDirectoryEmptyW
# |
# | This patchset fixes the following Wine bugs:
# | * [#26272] Correctly treat '.' when checking for empty directories
# |
# | Modified files:
# | * dlls/shlwapi/path.c
# |
if test "$enable_shlwapi_PathIsDirectoryEmptyW" -eq 1; then
patch_apply shlwapi-PathIsDirectoryEmptyW/0001-shlwapi-Correctly-treat-.-when-enumerating-files-in-.patch
(
echo '+ { "Michael Müller", "shlwapi: Correctly treat '\''.'\'' when enumerating files in PathIsDirectoryEmptyW.", 1 },';
) >> "$patchlist"
fi
# Patchset shlwapi-UrlCombine
# |
# | Modified files:
@ -2853,6 +2796,21 @@ if test "$enable_winebuild_LinkerVersion" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-Color_Key
# |
# | This patchset fixes the following Wine bugs:
# | * [#37748] Fix color key regression causing pink rectangles around text
# |
# | Modified files:
# | * dlls/wined3d/surface.c
# |
if test "$enable_wined3d_Color_Key" -eq 1; then
patch_apply wined3d-Color_Key/0001-wined3d-Use-proper-color-key-type-define-when-callin.patch
(
echo '+ { "Christian Costa", "wined3d: Use proper color key type define when calling wined3d_texture_set_color_key.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Helper
# |
# | Modified files:
@ -2869,21 +2827,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-Color_Key
# |
# | This patchset fixes the following Wine bugs:
# | * [#37748] Fix color key regression causing pink rectangles around text
# |
# | Modified files:
# | * dlls/wined3d/surface.c
# |
if test "$enable_wined3d_Color_Key" -eq 1; then
patch_apply wined3d-Color_Key/0001-wined3d-Use-proper-color-key-type-define-when-callin.patch
(
echo '+ { "Christian Costa", "wined3d: Use proper color key type define when calling wined3d_texture_set_color_key.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,62 +0,0 @@
From b145c61782e6bfc45d44f4b8877ec53823796751 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 28 Sep 2014 17:30:45 +0200
Subject: shlwapi: Correctly treat '.' when enumerating files in
PathIsDirectoryEmptyW.
---
dlls/shlwapi/path.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c
index 5c7a88a..051ce0f 100644
--- a/dlls/shlwapi/path.c
+++ b/dlls/shlwapi/path.c
@@ -3870,13 +3870,13 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
WCHAR szSearch[MAX_PATH];
DWORD dwLen;
HANDLE hfind;
- BOOL retVal = FALSE;
+ BOOL retVal = TRUE;
WIN32_FIND_DATAW find_data;
TRACE("(%s)\n",debugstr_w(lpszPath));
if (!lpszPath || !PathIsDirectoryW(lpszPath))
- return FALSE;
+ return FALSE;
lstrcpynW(szSearch, lpszPath, MAX_PATH);
PathAddBackslashW(szSearch);
@@ -3886,14 +3886,23 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
strcpyW(szSearch + dwLen, szAllFiles);
hfind = FindFirstFileW(szSearch, &find_data);
- if (hfind != INVALID_HANDLE_VALUE)
+ if (hfind == INVALID_HANDLE_VALUE)
+ return FALSE;
+
+ do
{
- if (find_data.cFileName[0] == '.' && find_data.cFileName[1] == '.')
- /* The only directory entry should be the parent */
- retVal = !FindNextFileW(hfind, &find_data);
- FindClose(hfind);
+ if (find_data.cFileName[0] == '.')
+ {
+ if (find_data.cFileName[1] == '\0') continue;
+ if (find_data.cFileName[1] == '.' && find_data.cFileName[2] == '\0') continue;
+ }
+
+ retVal = FALSE;
+ break;
}
+ while (FindNextFileW(hfind, &find_data));
+ FindClose(hfind);
return retVal;
}
--
1.9.1

View File

@ -1 +0,0 @@
Fixes: [26272] Correctly treat '.' when checking for empty directories

View File

@ -1,4 +1,4 @@
From e29e2b0ccda7ed5e930eb18b3c73204150a68123 Mon Sep 17 00:00:00 2001
From fb2ae897035c342f2d78590928eaa62f8bb2b47e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 19:16:40 +0100
Subject: wined3d: Pass a context to read_from_framebuffer.
@ -12,10 +12,10 @@ load_location / preload callers. This is related to bug 34574.
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3877139..ef6a233 100644
index 534a152..534d4bd 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2781,11 +2781,13 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2935,11 +2935,13 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
return WINED3D_OK;
}
@ -30,7 +30,7 @@ index 3877139..ef6a233 100644
BYTE *mem;
BYTE *row, *top, *bottom;
int i;
@@ -2794,7 +2796,21 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2948,7 +2950,21 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
surface_get_memory(surface, &data, dst_location);
@ -53,8 +53,8 @@ index 3877139..ef6a233 100644
context_apply_blit_state(context, device);
gl_info = context->gl_info;
@@ -2882,7 +2898,12 @@ error:
checkGLcall("glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)");
@@ -3036,7 +3052,12 @@ error:
checkGLcall("glBindBuffer");
}
- context_release(context);
@ -67,7 +67,7 @@ index 3877139..ef6a233 100644
}
/* Read the framebuffer contents into a texture. Note that this function
@@ -4037,7 +4058,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4191,7 +4212,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
if (surface->locations & WINED3D_LOCATION_DRAWABLE)
{
@ -77,5 +77,5 @@ index 3877139..ef6a233 100644
}
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From 7b874f424fc87ef49a94bc78d7080616ac9681a4 Mon Sep 17 00:00:00 2001
From 75d61e9b6e6f30be95ef495a5c2dd6e88955c575 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 01:02:15 +0100
Subject: wined3d: Remove surface_invalidate_location.
@ -15,7 +15,7 @@ Subject: wined3d: Remove surface_invalidate_location.
8 files changed, 31 insertions(+), 43 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 08f92cb..f612099 100644
index 93ecb99..f7bea42 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7687,7 +7687,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@ -28,7 +28,7 @@ index 08f92cb..f612099 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 1f34992..61c074f 100644
index d214037..3c17b03 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3085,7 +3085,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
@ -41,7 +41,7 @@ index 1f34992..61c074f 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index bde37b1..a6620f5 100644
index a26f1b0..2ef0efc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -393,7 +393,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -67,7 +67,7 @@ index 7034b25..eef7e2c 100644
}
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6f48834..8789d44 100644
index 9f74a39..d3bbb54 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
@ -80,7 +80,7 @@ index 6f48834..8789d44 100644
static void surface_release_client_storage(struct wined3d_surface *surface)
@@ -1185,7 +1185,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
checkGLcall("glDeleteBuffersARB(1, &surface->pbo)");
checkGLcall("glDeleteBuffers(1, &surface->pbo)");
surface->pbo = 0;
- surface_invalidate_location(surface, WINED3D_LOCATION_BUFFER);
@ -136,7 +136,7 @@ index 6f48834..8789d44 100644
/* Switching color keying on / off may change the internal format. */
if (ck_changed)
wined3d_texture_force_reload(surface->container);
@@ -2813,7 +2816,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2822,7 +2825,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@ -145,7 +145,7 @@ index 6f48834..8789d44 100644
switch (surface->resource.map_binding)
{
@@ -2929,7 +2932,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2938,7 +2941,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
@ -154,7 +154,7 @@ index 6f48834..8789d44 100644
if (context)
context_release(context);
@@ -2978,7 +2981,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2987,7 +2990,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
context = context_acquire(device, NULL);
surface_load_location(surface, context, surface->resource.map_binding);
@ -163,7 +163,7 @@ index 6f48834..8789d44 100644
if (context)
context_release(context);
}
@@ -3352,7 +3355,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3361,7 +3364,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
@ -172,7 +172,7 @@ index 6f48834..8789d44 100644
}
/* Uses the hardware to stretch and flip the image */
@@ -3420,7 +3423,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3429,7 +3432,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -181,7 +181,7 @@ index 6f48834..8789d44 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3626,7 +3629,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3635,7 +3638,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
@ -190,7 +190,7 @@ index 6f48834..8789d44 100644
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3939,7 +3942,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@@ -3948,7 +3951,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
(old_color_key_flags & WINEDDSD_CKSRCBLT) ? &old_blt_key : NULL);
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
@ -199,7 +199,7 @@ index 6f48834..8789d44 100644
return WINED3D_OK;
}
@@ -4183,18 +4186,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4192,18 +4195,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -218,7 +218,7 @@ index 6f48834..8789d44 100644
static DWORD resource_access_from_location(DWORD location)
{
switch (location)
@@ -5674,7 +5665,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5683,7 +5674,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
context_release(context);
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
@ -227,7 +227,7 @@ index 6f48834..8789d44 100644
return WINED3D_OK;
}
@@ -5803,7 +5794,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5812,7 +5803,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
{
wined3d_resource_free_sysmem(&surface->resource);
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DIB);
@ -237,10 +237,10 @@ index 6f48834..8789d44 100644
return hr;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 3b0c6b3..290a6cd 100644
index bdb4b67..e64715e 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -517,7 +517,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@@ -512,7 +512,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
surface_load_location(back_buffer, context, WINED3D_LOCATION_TEXTURE_RGB);
@ -249,7 +249,7 @@ index 3b0c6b3..290a6cd 100644
swapchain->render_to_fbo = TRUE;
swapchain_update_draw_bindings(swapchain);
}
@@ -579,15 +579,15 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@@ -574,15 +574,15 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
else
{
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
@ -268,7 +268,7 @@ index 3b0c6b3..290a6cd 100644
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
* and INTEXTURE copies can keep their old content if they have any defined content.
* If the swapeffect is COPY, the content remains the same. If it is FLIP however,
@@ -596,7 +596,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@@ -591,7 +591,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
{
wined3d_resource_validate_location(&back_buffer->resource, back_buffer->container->resource.draw_binding);
@ -277,7 +277,7 @@ index 3b0c6b3..290a6cd 100644
}
}
@@ -871,7 +871,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
@@ -866,7 +866,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
if (!(device->wined3d->flags & WINED3D_NO3D))
{
wined3d_resource_validate_location(&front_buffer->resource, WINED3D_LOCATION_DRAWABLE);
@ -287,7 +287,7 @@ index 3b0c6b3..290a6cd 100644
/* MSDN says we're only allowed a single fullscreen swapchain per device,
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 9d89774..24c6cb9 100644
index f2bba1a..6d82ce6 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -855,7 +855,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
@ -311,10 +311,10 @@ index 9d89774..24c6cb9 100644
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2790115..002afea 100644
index acee894..878a98c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2366,7 +2366,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
@@ -2365,7 +2365,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
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;
@ -323,5 +323,5 @@ index 2790115..002afea 100644
void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 2ccc91e1322be4c1cffed1dd28c04e42466955f2 Mon Sep 17 00:00:00 2001
From 680c99d5fb4ab94a37f934c66bf9c22a326b0dd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 3 Oct 2013 12:47:01 +0200
Subject: wined3d: Move load_location into the resource.
@ -16,7 +16,7 @@ and downloading from textures will be delegated to surfaces / volumes.
6 files changed, 91 insertions(+), 36 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index d9bc820..2e44f0f 100644
index 5931232..2386410 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1128,12 +1128,20 @@ static void wined3d_buffer_location_invalidated(struct wined3d_resource *resourc
@ -99,7 +99,7 @@ index a63eab8..7f283f5 100644
+ resource->resource_ops->resource_load_location(resource, context, location);
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 738941e..73e74a6 100644
index b9d8968..5f6a0c2 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1281,12 +1281,20 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
@ -167,7 +167,7 @@ index 6d82ce6..fc0f6d6 100644
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 2cc0baf..3c51bdf 100644
index 6b685bd..e2c9d4a 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -137,27 +137,6 @@ static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
@ -249,7 +249,7 @@ index 2cc0baf..3c51bdf 100644
- wined3d_volume_load_location(volume, context, WINED3D_LOCATION_BUFFER);
+ wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_BUFFER);
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
@@ -585,7 +560,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
else if (!(volume->resource.locations & WINED3D_LOCATION_SYSMEM))

View File

@ -1,4 +1,4 @@
From 6502ec68de4a38d59a2e6690eca2546e710b6cbc Mon Sep 17 00:00:00 2001
From d93611cca0ee39d60a221d4c2422ba183a2a88ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 18 Sep 2013 22:30:57 +0200
Subject: wined3d: Introduce helper functions for mapping volumes.
@ -8,10 +8,10 @@ Subject: wined3d: Introduce helper functions for mapping volumes.
1 file changed, 96 insertions(+), 61 deletions(-)
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index c93a1ef..ee64070 100644
index e2c9d4a..ad37cce 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -475,12 +475,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
@@ -476,12 +476,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
return TRUE;
}
@ -43,22 +43,22 @@ index c93a1ef..ee64070 100644
+ {
+ case WINED3D_LOCATION_BUFFER:
+ gl_info = context->gl_info;
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
+
+ if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
+ {
+ GLbitfield mapflags = wined3d_resource_gl_map_flags(flags);
+ mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT;
+ ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER_ARB,
+ ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
+ 0, volume->resource.size, mapflags));
+ }
+ else
+ {
+ GLenum access = wined3d_resource_gl_legacy_map_flags(flags);
+ ptr = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, access));
+ ptr = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, access));
+ }
+
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
+ checkGLcall("Map PBO");
+ return ptr;
+
@ -80,7 +80,7 @@ index c93a1ef..ee64070 100644
BYTE *base_memory;
const struct wined3d_format *format = volume->resource.format;
@@ -512,58 +567,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -513,58 +568,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags);
@ -97,22 +97,22 @@ index c93a1ef..ee64070 100644
- else
- wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_BUFFER);
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
-
- if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
- {
- GLbitfield mapflags = wined3d_resource_gl_map_flags(flags);
- mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT;
- base_memory = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER_ARB,
- base_memory = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
- 0, volume->resource.size, mapflags));
- }
- else
- {
- GLenum access = wined3d_resource_gl_legacy_map_flags(flags);
- base_memory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, access));
- base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, access));
- }
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("Map PBO");
-
+ WARN("Out of memory.\n");
@ -150,7 +150,7 @@ index c93a1ef..ee64070 100644
TRACE("Base memory pointer %p.\n", base_memory);
@@ -621,8 +640,34 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
@@ -622,8 +641,34 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
return volume_from_resource(resource);
}
@ -163,9 +163,9 @@ index c93a1ef..ee64070 100644
+ {
+ case WINED3D_LOCATION_BUFFER:
+ gl_info = context->gl_info;
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
+ GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
+ GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
+ checkGLcall("Unmap PBO");
+ return;
+
@ -185,7 +185,7 @@ index c93a1ef..ee64070 100644
TRACE("volume %p.\n", volume);
if (!volume->resource.map_count)
@@ -631,19 +676,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
@@ -632,19 +677,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
return WINED3DERR_INVALIDCALL;
}
@ -195,9 +195,9 @@ index c93a1ef..ee64070 100644
- struct wined3d_context *context = context_acquire(device, NULL);
- const struct wined3d_gl_info *gl_info = context->gl_info;
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
- GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
- GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("Unmap PBO");
-
- context_release(context);
@ -209,5 +209,5 @@ index c93a1ef..ee64070 100644
volume->resource.map_count--;
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From f6dd61b4db19ba22e8e8f7d9d6bcf92e4419dc0f Mon Sep 17 00:00:00 2001
From ba5c51ffdfff3be025ace2dd52218bd845c9d851 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 16 Jan 2014 22:07:17 +0100
Subject: wined3d: Move volume PBO infrastructure into the resource.
@ -10,7 +10,7 @@ Subject: wined3d: Move volume PBO infrastructure into the resource.
3 files changed, 82 insertions(+), 79 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 7f283f5..c1ec97b 100644
index 7f283f5..c907424 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -292,7 +292,7 @@ GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags)
@ -37,22 +37,22 @@ index 7f283f5..c1ec97b 100644
+ {
+ case WINED3D_LOCATION_BUFFER:
+ gl_info = context->gl_info;
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, resource->buffer_object));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, resource->buffer_object));
+
+ if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
+ {
+ GLbitfield mapflags = wined3d_resource_gl_map_flags(flags);
+ mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT;
+ ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER_ARB,
+ ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
+ 0, resource->size, mapflags));
+ }
+ else
+ {
+ GLenum access = wined3d_resource_gl_legacy_map_flags(flags);
+ ptr = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, access));
+ ptr = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, access));
+ }
+
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
+ checkGLcall("Map GL buffer");
+ return ptr;
+
@ -74,9 +74,9 @@ index 7f283f5..c1ec97b 100644
+ {
+ case WINED3D_LOCATION_BUFFER:
+ gl_info = context->gl_info;
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, resource->buffer_object));
+ GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, resource->buffer_object));
+ GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
+ checkGLcall("Unmap GL buffer");
+ return;
+
@ -89,7 +89,7 @@ index 7f283f5..c1ec97b 100644
+ }
+}
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 2e92dd7..c538e08 100644
index ad37cce..db3a68c 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -216,7 +216,7 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource,
@ -127,12 +127,12 @@ index 2e92dd7..c538e08 100644
+ if (volume->resource.buffer_object)
return;
- GL_EXTCALL(glGenBuffersARB(1, &volume->pbo));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
+ GL_EXTCALL(glGenBuffersARB(1, &volume->resource.buffer_object));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.buffer_object));
GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.size, NULL, GL_STREAM_DRAW_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glGenBuffers(1, &volume->pbo));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
+ GL_EXTCALL(glGenBuffers(1, &volume->resource.buffer_object));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->resource.buffer_object));
GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, volume->resource.size, NULL, GL_STREAM_DRAW));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("Create PBO");
- TRACE("Created PBO %u for volume %p.\n", volume->pbo, volume);
@ -145,10 +145,10 @@ index 2e92dd7..c538e08 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
- TRACE("Deleting PBO %u belonging to volume %p.\n", volume->pbo, volume);
- GL_EXTCALL(glDeleteBuffersARB(1, &volume->pbo));
- GL_EXTCALL(glDeleteBuffers(1, &volume->pbo));
+ TRACE("Deleting PBO %u belonging to volume %p.\n", volume->resource.buffer_object, volume);
+ GL_EXTCALL(glDeleteBuffersARB(1, &volume->resource.buffer_object));
checkGLcall("glDeleteBuffersARB");
+ GL_EXTCALL(glDeleteBuffers(1, &volume->resource.buffer_object));
checkGLcall("glDeleteBuffers");
- volume->pbo = 0;
+ volume->resource.buffer_object = 0;
context_release(context);
@ -186,22 +186,22 @@ index 2e92dd7..c538e08 100644
- {
- case WINED3D_LOCATION_BUFFER:
- gl_info = context->gl_info;
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
-
- if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
- {
- GLbitfield mapflags = wined3d_resource_gl_map_flags(flags);
- mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT;
- ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER_ARB,
- ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
- 0, volume->resource.size, mapflags));
- }
- else
- {
- GLenum access = wined3d_resource_gl_legacy_map_flags(flags);
- ptr = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, access));
- ptr = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, access));
- }
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("Map PBO");
- return ptr;
-
@ -239,9 +239,9 @@ index 2e92dd7..c538e08 100644
- {
- case WINED3D_LOCATION_BUFFER:
- gl_info = context->gl_info;
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
- GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
- GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("Unmap PBO");
- return;
-

View File

@ -1,4 +1,4 @@
From f6bb878818089d9f8f735ce5e2e4495f40ce7ec8 Mon Sep 17 00:00:00 2001
From b8a17a0ce26bee0843d1bab91a435575751b7063 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 13:25:48 +0100
Subject: wined3d: Remove surface->pbo.
@ -9,7 +9,7 @@ Subject: wined3d: Remove surface->pbo.
2 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6154315..4a2b636 100644
index 1496beb..e534a9f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -46,7 +46,7 @@ static void surface_cleanup(struct wined3d_surface *surface)
@ -29,9 +29,9 @@ index 6154315..4a2b636 100644
+ if (surface->resource.buffer_object)
{
- TRACE("Deleting PBO %u.\n", surface->pbo);
- GL_EXTCALL(glDeleteBuffersARB(1, &surface->pbo));
- GL_EXTCALL(glDeleteBuffers(1, &surface->pbo));
+ TRACE("Deleting PBO %u.\n", surface->resource.buffer_object);
+ GL_EXTCALL(glDeleteBuffersARB(1, &surface->resource.buffer_object));
+ GL_EXTCALL(glDeleteBuffers(1, &surface->resource.buffer_object));
}
if (surface->rb_multisample)
@ -55,8 +55,8 @@ index 6154315..4a2b636 100644
context = context_acquire(surface->resource.device, NULL);
gl_info = context->gl_info;
- GL_EXTCALL(glGenBuffersARB(1, &surface->pbo));
+ GL_EXTCALL(glGenBuffersARB(1, &surface->resource.buffer_object));
- GL_EXTCALL(glGenBuffers(1, &surface->pbo));
+ GL_EXTCALL(glGenBuffers(1, &surface->resource.buffer_object));
error = gl_info->gl_ops.gl.p_glGetError();
- if (!surface->pbo || error != GL_NO_ERROR)
+ if (!surface->resource.buffer_object || error != GL_NO_ERROR)
@ -65,28 +65,28 @@ index 6154315..4a2b636 100644
- TRACE("Binding PBO %u.\n", surface->pbo);
+ TRACE("Binding PBO %u.\n", surface->resource.buffer_object);
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.buffer_object));
checkGLcall("glBindBufferARB");
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->resource.buffer_object));
checkGLcall("glBindBuffer");
GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.size + 4,
GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, surface->resource.size + 4,
@@ -735,7 +735,7 @@ static void surface_unmap(struct wined3d_surface *surface)
context = context_acquire(device, NULL);
gl_info = context->gl_info;
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.buffer_object));
GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("glUnmapBufferARB");
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->resource.buffer_object));
GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("glUnmapBuffer");
@@ -1181,10 +1181,10 @@ HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *sur
/* Context activation is done by the caller. */
static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info)
{
- GL_EXTCALL(glDeleteBuffersARB(1, &surface->pbo));
- checkGLcall("glDeleteBuffersARB(1, &surface->pbo)");
+ GL_EXTCALL(glDeleteBuffersARB(1, &surface->resource.buffer_object));
+ checkGLcall("glDeleteBuffersARB(1, &surface->resource.buffer_object)");
- GL_EXTCALL(glDeleteBuffers(1, &surface->pbo));
- checkGLcall("glDeleteBuffers(1, &surface->pbo)");
+ GL_EXTCALL(glDeleteBuffers(1, &surface->resource.buffer_object));
+ checkGLcall("glDeleteBuffers(1, &surface->resource.buffer_object)");
- surface->pbo = 0;
+ surface->resource.buffer_object = 0;
@ -102,16 +102,16 @@ index 6154315..4a2b636 100644
surface_remove_pbo(surface, gl_info);
/* Destroy fbo render buffers. This is needed for implicit render targets, for
@@ -2683,7 +2683,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2837,7 +2837,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
context = context_acquire(device, NULL);
gl_info = context->gl_info;
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.buffer_object));
base_memory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->resource.buffer_object));
base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("map PBO");
@@ -2774,7 +2774,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2928,7 +2928,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
if (!(surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY
|| surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM
@ -120,7 +120,7 @@ index 6154315..4a2b636 100644
surface->resource.map_binding = WINED3D_LOCATION_DIB;
}
@@ -3055,9 +3055,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
@@ -3209,9 +3209,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
/* Flip the PBO */
{
@ -133,7 +133,7 @@ index 6154315..4a2b636 100644
}
/* Flip the opengl texture */
@@ -4234,7 +4234,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4388,7 +4388,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* 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. */
@ -143,10 +143,10 @@ index 6154315..4a2b636 100644
TRACE("Removing the pbo attached to surface %p.\n", surface);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 9285ab8..8dbee1a 100644
index 8cce2d9..7efecd4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2310,8 +2310,6 @@ struct wined3d_surface
@@ -2324,8 +2324,6 @@ struct wined3d_surface
UINT pow2Width;
UINT pow2Height;
@ -156,5 +156,5 @@ index 9285ab8..8dbee1a 100644
GLuint rb_resolved;
GLenum texture_target;
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From f3a0af1c19472f9af90881b17ffe0352285b5d64 Mon Sep 17 00:00:00 2001
From 7e3863693c9694e35f3ae8e72011939fffe63690 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 13:30:59 +0100
Subject: wined3d: Use resource buffer mapping facilities in surfaces.
@ -9,10 +9,10 @@ Subject: wined3d: Use resource buffer mapping facilities in surfaces.
2 files changed, 23 insertions(+), 63 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index d904c36..c0e4d70 100644
index c907424..358a29e 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -430,6 +430,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
@@ -461,6 +461,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
case WINED3D_LOCATION_SYSMEM:
return resource->heap_memory;
@ -25,7 +25,7 @@ index d904c36..c0e4d70 100644
default:
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
return NULL;
@@ -452,6 +458,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -483,6 +489,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
return;
case WINED3D_LOCATION_SYSMEM:
@ -35,7 +35,7 @@ index d904c36..c0e4d70 100644
default:
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4a2b636..4be6a50 100644
index e534a9f..d720d26 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -716,36 +716,10 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
@ -61,10 +61,10 @@ index 4a2b636..4be6a50 100644
- context = context_acquire(device, NULL);
- gl_info = context->gl_info;
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.buffer_object));
- GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- checkGLcall("glUnmapBufferARB");
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->resource.buffer_object));
- GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("glUnmapBuffer");
- context_release(context);
- break;
-
@ -75,7 +75,7 @@ index 4a2b636..4be6a50 100644
if (surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB))
{
TRACE("Not dirtified, nothing to do.\n");
@@ -2579,6 +2553,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
@@ -2733,6 +2707,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
{
@ -84,7 +84,7 @@ index 4a2b636..4be6a50 100644
TRACE("surface %p.\n", surface);
if (!surface->resource.map_count)
@@ -2588,6 +2564,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
@@ -2742,6 +2718,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
}
--surface->resource.map_count;
@ -97,7 +97,7 @@ index 4a2b636..4be6a50 100644
surface->surface_ops->surface_unmap(surface);
return WINED3D_OK;
@@ -2598,8 +2580,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2752,8 +2734,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
const struct wined3d_format *format = surface->resource.format;
struct wined3d_device *device = surface->resource.device;
@ -107,7 +107,7 @@ index 4a2b636..4be6a50 100644
BYTE *base_memory;
TRACE("surface %p, map_desc %p, rect %s, flags %#x.\n",
@@ -2641,6 +2622,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2795,6 +2776,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
}
@ -117,7 +117,7 @@ index 4a2b636..4be6a50 100644
surface_prepare_map_memory(surface);
if (flags & WINED3D_MAP_DISCARD)
{
@@ -2650,51 +2634,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2804,51 +2788,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
else
{
@ -155,9 +155,9 @@ index 4a2b636..4be6a50 100644
- gl_info = context->gl_info;
+ base_memory = wined3d_resource_get_map_ptr(&surface->resource, context, flags);
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.buffer_object));
- base_memory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->resource.buffer_object));
- base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("map PBO");
-
- context_release(context);
@ -173,5 +173,5 @@ index 4a2b636..4be6a50 100644
if (format->flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From bd0eabcb62d243fc8ff0dd5fbe200caf9b1db1e1 Mon Sep 17 00:00:00 2001
From 6bbf121fadc87b21f96f54cdc573218ace005098 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 18 Sep 2013 22:49:34 +0200
Subject: wined3d: Move buffer creation into the resource.
@ -15,7 +15,7 @@ surface_load_location will write a lot of ERRs.
4 files changed, 72 insertions(+), 63 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index ea146d1..1760969 100644
index 358a29e..032371f 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -142,6 +142,18 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@ -28,8 +28,8 @@ index ea146d1..1760969 100644
+ const struct wined3d_gl_info *gl_info = context->gl_info;
+
+ TRACE("Deleting GL buffer %u belonging to resource %p.\n", resource->buffer_object, resource);
+ GL_EXTCALL(glDeleteBuffersARB(1, &resource->buffer_object));
+ checkGLcall("glDeleteBuffersARB");
+ GL_EXTCALL(glDeleteBuffers(1, &resource->buffer_object));
+ checkGLcall("glDeleteBuffers");
+ resource->buffer_object = 0;
+ context_release(context);
+}
@ -70,10 +70,10 @@ index ea146d1..1760969 100644
+ if (resource->buffer_object)
+ return;
+
+ GL_EXTCALL(glGenBuffersARB(1, &resource->buffer_object));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, resource->buffer_object));
+ GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, resource->size, NULL, GL_STREAM_DRAW_ARB));
+ GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+ GL_EXTCALL(glGenBuffers(1, &resource->buffer_object));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, resource->buffer_object));
+ GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, resource->size, NULL, GL_STREAM_DRAW));
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
+ checkGLcall("Create GL buffer");
+
+ TRACE("Created GL buffer %u for resource %p.\n", resource->buffer_object, resource);
@ -123,7 +123,7 @@ index 066219d..9981703 100644
TRACE("Enabling GL_UNPACK_CLIENT_STORAGE_APPLE for volume %p\n", volume);
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index c538e08..af2fbd1 100644
index db3a68c..8e72b17 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -312,42 +312,10 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
@ -138,10 +138,10 @@ index c538e08..af2fbd1 100644
- if (volume->resource.buffer_object)
- return;
-
- GL_EXTCALL(glGenBuffersARB(1, &volume->resource.buffer_object));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.buffer_object));
- GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.size, NULL, GL_STREAM_DRAW_ARB));
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- GL_EXTCALL(glGenBuffers(1, &volume->resource.buffer_object));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->resource.buffer_object));
- GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, volume->resource.size, NULL, GL_STREAM_DRAW));
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("Create PBO");
-
- TRACE("Created PBO %u for volume %p.\n", volume->resource.buffer_object, volume);
@ -153,8 +153,8 @@ index c538e08..af2fbd1 100644
- const struct wined3d_gl_info *gl_info = context->gl_info;
-
- TRACE("Deleting PBO %u belonging to volume %p.\n", volume->resource.buffer_object, volume);
- GL_EXTCALL(glDeleteBuffersARB(1, &volume->resource.buffer_object));
- checkGLcall("glDeleteBuffersARB");
- GL_EXTCALL(glDeleteBuffers(1, &volume->resource.buffer_object));
- checkGLcall("glDeleteBuffers");
- volume->resource.buffer_object = 0;
- context_release(context);
-}

View File

@ -1,4 +1,4 @@
From 94dbd1a23471584d1f837ebc10f071d0ea09f9cf Mon Sep 17 00:00:00 2001
From ee8e2567fab13b3f0f0d88d905d0fd8dc1cdb622 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 16:40:56 +0100
Subject: wined3d: Replace surface alloc functions with resource ones.
@ -11,10 +11,10 @@ Subject: wined3d: Replace surface alloc functions with resource ones.
4 files changed, 20 insertions(+), 87 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 0093c6a..59626f7 100644
index 78441e6..c6b3945 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -573,6 +573,16 @@ BOOL wined3d_resource_prepare_map_memory(struct wined3d_resource *resource, stru
@@ -601,6 +601,16 @@ BOOL wined3d_resource_prepare_map_memory(struct wined3d_resource *resource, stru
case WINED3D_LOCATION_SYSMEM:
return wined3d_resource_prepare_system_memory(resource);
@ -32,7 +32,7 @@ index 0093c6a..59626f7 100644
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
return FALSE;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b0f6ec9..85b1fd6 100644
index c65a723..48de325 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -479,81 +479,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@ -51,22 +51,22 @@ index b0f6ec9..85b1fd6 100644
- context = context_acquire(surface->resource.device, NULL);
- gl_info = context->gl_info;
-
- GL_EXTCALL(glGenBuffersARB(1, &surface->resource.buffer_object));
- GL_EXTCALL(glGenBuffers(1, &surface->resource.buffer_object));
- error = gl_info->gl_ops.gl.p_glGetError();
- if (!surface->resource.buffer_object || error != GL_NO_ERROR)
- ERR("Failed to create a PBO with error %s (%#x).\n", debug_glerror(error), error);
-
- TRACE("Binding PBO %u.\n", surface->resource.buffer_object);
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.buffer_object));
- checkGLcall("glBindBufferARB");
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->resource.buffer_object));
- checkGLcall("glBindBuffer");
-
- GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.size + 4,
- NULL, GL_STREAM_DRAW_ARB));
- checkGLcall("glBufferDataARB");
- GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, surface->resource.size + 4,
- NULL, GL_STREAM_DRAW));
- checkGLcall("glBufferData");
-
- GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
- checkGLcall("glBindBufferARB");
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
- checkGLcall("glBindBuffer");
-
- context_release(context);
-}
@ -144,7 +144,7 @@ index b0f6ec9..85b1fd6 100644
valid_location = WINED3D_LOCATION_SYSMEM;
}
@@ -2712,7 +2637,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2721,7 +2646,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (device->d3d_initialized)
context = context_acquire(device, NULL);
@ -153,7 +153,7 @@ index b0f6ec9..85b1fd6 100644
if (flags & WINED3D_MAP_DISCARD)
{
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
@@ -4242,7 +4167,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4251,7 +4176,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
/* Performance warning... */
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
@ -162,7 +162,7 @@ index b0f6ec9..85b1fd6 100644
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
}
}
@@ -4253,7 +4178,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4262,7 +4187,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
/* Performance warning... */
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
@ -171,7 +171,7 @@ index b0f6ec9..85b1fd6 100644
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
}
}
@@ -4262,7 +4187,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4271,7 +4196,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@ -180,7 +180,7 @@ index b0f6ec9..85b1fd6 100644
wined3d_resource_load_location(&surface->resource, context, WINED3D_LOCATION_SYSMEM);
}
@@ -4295,7 +4220,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4304,7 +4229,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
else
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
@ -190,7 +190,7 @@ index b0f6ec9..85b1fd6 100644
surface_remove_pbo(surface, gl_info);
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 0c3fe95..06a041c 100644
index aee50f6..869c44f 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -851,8 +851,8 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
@ -203,7 +203,7 @@ index 0c3fe95..06a041c 100644
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
context_release(context);
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
@@ -966,8 +966,7 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
@@ -964,8 +964,7 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
}
else
{
@ -214,10 +214,10 @@ index 0c3fe95..06a041c 100644
surface->flags |= SFLAG_CLIENT;
mem = surface->resource.heap_memory;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7ea1374..b9d77f3 100644
index e32d650..beaf9bc 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2395,7 +2395,6 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
@@ -2394,7 +2394,6 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@ -226,5 +226,5 @@ index 7ea1374..b9d77f3 100644
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 900dc644b944426cf580aa03f236043322a1ac20 Mon Sep 17 00:00:00 2001
From 408f3f44631f7d3b32e936129e380992c5396094 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 16:41:33 +0100
Subject: wined3d: Don't delete the buffer in surface_cleanup.
@ -8,7 +8,7 @@ Subject: wined3d: Don't delete the buffer in surface_cleanup.
1 file changed, 6 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4c2a759..7d2d1ea 100644
index 48de325..e5edd34 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -56,12 +56,6 @@ static void surface_cleanup(struct wined3d_surface *surface)
@ -18,12 +18,12 @@ index 4c2a759..7d2d1ea 100644
- if (surface->resource.buffer_object)
- {
- TRACE("Deleting PBO %u.\n", surface->resource.buffer_object);
- GL_EXTCALL(glDeleteBuffersARB(1, &surface->resource.buffer_object));
- GL_EXTCALL(glDeleteBuffers(1, &surface->resource.buffer_object));
- }
-
if (surface->rb_multisample)
{
TRACE("Deleting multisample renderbuffer %u.\n", surface->rb_multisample);
--
2.1.3
2.2.1

Some files were not shown because too many files have changed in this diff Show More