mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against cfbc37c699e3b3b27df4c566014e6dde9c7194b8.
This commit is contained in:
parent
c0bdcaecf5
commit
3e9b40f5b6
10
README.md
10
README.md
@ -39,16 +39,14 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [12]:**
|
||||
**Bug fixes and features included in the next upcoming release [10]:**
|
||||
|
||||
* Add IDragSourceHelper stub interface ([Wine Bug #24699](https://bugs.winehq.org/show_bug.cgi?id=24699))
|
||||
* Catch invalid memory accesses in imagehlp.CheckSumMappedFile
|
||||
* Fix detection of case-insensitive systems in MSYS2
|
||||
* Fix implementation of ntdll.MapViewOfSection
|
||||
* Implement enumeration of sound devices and basic properties to dxdiagn ([Wine Bug #32613](https://bugs.winehq.org/show_bug.cgi?id=32613))
|
||||
* Implement shell32 NewMenu class with new folder item ([Wine Bug #24812](https://bugs.winehq.org/show_bug.cgi?id=24812))
|
||||
* Implement special handling for calling GetChildContainer with an empty string ([Wine Bug #38014](https://bugs.winehq.org/show_bug.cgi?id=38014))
|
||||
* Implement vcomp locking functions ([Wine Bug #26688](https://bugs.winehq.org/show_bug.cgi?id=26688))
|
||||
* Improve startup performance by delaying font initialization
|
||||
* Only set SFGAO_HASSUBFOLDER when there are really subfolders ([Wine Bug #24851](https://bugs.winehq.org/show_bug.cgi?id=24851))
|
||||
* Properly implement imagehlp.ImageLoad and ImageUnload
|
||||
@ -199,7 +197,7 @@ for more details.*
|
||||
* Implement proper handling of CLI .NET images in Wine library loader ([Wine Bug #38661](https://bugs.winehq.org/show_bug.cgi?id=38661))
|
||||
* Implement stub for ntoskrnl.IoGetAttachedDeviceReference
|
||||
* Implement stub for ntoskrnl.KeDelayExecutionThread.
|
||||
* Implement stub for vcomp._vcomp_flush ([Wine Bug #39058](https://bugs.winehq.org/show_bug.cgi?id=39058))
|
||||
* ~~Implement stub for vcomp._vcomp_flush~~ ([Wine Bug #39058](https://bugs.winehq.org/show_bug.cgi?id=39058))
|
||||
* Implement stubs for ntoskrnl.Ex{Acquire,Release}FastMutexUnsafe
|
||||
* Implement stubs for ntoskrnl.ObReferenceObjectByPointer and ntoskrnl.ObDereferenceObject
|
||||
* Improve ReadDataAvailable handling in FilePipeLocalInformation class
|
||||
@ -243,7 +241,7 @@ for more details.*
|
||||
* Silence repeated wbemprox "timeout not supported" fixme ([Wine Bug #37618](https://bugs.winehq.org/show_bug.cgi?id=37618))
|
||||
* Skip unknown item when decoding a CMS certificate ([Wine Bug #34388](https://bugs.winehq.org/show_bug.cgi?id=34388))
|
||||
* Software support for Environmental Audio Extensions (EAX)
|
||||
* Store registry timestamps with nanoseconds precision ([Wine Bug #38927](https://bugs.winehq.org/show_bug.cgi?id=38927))
|
||||
* ~~Store registry timestamps with nanoseconds precision~~ ([Wine Bug #38927](https://bugs.winehq.org/show_bug.cgi?id=38927))
|
||||
* Super Mario 3: Mario Forever fails to load keyboard mapping from profile files. ([Wine Bug #18099](https://bugs.winehq.org/show_bug.cgi?id=18099))
|
||||
* Support for AllocateAndGetTcpExTableFromStack ([Wine Bug #34372](https://bugs.winehq.org/show_bug.cgi?id=34372))
|
||||
* Support for BindImageEx ([Wine Bug #3591](https://bugs.winehq.org/show_bug.cgi?id=3591))
|
||||
@ -293,7 +291,7 @@ for more details.*
|
||||
* Use video memory for rendering targets if possible ([Wine Bug #34906](https://bugs.winehq.org/show_bug.cgi?id=34906))
|
||||
* Voobly expects correct handling of WRITECOPY memory protection ([Wine Bug #29384](https://bugs.winehq.org/show_bug.cgi?id=29384))
|
||||
* Wine ignores IDF_CHECKFIRST flag in SetupPromptForDisk ([Wine Bug #20465](https://bugs.winehq.org/show_bug.cgi?id=20465))
|
||||
* Winhttp raw request headers must be terminated using double \r\n ([Wine Bug #35953](https://bugs.winehq.org/show_bug.cgi?id=35953))
|
||||
* ~~Winhttp raw request headers must be terminated using double \r\n~~ ([Wine Bug #35953](https://bugs.winehq.org/show_bug.cgi?id=35953))
|
||||
* Workaround for shlwapi URLs with relative paths
|
||||
* XEMBED support for embedding Wine windows inside Linux applications
|
||||
* eRacer Demo doesn't correctly display text ([Wine Bug #29598](https://bugs.winehq.org/show_bug.cgi?id=29598))
|
||||
|
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -20,6 +20,13 @@ wine-staging (1.7.50) UNRELEASED; urgency=low
|
||||
* Removed patches for stub of D3DCompileFromFile and D3DCompile2 (accepted
|
||||
upstream).
|
||||
* Removed patch to fix multiple uninitialized memory issues in wineserver.
|
||||
* Removed patch fix implementation of ntdll.NtMapViewOfSection (accepted
|
||||
upstream).
|
||||
* Removed patches to implement additional vcomp functions (accepted upstream).
|
||||
* Removed patch to store registry timestamps with nanoseconds precision (fixed
|
||||
upstream).
|
||||
* Removed patch to ensure winhttp raw request headers are terminated with
|
||||
double \r\n (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Tue, 11 Aug 2015 06:12:14 +0200
|
||||
|
||||
wine-staging (1.7.49) unstable; urgency=low
|
||||
|
@ -1,222 +0,0 @@
|
||||
From 115e90057158cd7e6a40ee174d1480901cf540f4 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 11 Aug 2015 07:03:49 +0200
|
||||
Subject: ntdll: Separate image relocation from NtMapViewOfSection. (v3)
|
||||
|
||||
Changes in v2 by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
* Don't pass a NULL pointer to NtProtectVirtualMemory.
|
||||
* Check against mapped size instead of header field.
|
||||
|
||||
Changes in v3 by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
* Add missing check for non-aligned PE binaries.
|
||||
---
|
||||
dlls/kernel32/tests/loader.c | 10 -----
|
||||
dlls/ntdll/loader.c | 87 +++++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ntdll/virtual.c | 44 +---------------------
|
||||
3 files changed, 87 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 89feeb9..25b7b08 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -799,15 +799,6 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL
|
||||
size = 0;
|
||||
status = pNtMapViewOfSection(hmap, GetCurrentProcess(), &addr2, 0, 0, &offset,
|
||||
&size, 1 /* ViewShare */, 0, PAGE_READONLY);
|
||||
- /* FIXME: remove once Wine is fixed */
|
||||
- if (status != STATUS_IMAGE_NOT_AT_BASE)
|
||||
- {
|
||||
- todo_wine {
|
||||
- ok(status == STATUS_IMAGE_NOT_AT_BASE, "expected STATUS_IMAGE_NOT_AT_BASE, got %x\n", status);
|
||||
- ok(addr2 != 0, "mapped address should be valid\n");
|
||||
- }
|
||||
- goto wine_is_broken;
|
||||
- }
|
||||
ok(status == STATUS_IMAGE_NOT_AT_BASE, "expected STATUS_IMAGE_NOT_AT_BASE, got %x\n", status);
|
||||
ok(addr2 != 0, "mapped address should be valid\n");
|
||||
ok(addr2 != addr1, "mapped addresses should be different\n");
|
||||
@@ -861,7 +852,6 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL
|
||||
ok(ret, "FreeLibrary error %d\n", GetLastError());
|
||||
}
|
||||
|
||||
-wine_is_broken:
|
||||
status = pNtUnmapViewOfSection(GetCurrentProcess(), addr1);
|
||||
ok(status == STATUS_SUCCESS, "NtUnmapViewOfSection error %x\n", status);
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index fb7b171..63451a0 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -1656,6 +1656,81 @@ static void set_security_cookie( void *module, SIZE_T len )
|
||||
}
|
||||
}
|
||||
|
||||
+static NTSTATUS perform_relocations( void *module, SIZE_T len )
|
||||
+{
|
||||
+ IMAGE_NT_HEADERS *nt;
|
||||
+ char *base;
|
||||
+ IMAGE_BASE_RELOCATION *rel, *end;
|
||||
+ const IMAGE_DATA_DIRECTORY *relocs;
|
||||
+ const IMAGE_SECTION_HEADER *sec;
|
||||
+ INT_PTR delta;
|
||||
+ ULONG protect_old[96], i;
|
||||
+
|
||||
+ nt = RtlImageNtHeader( module );
|
||||
+ base = (char *)nt->OptionalHeader.ImageBase;
|
||||
+
|
||||
+ assert( module != base );
|
||||
+
|
||||
+ /* no relocations are performed on non page-aligned binaries */
|
||||
+ if (nt->OptionalHeader.SectionAlignment < page_size)
|
||||
+ return STATUS_SUCCESS;
|
||||
+
|
||||
+ if (!(nt->FileHeader.Characteristics & IMAGE_FILE_DLL) && NtCurrentTeb()->Peb->ImageBaseAddress)
|
||||
+ return STATUS_SUCCESS;
|
||||
+
|
||||
+ relocs = &nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
|
||||
+
|
||||
+ if ((nt->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED) ||
|
||||
+ !relocs->VirtualAddress || !relocs->Size)
|
||||
+ {
|
||||
+ WARN( "Need to relocate module from %p to %p, but there are no relocation records\n",
|
||||
+ base, module );
|
||||
+ return STATUS_CONFLICTING_ADDRESSES;
|
||||
+ }
|
||||
+
|
||||
+ if (nt->FileHeader.NumberOfSections > sizeof(protect_old)/sizeof(protect_old[0]))
|
||||
+ return STATUS_INVALID_IMAGE_FORMAT;
|
||||
+
|
||||
+ sec = (const IMAGE_SECTION_HEADER *)((const char *)&nt->OptionalHeader +
|
||||
+ nt->FileHeader.SizeOfOptionalHeader);
|
||||
+ for (i = 0; i < nt->FileHeader.NumberOfSections; i++)
|
||||
+ {
|
||||
+ void *addr = get_rva( module, sec[i].VirtualAddress );
|
||||
+ SIZE_T size = sec[i].SizeOfRawData;
|
||||
+ NtProtectVirtualMemory( NtCurrentProcess(), &addr,
|
||||
+ &size, PAGE_READWRITE, &protect_old[i] );
|
||||
+ }
|
||||
+
|
||||
+ TRACE( "relocating from %p-%p to %p-%p\n",
|
||||
+ base, base + len, module, (char *)module + len );
|
||||
+
|
||||
+ rel = get_rva( module, relocs->VirtualAddress );
|
||||
+ end = get_rva( module, relocs->VirtualAddress + relocs->Size );
|
||||
+ delta = (char *)module - base;
|
||||
+
|
||||
+ while (rel < end - 1 && rel->SizeOfBlock)
|
||||
+ {
|
||||
+ if (rel->VirtualAddress >= len)
|
||||
+ {
|
||||
+ WARN( "invalid address %p in relocation %p\n", get_rva( module, rel->VirtualAddress ), rel );
|
||||
+ return STATUS_ACCESS_VIOLATION;
|
||||
+ }
|
||||
+ rel = LdrProcessRelocationBlock( get_rva( module, rel->VirtualAddress ),
|
||||
+ (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT),
|
||||
+ (USHORT *)(rel + 1), delta );
|
||||
+ if (!rel) return STATUS_INVALID_IMAGE_FORMAT;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < nt->FileHeader.NumberOfSections; i++)
|
||||
+ {
|
||||
+ void *addr = get_rva( module, sec[i].VirtualAddress );
|
||||
+ SIZE_T size = sec[i].SizeOfRawData;
|
||||
+ NtProtectVirtualMemory( NtCurrentProcess(), &addr,
|
||||
+ &size, protect_old[i], &protect_old[i] );
|
||||
+ }
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
|
||||
/******************************************************************************
|
||||
* load_native_dll (internal)
|
||||
@@ -1681,7 +1756,17 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
|
||||
module = NULL;
|
||||
status = NtMapViewOfSection( mapping, NtCurrentProcess(),
|
||||
&module, 0, 0, &size, &len, ViewShare, 0, PAGE_EXECUTE_READ );
|
||||
- if (status < 0) goto done;
|
||||
+
|
||||
+ /* perform base relocation, if necessary */
|
||||
+
|
||||
+ if (status == STATUS_IMAGE_NOT_AT_BASE)
|
||||
+ status = perform_relocations( module, len );
|
||||
+
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ {
|
||||
+ if (module) NtUnmapViewOfSection( NtCurrentProcess(), module );
|
||||
+ goto done;
|
||||
+ }
|
||||
|
||||
/* create the MODREF */
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index fe17518..4d4bc3b 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -1073,7 +1073,6 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
|
||||
struct stat st;
|
||||
struct file_view *view = NULL;
|
||||
char *ptr, *header_end, *header_start;
|
||||
- INT_PTR delta = 0;
|
||||
|
||||
/* zero-map the whole range */
|
||||
|
||||
@@ -1236,47 +1235,6 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
- /* perform base relocation, if necessary */
|
||||
-
|
||||
- if (ptr != base &&
|
||||
- ((nt->FileHeader.Characteristics & IMAGE_FILE_DLL) ||
|
||||
- !NtCurrentTeb()->Peb->ImageBaseAddress) )
|
||||
- {
|
||||
- IMAGE_BASE_RELOCATION *rel, *end;
|
||||
- const IMAGE_DATA_DIRECTORY *relocs;
|
||||
-
|
||||
- if (nt->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)
|
||||
- {
|
||||
- WARN_(module)( "Need to relocate module from %p to %p, but there are no relocation records\n",
|
||||
- base, ptr );
|
||||
- status = STATUS_CONFLICTING_ADDRESSES;
|
||||
- goto error;
|
||||
- }
|
||||
-
|
||||
- TRACE_(module)( "relocating from %p-%p to %p-%p\n",
|
||||
- base, base + total_size, ptr, ptr + total_size );
|
||||
-
|
||||
- relocs = &nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
|
||||
- rel = (IMAGE_BASE_RELOCATION *)(ptr + relocs->VirtualAddress);
|
||||
- end = (IMAGE_BASE_RELOCATION *)(ptr + relocs->VirtualAddress + relocs->Size);
|
||||
- delta = ptr - base;
|
||||
-
|
||||
- while (rel < end - 1 && rel->SizeOfBlock)
|
||||
- {
|
||||
- if (rel->VirtualAddress >= total_size)
|
||||
- {
|
||||
- WARN_(module)( "invalid address %p in relocation %p\n", ptr + rel->VirtualAddress, rel );
|
||||
- status = STATUS_ACCESS_VIOLATION;
|
||||
- goto error;
|
||||
- }
|
||||
- rel = LdrProcessRelocationBlock( ptr + rel->VirtualAddress,
|
||||
- (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT),
|
||||
- (USHORT *)(rel + 1), delta );
|
||||
- if (!rel) goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
/* set the image protections */
|
||||
|
||||
VIRTUAL_SetProt( view, ptr, ROUND_SIZE( 0, header_size ), VPROT_COMMITTED | VPROT_READ );
|
||||
@@ -1313,7 +1271,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
|
||||
|
||||
*addr_ptr = ptr;
|
||||
#ifdef VALGRIND_LOAD_PDB_DEBUGINFO
|
||||
- VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, delta);
|
||||
+ VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, ptr - base);
|
||||
#endif
|
||||
if (ptr != base) return STATUS_IMAGE_NOT_AT_BASE;
|
||||
return STATUS_SUCCESS;
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Fix implementation of ntdll.MapViewOfSection
|
@ -55,7 +55,7 @@ version()
|
||||
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
echo " commit bd7f43d7e8fca5cab20120b3819bfd5491436b72"
|
||||
echo " commit cfbc37c699e3b3b27df4c566014e6dde9c7194b8"
|
||||
echo ""
|
||||
}
|
||||
|
||||
@ -175,7 +175,6 @@ patch_enable_all ()
|
||||
enable_ntdll_Hide_Wine_Exports="$1"
|
||||
enable_ntdll_Junction_Points="$1"
|
||||
enable_ntdll_Loader_Machine_Type="$1"
|
||||
enable_ntdll_NtMapViewOfSection="$1"
|
||||
enable_ntdll_NtQueryEaFile="$1"
|
||||
enable_ntdll_NtQuerySection="$1"
|
||||
enable_ntdll_NtSetLdtEntries="$1"
|
||||
@ -217,7 +216,6 @@ patch_enable_all ()
|
||||
enable_server_PeekMessage="$1"
|
||||
enable_server_Pipe_ObjectName="$1"
|
||||
enable_server_Realtime_Priority="$1"
|
||||
enable_server_Registry_Timestamp="$1"
|
||||
enable_server_RootDirectory_File="$1"
|
||||
enable_server_Shared_Memory="$1"
|
||||
enable_server_Stored_ACLs="$1"
|
||||
@ -250,7 +248,6 @@ patch_enable_all ()
|
||||
enable_user32_ScrollWindowEx="$1"
|
||||
enable_user32_WndProc="$1"
|
||||
enable_uxtheme_GTK_Theming="$1"
|
||||
enable_vcomp_Functions="$1"
|
||||
enable_version_VerQueryValue="$1"
|
||||
enable_wbemdisp_ISWbemSecurity="$1"
|
||||
enable_wbemdisp_Timeout="$1"
|
||||
@ -285,7 +282,6 @@ patch_enable_all ()
|
||||
enable_winex11_Window_Style="$1"
|
||||
enable_winex11_XEMBED="$1"
|
||||
enable_winex11_wglShareLists="$1"
|
||||
enable_winhttp_Request_Headers="$1"
|
||||
enable_winhttp_System_Proxy_Autoconfig="$1"
|
||||
enable_wininet_Cleanup="$1"
|
||||
enable_wininet_Internet_Settings="$1"
|
||||
@ -616,9 +612,6 @@ patch_enable ()
|
||||
ntdll-Loader_Machine_Type)
|
||||
enable_ntdll_Loader_Machine_Type="$2"
|
||||
;;
|
||||
ntdll-NtMapViewOfSection)
|
||||
enable_ntdll_NtMapViewOfSection="$2"
|
||||
;;
|
||||
ntdll-NtQueryEaFile)
|
||||
enable_ntdll_NtQueryEaFile="$2"
|
||||
;;
|
||||
@ -742,9 +735,6 @@ patch_enable ()
|
||||
server-Realtime_Priority)
|
||||
enable_server_Realtime_Priority="$2"
|
||||
;;
|
||||
server-Registry_Timestamp)
|
||||
enable_server_Registry_Timestamp="$2"
|
||||
;;
|
||||
server-RootDirectory_File)
|
||||
enable_server_RootDirectory_File="$2"
|
||||
;;
|
||||
@ -841,9 +831,6 @@ patch_enable ()
|
||||
uxtheme-GTK_Theming)
|
||||
enable_uxtheme_GTK_Theming="$2"
|
||||
;;
|
||||
vcomp-Functions)
|
||||
enable_vcomp_Functions="$2"
|
||||
;;
|
||||
version-VerQueryValue)
|
||||
enable_version_VerQueryValue="$2"
|
||||
;;
|
||||
@ -946,9 +933,6 @@ patch_enable ()
|
||||
winex11-wglShareLists)
|
||||
enable_winex11_wglShareLists="$2"
|
||||
;;
|
||||
winhttp-Request_Headers)
|
||||
enable_winhttp_Request_Headers="$2"
|
||||
;;
|
||||
winhttp-System_Proxy_Autoconfig)
|
||||
enable_winhttp_System_Proxy_Autoconfig="$2"
|
||||
;;
|
||||
@ -3875,18 +3859,6 @@ if test "$enable_ntdll_Junction_Points" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtMapViewOfSection
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/tests/loader.c, dlls/ntdll/loader.c, dlls/ntdll/virtual.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtMapViewOfSection" -eq 1; then
|
||||
patch_apply ntdll-NtMapViewOfSection/0001-ntdll-Separate-image-relocation-from-NtMapViewOfSect.patch
|
||||
(
|
||||
echo '+ { "Dmitry Timoshkov", "ntdll: Separate image relocation from NtMapViewOfSection.", 3 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtQuerySection
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -4578,21 +4550,6 @@ if test "$enable_server_Realtime_Priority" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset server-Registry_Timestamp
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38927] Store registry timestamps with nanoseconds precision
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * server/registry.c
|
||||
# |
|
||||
if test "$enable_server_Registry_Timestamp" -eq 1; then
|
||||
patch_apply server-Registry_Timestamp/0001-server-Increase-precision-when-saving-loading-regist.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "server: Increase precision when saving / loading registry modification date.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset server-Shared_Memory
|
||||
# |
|
||||
# | This patchset has the following dependencies:
|
||||
@ -5068,33 +5025,6 @@ if test "$enable_uxtheme_GTK_Theming" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset vcomp-Functions
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#39058] Implement stub for vcomp._vcomp_flush
|
||||
# | * [#26688] Implement vcomp locking functions
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/vcomp/main.c, dlls/vcomp/tests/vcomp.c, dlls/vcomp/vcomp.spec, dlls/vcomp100/vcomp100.spec,
|
||||
# | dlls/vcomp110/vcomp110.spec, dlls/vcomp90/vcomp90.spec
|
||||
# |
|
||||
if test "$enable_vcomp_Functions" -eq 1; then
|
||||
patch_apply vcomp-Functions/0001-vcomp-Implement-_vcomp_flush-and-add-tests.patch
|
||||
patch_apply vcomp-Functions/0002-vcomp-Implement-omp_init_lock-and-omp_destroy_lock.patch
|
||||
patch_apply vcomp-Functions/0003-vcomp-Export-omp_init_nest_lock-and-omp_destroy_nest.patch
|
||||
patch_apply vcomp-Functions/0004-vcomp-Implement-OpenMP-nested-locking-functions.patch
|
||||
patch_apply vcomp-Functions/0005-vcomp-Implement-OpenMP-regular-locking-functions.patch
|
||||
patch_apply vcomp-Functions/0006-vcomp-tests-Add-tests-for-function-pointers-of-remai.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "vcomp: Implement _vcomp_flush and add tests.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "vcomp: Implement omp_init_lock and omp_destroy_lock.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "vcomp: Export omp_init_nest_lock and omp_destroy_nest_lock.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "vcomp: Implement OpenMP nested locking functions.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "vcomp: Implement OpenMP regular locking functions.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "vcomp/tests: Add tests for function pointers of remaining lock functions.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset version-VerQueryValue
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5994,21 +5924,6 @@ if test "$enable_winex11_wglShareLists" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winhttp-Request_Headers
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35953] Winhttp raw request headers must be terminated using double \r\n
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winhttp/request.c, dlls/winhttp/tests/winhttp.c
|
||||
# |
|
||||
if test "$enable_winhttp_Request_Headers" -eq 1; then
|
||||
patch_apply winhttp-Request_Headers/0001-winhttp-Raw-request-headers-needs-to-be-terminated-u.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "winhttp: Raw request headers needs to be terminated using double \\\\r\\\\n.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winhttp-System_Proxy_Autoconfig
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 0cbf2798faf44d394601702bbfe97c7804c623d4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 28 Jul 2015 17:46:13 +0200
|
||||
Subject: server: Increase precision when saving / loading registry
|
||||
modification date
|
||||
|
||||
---
|
||||
server/registry.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index 43527df..68862a1 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -264,7 +264,8 @@ static void save_subkeys( const struct key *key, const struct key *base, FILE *f
|
||||
{
|
||||
fprintf( f, "\n[" );
|
||||
if (key != base) dump_path( key, base, f );
|
||||
- fprintf( f, "] %u\n", (unsigned int)((key->modif - ticks_1601_to_1970) / TICKS_PER_SEC) );
|
||||
+ fprintf( f, "] %u %u\n", (unsigned int)((key->modif - ticks_1601_to_1970) / TICKS_PER_SEC),
|
||||
+ (unsigned int)((key->modif - ticks_1601_to_1970) % TICKS_PER_SEC) );
|
||||
if (key->class)
|
||||
{
|
||||
fprintf( f, "#class=\"" );
|
||||
@@ -1346,8 +1347,8 @@ static struct key *load_key( struct key *base, const char *buffer,
|
||||
{
|
||||
WCHAR *p;
|
||||
struct unicode_str name;
|
||||
- int res;
|
||||
- unsigned int mod;
|
||||
+ int res, num_items;
|
||||
+ unsigned int mod, mod_ticks;
|
||||
timeout_t modif = current_time;
|
||||
data_size_t len;
|
||||
|
||||
@@ -1359,8 +1360,9 @@ static struct key *load_key( struct key *base, const char *buffer,
|
||||
file_read_error( "Malformed key", info );
|
||||
return NULL;
|
||||
}
|
||||
- if (sscanf( buffer + res, " %u", &mod ) == 1)
|
||||
- modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
|
||||
+ num_items = sscanf( buffer + res, " %u %u", &mod, &mod_ticks );
|
||||
+ if (num_items >= 1) modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
|
||||
+ if (num_items >= 2) modif += mod_ticks;
|
||||
|
||||
p = info->tmp;
|
||||
while (prefix_len && *p) { if (*p++ == '\\') prefix_len--; }
|
||||
--
|
||||
2.4.5
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [38927] Store registry timestamps with nanoseconds precision
|
@ -1,128 +0,0 @@
|
||||
From 7f7a6eb2828e1400e298e7a2a315c81b04cfb2b1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 7 Aug 2015 23:22:28 +0200
|
||||
Subject: vcomp: Implement _vcomp_flush and add tests.
|
||||
|
||||
---
|
||||
dlls/vcomp/main.c | 6 ++++++
|
||||
dlls/vcomp/tests/vcomp.c | 10 ++++++++++
|
||||
dlls/vcomp/vcomp.spec | 2 +-
|
||||
dlls/vcomp100/vcomp100.spec | 2 +-
|
||||
dlls/vcomp110/vcomp110.spec | 2 +-
|
||||
dlls/vcomp90/vcomp90.spec | 2 +-
|
||||
6 files changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
|
||||
index 10ac465..0f733a9 100644
|
||||
--- a/dlls/vcomp/main.c
|
||||
+++ b/dlls/vcomp/main.c
|
||||
@@ -465,6 +465,12 @@ void CDECL omp_set_num_threads(int num_threads)
|
||||
vcomp_num_threads = num_threads;
|
||||
}
|
||||
|
||||
+void CDECL _vcomp_flush(void)
|
||||
+{
|
||||
+ TRACE("(): stub\n");
|
||||
+ /* FIXME: What kind of memory barrier is this? */
|
||||
+}
|
||||
+
|
||||
void CDECL _vcomp_barrier(void)
|
||||
{
|
||||
struct vcomp_team_data *team_data = vcomp_init_thread_data()->team;
|
||||
diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c
|
||||
index f24c654..3df547a 100644
|
||||
--- a/dlls/vcomp/tests/vcomp.c
|
||||
+++ b/dlls/vcomp/tests/vcomp.c
|
||||
@@ -52,6 +52,7 @@ static void (CDECL *p_vcomp_atomic_sub_r8)(double *dest, double val);
|
||||
static void (CDECL *p_vcomp_atomic_xor_i4)(int *dest, int val);
|
||||
static void (CDECL *p_vcomp_barrier)(void);
|
||||
static void (CDECL *p_vcomp_enter_critsect)(CRITICAL_SECTION **critsect);
|
||||
+static void (CDECL *p_vcomp_flush)(void);
|
||||
static void (CDECL *p_vcomp_for_dynamic_init)(unsigned int flags, unsigned int first, unsigned int last,
|
||||
int step, unsigned int chunksize);
|
||||
static int (CDECL *p_vcomp_for_dynamic_next)(unsigned int *begin, unsigned int *end);
|
||||
@@ -229,6 +230,7 @@ static BOOL init_vcomp(void)
|
||||
VCOMP_GET_PROC(_vcomp_atomic_xor_i4);
|
||||
VCOMP_GET_PROC(_vcomp_barrier);
|
||||
VCOMP_GET_PROC(_vcomp_enter_critsect);
|
||||
+ VCOMP_GET_PROC(_vcomp_flush);
|
||||
VCOMP_GET_PROC(_vcomp_for_dynamic_init);
|
||||
VCOMP_GET_PROC(_vcomp_for_dynamic_next);
|
||||
VCOMP_GET_PROC(_vcomp_for_static_end);
|
||||
@@ -1269,6 +1271,13 @@ static void test_vcomp_enter_critsect(void)
|
||||
pomp_set_num_threads(max_threads);
|
||||
}
|
||||
|
||||
+static void test_vcomp_flush(void)
|
||||
+{
|
||||
+ p_vcomp_flush();
|
||||
+ p_vcomp_flush();
|
||||
+ p_vcomp_flush();
|
||||
+}
|
||||
+
|
||||
static void test_atomic_integer32(void)
|
||||
{
|
||||
struct
|
||||
@@ -1388,6 +1397,7 @@ START_TEST(vcomp)
|
||||
test_vcomp_master_begin();
|
||||
test_vcomp_single_begin();
|
||||
test_vcomp_enter_critsect();
|
||||
+ test_vcomp_flush();
|
||||
test_atomic_integer32();
|
||||
test_atomic_float();
|
||||
test_atomic_double();
|
||||
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
|
||||
index 55b699f..40110d2 100644
|
||||
--- a/dlls/vcomp/vcomp.spec
|
||||
+++ b/dlls/vcomp/vcomp.spec
|
||||
@@ -54,7 +54,7 @@
|
||||
@ stub _vcomp_copyprivate_broadcast
|
||||
@ stub _vcomp_copyprivate_receive
|
||||
@ cdecl _vcomp_enter_critsect(ptr)
|
||||
-@ stub _vcomp_flush
|
||||
+@ cdecl _vcomp_flush()
|
||||
@ cdecl _vcomp_for_dynamic_init(long long long long long)
|
||||
@ stub _vcomp_for_dynamic_init_i8
|
||||
@ cdecl _vcomp_for_dynamic_next(ptr ptr)
|
||||
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
|
||||
index 7bf6238..1974f7e 100644
|
||||
--- a/dlls/vcomp100/vcomp100.spec
|
||||
+++ b/dlls/vcomp100/vcomp100.spec
|
||||
@@ -54,7 +54,7 @@
|
||||
@ stub _vcomp_copyprivate_broadcast
|
||||
@ stub _vcomp_copyprivate_receive
|
||||
@ cdecl _vcomp_enter_critsect(ptr) vcomp._vcomp_enter_critsect
|
||||
-@ stub _vcomp_flush
|
||||
+@ cdecl _vcomp_flush() vcomp._vcomp_flush
|
||||
@ cdecl _vcomp_for_dynamic_init(long long long long long) vcomp._vcomp_for_dynamic_init
|
||||
@ stub _vcomp_for_dynamic_init_i8
|
||||
@ cdecl _vcomp_for_dynamic_next(ptr ptr) vcomp._vcomp_for_dynamic_next
|
||||
diff --git a/dlls/vcomp110/vcomp110.spec b/dlls/vcomp110/vcomp110.spec
|
||||
index c84e44c..d1b27ed 100644
|
||||
--- a/dlls/vcomp110/vcomp110.spec
|
||||
+++ b/dlls/vcomp110/vcomp110.spec
|
||||
@@ -55,7 +55,7 @@
|
||||
@ stub _vcomp_copyprivate_broadcast
|
||||
@ stub _vcomp_copyprivate_receive
|
||||
@ cdecl _vcomp_enter_critsect(ptr) vcomp._vcomp_enter_critsect
|
||||
-@ stub _vcomp_flush
|
||||
+@ cdecl _vcomp_flush() vcomp._vcomp_flush
|
||||
@ cdecl _vcomp_for_dynamic_init(long long long long long) vcomp._vcomp_for_dynamic_init
|
||||
@ stub _vcomp_for_dynamic_init_i8
|
||||
@ cdecl _vcomp_for_dynamic_next(ptr ptr) vcomp._vcomp_for_dynamic_next
|
||||
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
|
||||
index 7bf6238..1974f7e 100644
|
||||
--- a/dlls/vcomp90/vcomp90.spec
|
||||
+++ b/dlls/vcomp90/vcomp90.spec
|
||||
@@ -54,7 +54,7 @@
|
||||
@ stub _vcomp_copyprivate_broadcast
|
||||
@ stub _vcomp_copyprivate_receive
|
||||
@ cdecl _vcomp_enter_critsect(ptr) vcomp._vcomp_enter_critsect
|
||||
-@ stub _vcomp_flush
|
||||
+@ cdecl _vcomp_flush() vcomp._vcomp_flush
|
||||
@ cdecl _vcomp_for_dynamic_init(long long long long long) vcomp._vcomp_for_dynamic_init
|
||||
@ stub _vcomp_for_dynamic_init_i8
|
||||
@ cdecl _vcomp_for_dynamic_next(ptr ptr) vcomp._vcomp_for_dynamic_next
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,184 +0,0 @@
|
||||
From 8ae03eb63457887c256bd9ddcc1cc848ab6d0f24 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 05:45:30 +0200
|
||||
Subject: vcomp: Implement omp_init_lock and omp_destroy_lock.
|
||||
|
||||
---
|
||||
dlls/vcomp/main.c | 55 ++++++++++++++++++++++++++++++++-------------
|
||||
dlls/vcomp/vcomp.spec | 4 ++--
|
||||
dlls/vcomp100/vcomp100.spec | 4 ++--
|
||||
dlls/vcomp110/vcomp110.spec | 4 ++--
|
||||
dlls/vcomp90/vcomp90.spec | 4 ++--
|
||||
5 files changed, 47 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
|
||||
index 0f733a9..0a5e709 100644
|
||||
--- a/dlls/vcomp/main.c
|
||||
+++ b/dlls/vcomp/main.c
|
||||
@@ -34,6 +34,9 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(vcomp);
|
||||
|
||||
+typedef CRITICAL_SECTION *omp_lock_t;
|
||||
+typedef CRITICAL_SECTION *omp_nest_lock_t;
|
||||
+
|
||||
static struct list vcomp_idle_threads = LIST_INIT(vcomp_idle_threads);
|
||||
static DWORD vcomp_context_tls = TLS_OUT_OF_INDEXES;
|
||||
static HMODULE vcomp_module;
|
||||
@@ -985,29 +988,49 @@ void WINAPIV _vcomp_fork(BOOL ifval, int nargs, void *wrapper, ...)
|
||||
__ms_va_end(team_data.valist);
|
||||
}
|
||||
|
||||
+static CRITICAL_SECTION *alloc_critsect(void)
|
||||
+{
|
||||
+ CRITICAL_SECTION *critsect;
|
||||
+ if (!(critsect = HeapAlloc(GetProcessHeap(), 0, sizeof(*critsect))))
|
||||
+ {
|
||||
+ ERR("could not allocate critical section\n");
|
||||
+ ExitProcess(1);
|
||||
+ }
|
||||
+
|
||||
+ InitializeCriticalSection(critsect);
|
||||
+ critsect->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": critsect");
|
||||
+ return critsect;
|
||||
+}
|
||||
+
|
||||
+static void destroy_critsect(CRITICAL_SECTION *critsect)
|
||||
+{
|
||||
+ if (!critsect) return;
|
||||
+ critsect->DebugInfo->Spare[0] = 0;
|
||||
+ DeleteCriticalSection(critsect);
|
||||
+ HeapFree(GetProcessHeap(), 0, critsect);
|
||||
+}
|
||||
+
|
||||
+void CDECL omp_init_lock(omp_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+ *lock = alloc_critsect();
|
||||
+}
|
||||
+
|
||||
+void CDECL omp_destroy_lock(omp_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+ destroy_critsect(*lock);
|
||||
+}
|
||||
+
|
||||
void CDECL _vcomp_enter_critsect(CRITICAL_SECTION **critsect)
|
||||
{
|
||||
TRACE("(%p)\n", critsect);
|
||||
|
||||
if (!*critsect)
|
||||
{
|
||||
- CRITICAL_SECTION *new_critsect;
|
||||
- if (!(new_critsect = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_critsect))))
|
||||
- {
|
||||
- ERR("could not allocate critical section\n");
|
||||
- ExitProcess(1);
|
||||
- }
|
||||
-
|
||||
- InitializeCriticalSection(new_critsect);
|
||||
- new_critsect->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": critsect");
|
||||
-
|
||||
+ CRITICAL_SECTION *new_critsect = alloc_critsect();
|
||||
if (interlocked_cmpxchg_ptr((void **)critsect, new_critsect, NULL) != NULL)
|
||||
- {
|
||||
- /* someone beat us to it */
|
||||
- new_critsect->DebugInfo->Spare[0] = 0;
|
||||
- DeleteCriticalSection(new_critsect);
|
||||
- HeapFree(GetProcessHeap(), 0, new_critsect);
|
||||
- }
|
||||
+ destroy_critsect(new_critsect); /* someone beat us to it */
|
||||
}
|
||||
|
||||
EnterCriticalSection(*critsect);
|
||||
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
|
||||
index 40110d2..e078af9 100644
|
||||
--- a/dlls/vcomp/vcomp.spec
|
||||
+++ b/dlls/vcomp/vcomp.spec
|
||||
@@ -88,7 +88,7 @@
|
||||
@ cdecl _vcomp_set_num_threads(long)
|
||||
@ cdecl _vcomp_single_begin(long)
|
||||
@ cdecl _vcomp_single_end()
|
||||
-@ stub omp_destroy_lock
|
||||
+@ cdecl omp_destroy_lock(ptr)
|
||||
@ stub omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic()
|
||||
@ cdecl omp_get_max_threads()
|
||||
@@ -99,7 +99,7 @@
|
||||
@ stub omp_get_wtick
|
||||
@ cdecl omp_get_wtime()
|
||||
@ cdecl omp_in_parallel()
|
||||
-@ stub omp_init_lock
|
||||
+@ cdecl omp_init_lock(ptr)
|
||||
@ stub omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long)
|
||||
@ stub omp_set_lock
|
||||
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
|
||||
index 1974f7e..017f49e 100644
|
||||
--- a/dlls/vcomp100/vcomp100.spec
|
||||
+++ b/dlls/vcomp100/vcomp100.spec
|
||||
@@ -88,7 +88,7 @@
|
||||
@ cdecl _vcomp_set_num_threads(long) vcomp._vcomp_set_num_threads
|
||||
@ cdecl _vcomp_single_begin(long) vcomp._vcomp_single_begin
|
||||
@ cdecl _vcomp_single_end() vcomp._vcomp_single_end
|
||||
-@ stub omp_destroy_lock
|
||||
+@ cdecl omp_destroy_lock(ptr) vcomp.omp_destroy_lock
|
||||
@ stub omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic() vcomp.omp_get_dynamic
|
||||
@ cdecl omp_get_max_threads() vcomp.omp_get_max_threads
|
||||
@@ -99,7 +99,7 @@
|
||||
@ stub omp_get_wtick
|
||||
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
|
||||
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
|
||||
-@ stub omp_init_lock
|
||||
+@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
@ stub omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
diff --git a/dlls/vcomp110/vcomp110.spec b/dlls/vcomp110/vcomp110.spec
|
||||
index d1b27ed..a7be1d9 100644
|
||||
--- a/dlls/vcomp110/vcomp110.spec
|
||||
+++ b/dlls/vcomp110/vcomp110.spec
|
||||
@@ -89,7 +89,7 @@
|
||||
@ cdecl _vcomp_set_num_threads(long) vcomp._vcomp_set_num_threads
|
||||
@ cdecl _vcomp_single_begin(long) vcomp._vcomp_single_begin
|
||||
@ cdecl _vcomp_single_end() vcomp._vcomp_single_end
|
||||
-@ stub omp_destroy_lock
|
||||
+@ cdecl omp_destroy_lock(ptr) vcomp.omp_destroy_lock
|
||||
@ stub omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic() vcomp.omp_get_dynamic
|
||||
@ cdecl omp_get_max_threads() vcomp.omp_get_max_threads
|
||||
@@ -100,7 +100,7 @@
|
||||
@ stub omp_get_wtick
|
||||
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
|
||||
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
|
||||
-@ stub omp_init_lock
|
||||
+@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
@ stub omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
|
||||
index 1974f7e..017f49e 100644
|
||||
--- a/dlls/vcomp90/vcomp90.spec
|
||||
+++ b/dlls/vcomp90/vcomp90.spec
|
||||
@@ -88,7 +88,7 @@
|
||||
@ cdecl _vcomp_set_num_threads(long) vcomp._vcomp_set_num_threads
|
||||
@ cdecl _vcomp_single_begin(long) vcomp._vcomp_single_begin
|
||||
@ cdecl _vcomp_single_end() vcomp._vcomp_single_end
|
||||
-@ stub omp_destroy_lock
|
||||
+@ cdecl omp_destroy_lock(ptr) vcomp.omp_destroy_lock
|
||||
@ stub omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic() vcomp.omp_get_dynamic
|
||||
@ cdecl omp_get_max_threads() vcomp.omp_get_max_threads
|
||||
@@ -99,7 +99,7 @@
|
||||
@ stub omp_get_wtick
|
||||
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
|
||||
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
|
||||
-@ stub omp_init_lock
|
||||
+@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
@ stub omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,175 +0,0 @@
|
||||
From f63f4cf4b09773743c44b8778687b77bea01ee35 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 06:02:25 +0200
|
||||
Subject: vcomp: Export omp_init_nest_lock and omp_destroy_nest_lock.
|
||||
|
||||
---
|
||||
dlls/vcomp/tests/vcomp.c | 22 ++++++++++++++++++++++
|
||||
dlls/vcomp/vcomp.spec | 4 ++--
|
||||
dlls/vcomp100/vcomp100.spec | 4 ++--
|
||||
dlls/vcomp110/vcomp110.spec | 4 ++--
|
||||
dlls/vcomp90/vcomp90.spec | 4 ++--
|
||||
5 files changed, 30 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c
|
||||
index 3df547a..ccb6792 100644
|
||||
--- a/dlls/vcomp/tests/vcomp.c
|
||||
+++ b/dlls/vcomp/tests/vcomp.c
|
||||
@@ -31,6 +31,9 @@ static BOOL (WINAPI *pActivateActCtx)(HANDLE, ULONG_PTR*);
|
||||
static BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR);
|
||||
static VOID (WINAPI *pReleaseActCtx)(HANDLE);
|
||||
|
||||
+typedef CRITICAL_SECTION *omp_lock_t;
|
||||
+typedef CRITICAL_SECTION *omp_nest_lock_t;
|
||||
+
|
||||
static void (CDECL *p_vcomp_atomic_add_i4)(int *dest, int val);
|
||||
static void (CDECL *p_vcomp_atomic_add_r4)(float *dest, float val);
|
||||
static void (CDECL *p_vcomp_atomic_add_r8)(double *dest, double val);
|
||||
@@ -70,11 +73,15 @@ static int (CDECL *p_vcomp_sections_next)(void);
|
||||
static void (CDECL *p_vcomp_set_num_threads)(int num_threads);
|
||||
static int (CDECL *p_vcomp_single_begin)(int flags);
|
||||
static void (CDECL *p_vcomp_single_end)(void);
|
||||
+static void (CDECL *pomp_destroy_lock)(omp_lock_t *lock);
|
||||
+static void (CDECL *pomp_destroy_nest_lock)(omp_nest_lock_t *lock);
|
||||
static int (CDECL *pomp_get_max_threads)(void);
|
||||
static int (CDECL *pomp_get_nested)(void);
|
||||
static int (CDECL *pomp_get_num_threads)(void);
|
||||
static int (CDECL *pomp_get_thread_num)(void);
|
||||
static int (CDECL *pomp_in_parallel)(void);
|
||||
+static void (CDECL *pomp_init_lock)(omp_lock_t *lock);
|
||||
+static void (CDECL *pomp_init_nest_lock)(omp_nest_lock_t *lock);
|
||||
static void (CDECL *pomp_set_nested)(int nested);
|
||||
static void (CDECL *pomp_set_num_threads)(int num_threads);
|
||||
|
||||
@@ -245,11 +252,15 @@ static BOOL init_vcomp(void)
|
||||
VCOMP_GET_PROC(_vcomp_set_num_threads);
|
||||
VCOMP_GET_PROC(_vcomp_single_begin);
|
||||
VCOMP_GET_PROC(_vcomp_single_end);
|
||||
+ VCOMP_GET_PROC(omp_destroy_lock);
|
||||
+ VCOMP_GET_PROC(omp_destroy_nest_lock);
|
||||
VCOMP_GET_PROC(omp_get_max_threads);
|
||||
VCOMP_GET_PROC(omp_get_nested);
|
||||
VCOMP_GET_PROC(omp_get_num_threads);
|
||||
VCOMP_GET_PROC(omp_get_thread_num);
|
||||
VCOMP_GET_PROC(omp_in_parallel);
|
||||
+ VCOMP_GET_PROC(omp_init_lock);
|
||||
+ VCOMP_GET_PROC(omp_init_nest_lock);
|
||||
VCOMP_GET_PROC(omp_set_nested);
|
||||
VCOMP_GET_PROC(omp_set_num_threads);
|
||||
|
||||
@@ -1278,6 +1289,16 @@ static void test_vcomp_flush(void)
|
||||
p_vcomp_flush();
|
||||
}
|
||||
|
||||
+static void test_omp_init_nest_lock(void)
|
||||
+{
|
||||
+ ok(pomp_init_lock == pomp_init_nest_lock,
|
||||
+ "expected omp_init_lock == omp_init_nest_lock, got %p and %p\n",
|
||||
+ pomp_init_lock, pomp_init_nest_lock);
|
||||
+ ok(pomp_destroy_lock == pomp_destroy_nest_lock,
|
||||
+ "expected omp_destroy_lock == omp_destroy_nest_lock, got %p and %p\n",
|
||||
+ pomp_destroy_lock, pomp_destroy_nest_lock);
|
||||
+}
|
||||
+
|
||||
static void test_atomic_integer32(void)
|
||||
{
|
||||
struct
|
||||
@@ -1398,6 +1419,7 @@ START_TEST(vcomp)
|
||||
test_vcomp_single_begin();
|
||||
test_vcomp_enter_critsect();
|
||||
test_vcomp_flush();
|
||||
+ test_omp_init_nest_lock();
|
||||
test_atomic_integer32();
|
||||
test_atomic_float();
|
||||
test_atomic_double();
|
||||
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
|
||||
index e078af9..418d176 100644
|
||||
--- a/dlls/vcomp/vcomp.spec
|
||||
+++ b/dlls/vcomp/vcomp.spec
|
||||
@@ -89,7 +89,7 @@
|
||||
@ cdecl _vcomp_single_begin(long)
|
||||
@ cdecl _vcomp_single_end()
|
||||
@ cdecl omp_destroy_lock(ptr)
|
||||
-@ stub omp_destroy_nest_lock
|
||||
+@ cdecl omp_destroy_nest_lock(ptr) omp_destroy_lock
|
||||
@ cdecl omp_get_dynamic()
|
||||
@ cdecl omp_get_max_threads()
|
||||
@ cdecl omp_get_nested()
|
||||
@@ -100,7 +100,7 @@
|
||||
@ cdecl omp_get_wtime()
|
||||
@ cdecl omp_in_parallel()
|
||||
@ cdecl omp_init_lock(ptr)
|
||||
-@ stub omp_init_nest_lock
|
||||
+@ cdecl omp_init_nest_lock(ptr) omp_init_lock
|
||||
@ cdecl omp_set_dynamic(long)
|
||||
@ stub omp_set_lock
|
||||
@ stub omp_set_nest_lock
|
||||
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
|
||||
index 017f49e..8a26b15 100644
|
||||
--- a/dlls/vcomp100/vcomp100.spec
|
||||
+++ b/dlls/vcomp100/vcomp100.spec
|
||||
@@ -89,7 +89,7 @@
|
||||
@ cdecl _vcomp_single_begin(long) vcomp._vcomp_single_begin
|
||||
@ cdecl _vcomp_single_end() vcomp._vcomp_single_end
|
||||
@ cdecl omp_destroy_lock(ptr) vcomp.omp_destroy_lock
|
||||
-@ stub omp_destroy_nest_lock
|
||||
+@ cdecl omp_destroy_nest_lock(ptr) vcomp.omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic() vcomp.omp_get_dynamic
|
||||
@ cdecl omp_get_max_threads() vcomp.omp_get_max_threads
|
||||
@ cdecl omp_get_nested() vcomp.omp_get_nested
|
||||
@@ -100,7 +100,7 @@
|
||||
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
|
||||
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
|
||||
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
-@ stub omp_init_nest_lock
|
||||
+@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
@ stub omp_set_nest_lock
|
||||
diff --git a/dlls/vcomp110/vcomp110.spec b/dlls/vcomp110/vcomp110.spec
|
||||
index a7be1d9..64a4016 100644
|
||||
--- a/dlls/vcomp110/vcomp110.spec
|
||||
+++ b/dlls/vcomp110/vcomp110.spec
|
||||
@@ -90,7 +90,7 @@
|
||||
@ cdecl _vcomp_single_begin(long) vcomp._vcomp_single_begin
|
||||
@ cdecl _vcomp_single_end() vcomp._vcomp_single_end
|
||||
@ cdecl omp_destroy_lock(ptr) vcomp.omp_destroy_lock
|
||||
-@ stub omp_destroy_nest_lock
|
||||
+@ cdecl omp_destroy_nest_lock(ptr) vcomp.omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic() vcomp.omp_get_dynamic
|
||||
@ cdecl omp_get_max_threads() vcomp.omp_get_max_threads
|
||||
@ cdecl omp_get_nested() vcomp.omp_get_nested
|
||||
@@ -101,7 +101,7 @@
|
||||
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
|
||||
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
|
||||
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
-@ stub omp_init_nest_lock
|
||||
+@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
@ stub omp_set_nest_lock
|
||||
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
|
||||
index 017f49e..8a26b15 100644
|
||||
--- a/dlls/vcomp90/vcomp90.spec
|
||||
+++ b/dlls/vcomp90/vcomp90.spec
|
||||
@@ -89,7 +89,7 @@
|
||||
@ cdecl _vcomp_single_begin(long) vcomp._vcomp_single_begin
|
||||
@ cdecl _vcomp_single_end() vcomp._vcomp_single_end
|
||||
@ cdecl omp_destroy_lock(ptr) vcomp.omp_destroy_lock
|
||||
-@ stub omp_destroy_nest_lock
|
||||
+@ cdecl omp_destroy_nest_lock(ptr) vcomp.omp_destroy_nest_lock
|
||||
@ cdecl omp_get_dynamic() vcomp.omp_get_dynamic
|
||||
@ cdecl omp_get_max_threads() vcomp.omp_get_max_threads
|
||||
@ cdecl omp_get_nested() vcomp.omp_get_nested
|
||||
@@ -100,7 +100,7 @@
|
||||
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
|
||||
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
|
||||
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
-@ stub omp_init_nest_lock
|
||||
+@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
@ stub omp_set_nest_lock
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,117 +0,0 @@
|
||||
From 3f0b8509cf0b7c720b853046f391c6f3f0b9ed94 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 06:06:39 +0200
|
||||
Subject: vcomp: Implement OpenMP nested locking functions.
|
||||
|
||||
---
|
||||
dlls/vcomp/main.c | 18 ++++++++++++++++++
|
||||
dlls/vcomp/vcomp.spec | 6 +++---
|
||||
dlls/vcomp100/vcomp100.spec | 6 +++---
|
||||
dlls/vcomp110/vcomp110.spec | 6 +++---
|
||||
dlls/vcomp90/vcomp90.spec | 6 +++---
|
||||
5 files changed, 30 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
|
||||
index 0a5e709..a110c11 100644
|
||||
--- a/dlls/vcomp/main.c
|
||||
+++ b/dlls/vcomp/main.c
|
||||
@@ -1022,6 +1022,24 @@ void CDECL omp_destroy_lock(omp_lock_t *lock)
|
||||
destroy_critsect(*lock);
|
||||
}
|
||||
|
||||
+void CDECL omp_set_nest_lock(omp_nest_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+ EnterCriticalSection(*lock);
|
||||
+}
|
||||
+
|
||||
+void CDECL omp_unset_nest_lock(omp_nest_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+ LeaveCriticalSection(*lock);
|
||||
+}
|
||||
+
|
||||
+int CDECL omp_test_nest_lock(omp_nest_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+ return TryEnterCriticalSection(*lock);
|
||||
+}
|
||||
+
|
||||
void CDECL _vcomp_enter_critsect(CRITICAL_SECTION **critsect)
|
||||
{
|
||||
TRACE("(%p)\n", critsect);
|
||||
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
|
||||
index 418d176..4c89879 100644
|
||||
--- a/dlls/vcomp/vcomp.spec
|
||||
+++ b/dlls/vcomp/vcomp.spec
|
||||
@@ -103,10 +103,10 @@
|
||||
@ cdecl omp_init_nest_lock(ptr) omp_init_lock
|
||||
@ cdecl omp_set_dynamic(long)
|
||||
@ stub omp_set_lock
|
||||
-@ stub omp_set_nest_lock
|
||||
+@ cdecl omp_set_nest_lock(ptr)
|
||||
@ cdecl omp_set_nested(long)
|
||||
@ cdecl omp_set_num_threads(long)
|
||||
@ stub omp_test_lock
|
||||
-@ stub omp_test_nest_lock
|
||||
+@ cdecl omp_test_nest_lock(ptr)
|
||||
@ stub omp_unset_lock
|
||||
-@ stub omp_unset_nest_lock
|
||||
+@ cdecl omp_unset_nest_lock(ptr)
|
||||
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
|
||||
index 8a26b15..9021b10 100644
|
||||
--- a/dlls/vcomp100/vcomp100.spec
|
||||
+++ b/dlls/vcomp100/vcomp100.spec
|
||||
@@ -103,10 +103,10 @@
|
||||
@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
-@ stub omp_set_nest_lock
|
||||
+@ cdecl omp_set_nest_lock(ptr) vcomp.omp_set_nest_lock
|
||||
@ cdecl omp_set_nested(long) vcomp.omp_set_nested
|
||||
@ cdecl omp_set_num_threads(long) vcomp.omp_set_num_threads
|
||||
@ stub omp_test_lock
|
||||
-@ stub omp_test_nest_lock
|
||||
+@ cdecl omp_test_nest_lock(ptr) vcomp.omp_test_nest_lock
|
||||
@ stub omp_unset_lock
|
||||
-@ stub omp_unset_nest_lock
|
||||
+@ cdecl omp_unset_nest_lock(ptr) vcomp.omp_unset_nest_lock
|
||||
diff --git a/dlls/vcomp110/vcomp110.spec b/dlls/vcomp110/vcomp110.spec
|
||||
index 64a4016..4f7503f 100644
|
||||
--- a/dlls/vcomp110/vcomp110.spec
|
||||
+++ b/dlls/vcomp110/vcomp110.spec
|
||||
@@ -104,10 +104,10 @@
|
||||
@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
-@ stub omp_set_nest_lock
|
||||
+@ cdecl omp_set_nest_lock(ptr) vcomp.omp_set_nest_lock
|
||||
@ cdecl omp_set_nested(long) vcomp.omp_set_nested
|
||||
@ cdecl omp_set_num_threads(long) vcomp.omp_set_num_threads
|
||||
@ stub omp_test_lock
|
||||
-@ stub omp_test_nest_lock
|
||||
+@ cdecl omp_test_nest_lock(ptr) vcomp.omp_test_nest_lock
|
||||
@ stub omp_unset_lock
|
||||
-@ stub omp_unset_nest_lock
|
||||
+@ cdecl omp_unset_nest_lock(ptr) vcomp.omp_unset_nest_lock
|
||||
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
|
||||
index 8a26b15..9021b10 100644
|
||||
--- a/dlls/vcomp90/vcomp90.spec
|
||||
+++ b/dlls/vcomp90/vcomp90.spec
|
||||
@@ -103,10 +103,10 @@
|
||||
@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
@ stub omp_set_lock
|
||||
-@ stub omp_set_nest_lock
|
||||
+@ cdecl omp_set_nest_lock(ptr) vcomp.omp_set_nest_lock
|
||||
@ cdecl omp_set_nested(long) vcomp.omp_set_nested
|
||||
@ cdecl omp_set_num_threads(long) vcomp.omp_set_num_threads
|
||||
@ stub omp_test_lock
|
||||
-@ stub omp_test_nest_lock
|
||||
+@ cdecl omp_test_nest_lock(ptr) vcomp.omp_test_nest_lock
|
||||
@ stub omp_unset_lock
|
||||
-@ stub omp_unset_nest_lock
|
||||
+@ cdecl omp_unset_nest_lock(ptr) vcomp.omp_unset_nest_lock
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 78df40d0132f693de1ccae95f91a411ff8ce30dc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 06:08:34 +0200
|
||||
Subject: vcomp: Implement OpenMP regular locking functions.
|
||||
|
||||
---
|
||||
dlls/vcomp/main.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
dlls/vcomp/vcomp.spec | 6 +++---
|
||||
dlls/vcomp100/vcomp100.spec | 6 +++---
|
||||
dlls/vcomp110/vcomp110.spec | 6 +++---
|
||||
dlls/vcomp90/vcomp90.spec | 6 +++---
|
||||
5 files changed, 47 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
|
||||
index a110c11..8a87f47 100644
|
||||
--- a/dlls/vcomp/main.c
|
||||
+++ b/dlls/vcomp/main.c
|
||||
@@ -1010,6 +1010,12 @@ static void destroy_critsect(CRITICAL_SECTION *critsect)
|
||||
HeapFree(GetProcessHeap(), 0, critsect);
|
||||
}
|
||||
|
||||
+static BOOL critsect_is_owned(CRITICAL_SECTION *critsect)
|
||||
+{
|
||||
+ return critsect->OwningThread == ULongToHandle(GetCurrentThreadId()) &&
|
||||
+ critsect->RecursionCount;
|
||||
+}
|
||||
+
|
||||
void CDECL omp_init_lock(omp_lock_t *lock)
|
||||
{
|
||||
TRACE("(%p)\n", lock);
|
||||
@@ -1022,6 +1028,35 @@ void CDECL omp_destroy_lock(omp_lock_t *lock)
|
||||
destroy_critsect(*lock);
|
||||
}
|
||||
|
||||
+void CDECL omp_set_lock(omp_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+
|
||||
+ if (critsect_is_owned(*lock))
|
||||
+ {
|
||||
+ ERR("omp_set_lock called while holding lock %p\n", *lock);
|
||||
+ ExitProcess(1);
|
||||
+ }
|
||||
+
|
||||
+ EnterCriticalSection(*lock);
|
||||
+}
|
||||
+
|
||||
+void CDECL omp_unset_lock(omp_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+ LeaveCriticalSection(*lock);
|
||||
+}
|
||||
+
|
||||
+int CDECL omp_test_lock(omp_lock_t *lock)
|
||||
+{
|
||||
+ TRACE("(%p)\n", lock);
|
||||
+
|
||||
+ if (critsect_is_owned(*lock))
|
||||
+ return 0;
|
||||
+
|
||||
+ return TryEnterCriticalSection(*lock);
|
||||
+}
|
||||
+
|
||||
void CDECL omp_set_nest_lock(omp_nest_lock_t *lock)
|
||||
{
|
||||
TRACE("(%p)\n", lock);
|
||||
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
|
||||
index 4c89879..52b929f 100644
|
||||
--- a/dlls/vcomp/vcomp.spec
|
||||
+++ b/dlls/vcomp/vcomp.spec
|
||||
@@ -102,11 +102,11 @@
|
||||
@ cdecl omp_init_lock(ptr)
|
||||
@ cdecl omp_init_nest_lock(ptr) omp_init_lock
|
||||
@ cdecl omp_set_dynamic(long)
|
||||
-@ stub omp_set_lock
|
||||
+@ cdecl omp_set_lock(ptr)
|
||||
@ cdecl omp_set_nest_lock(ptr)
|
||||
@ cdecl omp_set_nested(long)
|
||||
@ cdecl omp_set_num_threads(long)
|
||||
-@ stub omp_test_lock
|
||||
+@ cdecl omp_test_lock(ptr)
|
||||
@ cdecl omp_test_nest_lock(ptr)
|
||||
-@ stub omp_unset_lock
|
||||
+@ cdecl omp_unset_lock(ptr)
|
||||
@ cdecl omp_unset_nest_lock(ptr)
|
||||
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
|
||||
index 9021b10..4b646eb 100644
|
||||
--- a/dlls/vcomp100/vcomp100.spec
|
||||
+++ b/dlls/vcomp100/vcomp100.spec
|
||||
@@ -102,11 +102,11 @@
|
||||
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
-@ stub omp_set_lock
|
||||
+@ cdecl omp_set_lock(ptr) vcomp.omp_set_lock
|
||||
@ cdecl omp_set_nest_lock(ptr) vcomp.omp_set_nest_lock
|
||||
@ cdecl omp_set_nested(long) vcomp.omp_set_nested
|
||||
@ cdecl omp_set_num_threads(long) vcomp.omp_set_num_threads
|
||||
-@ stub omp_test_lock
|
||||
+@ cdecl omp_test_lock(ptr) vcomp.omp_test_lock
|
||||
@ cdecl omp_test_nest_lock(ptr) vcomp.omp_test_nest_lock
|
||||
-@ stub omp_unset_lock
|
||||
+@ cdecl omp_unset_lock(ptr) vcomp.omp_unset_lock
|
||||
@ cdecl omp_unset_nest_lock(ptr) vcomp.omp_unset_nest_lock
|
||||
diff --git a/dlls/vcomp110/vcomp110.spec b/dlls/vcomp110/vcomp110.spec
|
||||
index 4f7503f..1ee7fba 100644
|
||||
--- a/dlls/vcomp110/vcomp110.spec
|
||||
+++ b/dlls/vcomp110/vcomp110.spec
|
||||
@@ -103,11 +103,11 @@
|
||||
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
-@ stub omp_set_lock
|
||||
+@ cdecl omp_set_lock(ptr) vcomp.omp_set_lock
|
||||
@ cdecl omp_set_nest_lock(ptr) vcomp.omp_set_nest_lock
|
||||
@ cdecl omp_set_nested(long) vcomp.omp_set_nested
|
||||
@ cdecl omp_set_num_threads(long) vcomp.omp_set_num_threads
|
||||
-@ stub omp_test_lock
|
||||
+@ cdecl omp_test_lock(ptr) vcomp.omp_test_lock
|
||||
@ cdecl omp_test_nest_lock(ptr) vcomp.omp_test_nest_lock
|
||||
-@ stub omp_unset_lock
|
||||
+@ cdecl omp_unset_lock(ptr) vcomp.omp_unset_lock
|
||||
@ cdecl omp_unset_nest_lock(ptr) vcomp.omp_unset_nest_lock
|
||||
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
|
||||
index 9021b10..4b646eb 100644
|
||||
--- a/dlls/vcomp90/vcomp90.spec
|
||||
+++ b/dlls/vcomp90/vcomp90.spec
|
||||
@@ -102,11 +102,11 @@
|
||||
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
|
||||
@ cdecl omp_init_nest_lock(ptr) vcomp.omp_init_nest_lock
|
||||
@ cdecl omp_set_dynamic(long) vcomp.omp_set_dynamic
|
||||
-@ stub omp_set_lock
|
||||
+@ cdecl omp_set_lock(ptr) vcomp.omp_set_lock
|
||||
@ cdecl omp_set_nest_lock(ptr) vcomp.omp_set_nest_lock
|
||||
@ cdecl omp_set_nested(long) vcomp.omp_set_nested
|
||||
@ cdecl omp_set_num_threads(long) vcomp.omp_set_num_threads
|
||||
-@ stub omp_test_lock
|
||||
+@ cdecl omp_test_lock(ptr) vcomp.omp_test_lock
|
||||
@ cdecl omp_test_nest_lock(ptr) vcomp.omp_test_nest_lock
|
||||
-@ stub omp_unset_lock
|
||||
+@ cdecl omp_unset_lock(ptr) vcomp.omp_unset_lock
|
||||
@ cdecl omp_unset_nest_lock(ptr) vcomp.omp_unset_nest_lock
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,64 +0,0 @@
|
||||
From 2f46b96355314dfe76d6baea838f3f57b0890346 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 06:10:50 +0200
|
||||
Subject: vcomp/tests: Add tests for function pointers of remaining lock
|
||||
functions.
|
||||
|
||||
---
|
||||
dlls/vcomp/tests/vcomp.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c
|
||||
index ccb6792..821a552 100644
|
||||
--- a/dlls/vcomp/tests/vcomp.c
|
||||
+++ b/dlls/vcomp/tests/vcomp.c
|
||||
@@ -82,8 +82,14 @@ static int (CDECL *pomp_get_thread_num)(void);
|
||||
static int (CDECL *pomp_in_parallel)(void);
|
||||
static void (CDECL *pomp_init_lock)(omp_lock_t *lock);
|
||||
static void (CDECL *pomp_init_nest_lock)(omp_nest_lock_t *lock);
|
||||
+static void (CDECL *pomp_set_lock)(omp_lock_t *lock);
|
||||
+static void (CDECL *pomp_set_nest_lock)(omp_nest_lock_t *lock);
|
||||
static void (CDECL *pomp_set_nested)(int nested);
|
||||
static void (CDECL *pomp_set_num_threads)(int num_threads);
|
||||
+static int (CDECL *pomp_test_lock)(omp_lock_t *lock);
|
||||
+static int (CDECL *pomp_test_nest_lock)(omp_nest_lock_t *lock);
|
||||
+static void (CDECL *pomp_unset_lock)(omp_lock_t *lock);
|
||||
+static void (CDECL *pomp_unset_nest_lock)(omp_nest_lock_t *lock);
|
||||
|
||||
#define VCOMP_DYNAMIC_FLAGS_STATIC 0x01
|
||||
#define VCOMP_DYNAMIC_FLAGS_CHUNKED 0x02
|
||||
@@ -261,8 +267,14 @@ static BOOL init_vcomp(void)
|
||||
VCOMP_GET_PROC(omp_in_parallel);
|
||||
VCOMP_GET_PROC(omp_init_lock);
|
||||
VCOMP_GET_PROC(omp_init_nest_lock);
|
||||
+ VCOMP_GET_PROC(omp_set_lock);
|
||||
+ VCOMP_GET_PROC(omp_set_nest_lock);
|
||||
VCOMP_GET_PROC(omp_set_nested);
|
||||
VCOMP_GET_PROC(omp_set_num_threads);
|
||||
+ VCOMP_GET_PROC(omp_test_lock);
|
||||
+ VCOMP_GET_PROC(omp_test_nest_lock);
|
||||
+ VCOMP_GET_PROC(omp_unset_lock);
|
||||
+ VCOMP_GET_PROC(omp_unset_nest_lock);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1297,6 +1309,16 @@ static void test_omp_init_nest_lock(void)
|
||||
ok(pomp_destroy_lock == pomp_destroy_nest_lock,
|
||||
"expected omp_destroy_lock == omp_destroy_nest_lock, got %p and %p\n",
|
||||
pomp_destroy_lock, pomp_destroy_nest_lock);
|
||||
+
|
||||
+ ok(pomp_set_lock != pomp_set_nest_lock,
|
||||
+ "expected omp_set_lock != omp_set_nest_lock, got %p and %p\n",
|
||||
+ pomp_set_lock, pomp_set_nest_lock);
|
||||
+ ok(pomp_unset_lock != pomp_unset_nest_lock,
|
||||
+ "expected omp_unset_lock != omp_unset_nest_lock, got %p and %p\n",
|
||||
+ pomp_unset_lock, pomp_unset_nest_lock);
|
||||
+ ok(pomp_test_lock != pomp_test_nest_lock,
|
||||
+ "expected omp_test_lock != omp_test_nest_lock, got %p and %p\n",
|
||||
+ pomp_test_lock, pomp_test_nest_lock);
|
||||
}
|
||||
|
||||
static void test_atomic_integer32(void)
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,2 +0,0 @@
|
||||
Fixes: [39058] Implement stub for vcomp._vcomp_flush
|
||||
Fixes: [26688] Implement vcomp locking functions
|
@ -1,23 +1,23 @@
|
||||
From 0384901fc9ef670f7e83e7dfcbdad35edff52746 Mon Sep 17 00:00:00 2001
|
||||
From c87f87830176d05d7a14297174cb439f877c83c9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:19:24 +0100
|
||||
Subject: wined3d: Pass a context to surface_load_location.
|
||||
|
||||
---
|
||||
dlls/wined3d/context.c | 4 +-
|
||||
dlls/wined3d/device.c | 20 +++----
|
||||
dlls/wined3d/device.c | 22 ++++----
|
||||
dlls/wined3d/drawprim.c | 20 +++----
|
||||
dlls/wined3d/surface.c | 120 +++++++++++++++++++++++++----------------
|
||||
dlls/wined3d/swapchain.c | 8 +--
|
||||
dlls/wined3d/texture.c | 7 ++-
|
||||
dlls/wined3d/wined3d_private.h | 5 +-
|
||||
7 files changed, 107 insertions(+), 77 deletions(-)
|
||||
7 files changed, 108 insertions(+), 78 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index a122845..12a172b 100644
|
||||
index 79125d1..b900417 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2212,7 +2212,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
|
||||
@@ -2263,7 +2263,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index a122845..12a172b 100644
|
||||
static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
const struct wined3d_rendertarget_view *depth_stencil)
|
||||
{
|
||||
@@ -2228,7 +2228,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2279,7 +2279,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@ -36,7 +36,7 @@ index a122845..12a172b 100644
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
context_set_render_offscreen(context, TRUE);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 56cf325..0521a94 100644
|
||||
index 880f77c..67baca1 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -300,6 +300,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -76,8 +76,17 @@ index 56cf325..0521a94 100644
|
||||
if (target)
|
||||
{
|
||||
render_offscreen = context->render_offscreen;
|
||||
@@ -4049,7 +4049,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
&& src_rect.bottom == sub_resource->height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
- surface_load_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+ surface_load_location(surface, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
|
||||
wined3d_surface_upload_data(surface, gl_info, resource->format,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index c0654a6..913ada5 100644
|
||||
index 7a6a6e9..cec092f 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -611,6 +611,15 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@ -120,7 +129,7 @@ index c0654a6..913ada5 100644
|
||||
{
|
||||
/* Note that this depends on the context_acquire() call above to set
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 320bd31..a0342a0 100644
|
||||
index 537ac09..186e702 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -753,7 +753,16 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@ -232,7 +241,7 @@ index 320bd31..a0342a0 100644
|
||||
surface_evict_sysmem(surface);
|
||||
}
|
||||
|
||||
@@ -2722,10 +2732,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2709,10 +2719,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -250,7 +259,7 @@ index 320bd31..a0342a0 100644
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
@@ -2807,6 +2823,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2794,6 +2810,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
{
|
||||
HRESULT hr;
|
||||
@ -259,7 +268,7 @@ index 320bd31..a0342a0 100644
|
||||
|
||||
TRACE("surface %p, dc %p.\n", surface, dc);
|
||||
|
||||
@@ -2818,26 +2836,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2805,26 +2823,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
if (surface->resource.map_count)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -299,7 +308,7 @@ index 320bd31..a0342a0 100644
|
||||
surface->flags |= SFLAG_DCINUSE;
|
||||
surface->resource.map_count++;
|
||||
|
||||
@@ -2875,8 +2903,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2862,8 +2890,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
* copied back to the DIB in the next getdc call.
|
||||
*
|
||||
* The same consideration applies to user memory surfaces. */
|
||||
@ -317,7 +326,7 @@ index 320bd31..a0342a0 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -4117,7 +4153,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4107,7 +4143,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (surface->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
|
||||
@ -326,7 +335,7 @@ index 320bd31..a0342a0 100644
|
||||
|
||||
/* Download the surface to system memory. */
|
||||
if (surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
@@ -4153,7 +4189,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -4143,7 +4179,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@ -335,7 +344,7 @@ index 320bd31..a0342a0 100644
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
@@ -4226,7 +4262,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4216,7 +4252,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -344,7 +353,7 @@ index 320bd31..a0342a0 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4237,7 +4273,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4227,7 +4263,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -353,7 +362,7 @@ index 320bd31..a0342a0 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4246,7 +4282,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4236,7 +4272,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... */
|
||||
surface_prepare_system_memory(surface);
|
||||
@ -362,7 +371,7 @@ index 320bd31..a0342a0 100644
|
||||
}
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
@@ -4272,7 +4308,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4262,7 +4298,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -371,7 +380,7 @@ index 320bd31..a0342a0 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -4340,11 +4376,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4330,11 +4366,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
|
||||
}
|
||||
|
||||
@ -385,7 +394,7 @@ index 320bd31..a0342a0 100644
|
||||
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@@ -4353,9 +4388,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4343,9 +4378,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
|
||||
{
|
||||
@ -395,7 +404,7 @@ index 320bd31..a0342a0 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
else if (location & surface->locations
|
||||
@@ -4399,33 +4432,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4389,33 +4422,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@ -432,7 +441,7 @@ index 320bd31..a0342a0 100644
|
||||
return hr;
|
||||
break;
|
||||
|
||||
@@ -5542,7 +5564,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5532,7 +5554,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, &src_rect)))
|
||||
{
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
@ -446,7 +455,7 @@ index 320bd31..a0342a0 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 146f5d6..4f4d4df 100644
|
||||
index 2801215..9750c8c 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -309,7 +309,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
||||
@ -485,10 +494,10 @@ index 146f5d6..4f4d4df 100644
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index f4e77fb..2f0d3d4 100644
|
||||
index c7fc3a7..67bfa63 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -753,16 +753,19 @@ static void wined3d_texture_upload_data(struct wined3d_texture *texture, const s
|
||||
@@ -768,16 +768,19 @@ static HRESULT wined3d_texture_upload_data(struct wined3d_texture *texture,
|
||||
static void texture2d_sub_resource_load(struct wined3d_resource *sub_resource,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
@ -511,10 +520,10 @@ index f4e77fb..2f0d3d4 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9e6cb5e..ccfebf0 100644
|
||||
index 16336c3..92d179e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2399,11 +2399,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
|
||||
@@ -2429,11 +2429,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
@ -530,5 +539,5 @@ index 9e6cb5e..ccfebf0 100644
|
||||
void surface_prepare_rb(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.4.2
|
||||
2.5.0
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
From f697640248f83b974829df63769cbb6fb4f6b722 Mon Sep 17 00:00:00 2001
|
||||
From 651ea75a3da6c0608cb4dae8425f57954ffe723b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 4 Jan 2014 00:53:47 +0100
|
||||
Subject: wined3d: Remove surface_validate_location.
|
||||
|
||||
---
|
||||
dlls/wined3d/arb_program_shader.c | 2 +-
|
||||
dlls/wined3d/device.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 ++--
|
||||
dlls/wined3d/surface.c | 29 +++++++++++------------------
|
||||
dlls/wined3d/swapchain.c | 12 ++++++------
|
||||
dlls/wined3d/texture.c | 4 +---
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
6 files changed, 20 insertions(+), 30 deletions(-)
|
||||
6 files changed, 21 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 57bc787..bdfc42d 100644
|
||||
index a5c5c43..8f74bf6 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7864,7 +7864,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@ -26,7 +26,7 @@ index 57bc787..bdfc42d 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 08987f2..210e53e 100644
|
||||
index 05652e0..a7a83da 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -392,7 +392,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -38,6 +38,15 @@ index 08987f2..210e53e 100644
|
||||
surface_invalidate_location(rt, ~rt->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
@@ -4057,7 +4057,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
|
||||
context_release(context);
|
||||
|
||||
- surface_validate_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
surface_invalidate_location(surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 4a61d1b..8ec6ab8 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
@ -156,7 +165,7 @@ index 4a61d1b..8ec6ab8 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 2e91c7c..a62d245 100644
|
||||
index ce7ff46..cd1aabd 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -569,19 +569,19 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@ -202,10 +211,10 @@ index 2e91c7c..a62d245 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 75cf863..cf6e3e3 100644
|
||||
index ffaf779..e6e0d78 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -785,9 +785,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
|
||||
@@ -800,9 +800,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
|
||||
|
||||
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -217,10 +226,10 @@ index 75cf863..cf6e3e3 100644
|
||||
|
||||
static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0aa218c..fa842fa 100644
|
||||
index 7944ae0..6a3a863 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2442,7 +2442,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2447,7 +2447,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
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;
|
||||
@ -229,5 +238,5 @@ index 0aa218c..fa842fa 100644
|
||||
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
|
||||
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.4.5
|
||||
2.5.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4f63b8a3415a44d16a20acfc6d4571fa10e19a55 Mon Sep 17 00:00:00 2001
|
||||
From fe1d9b795638409df399927a874d91ee301b39e1 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.
|
||||
@ -6,19 +6,19 @@ Subject: wined3d: Remove surface_invalidate_location.
|
||||
---
|
||||
dlls/wined3d/arb_program_shader.c | 2 +-
|
||||
dlls/wined3d/context.c | 2 +-
|
||||
dlls/wined3d/device.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 ++--
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 45 ++++++++++++++++-----------------------
|
||||
dlls/wined3d/swapchain.c | 12 +++++------
|
||||
dlls/wined3d/texture.c | 6 ++----
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
8 files changed, 30 insertions(+), 42 deletions(-)
|
||||
8 files changed, 31 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 35637f2..0d61251 100644
|
||||
index 8f74bf6..71c7c2e 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7922,7 +7922,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7865,7 +7865,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -28,10 +28,10 @@ index 35637f2..0d61251 100644
|
||||
|
||||
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index ac4c7cb..167ea7d 100644
|
||||
index b900417..4752fff 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3192,7 +3192,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
@@ -3281,7 +3281,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -41,7 +41,7 @@ index ac4c7cb..167ea7d 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index f5fdad2..4e21f49 100644
|
||||
index a30c618..a127f9d 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
|
||||
@ -53,8 +53,17 @@ index f5fdad2..4e21f49 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4058,7 +4058,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
- surface_invalidate_location(surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 567550e..6f226ce 100644
|
||||
index 4d47a21..8a27363 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -629,7 +629,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@ -67,10 +76,10 @@ index 567550e..6f226ce 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 350a2b2..929ea5d 100644
|
||||
index 3dfa290..0a22b3d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -598,7 +598,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
@@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
return;
|
||||
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
@ -79,7 +88,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
static void surface_release_client_storage(struct wined3d_surface *surface)
|
||||
@@ -1128,7 +1128,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
|
||||
@@ -1131,7 +1131,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
|
||||
checkGLcall("glDeleteBuffers(1, &surface->pbo)");
|
||||
|
||||
surface->pbo = 0;
|
||||
@ -88,7 +97,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
static ULONG surface_resource_incref(struct wined3d_resource *resource)
|
||||
@@ -1168,7 +1168,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1171,7 +1171,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
surface_prepare_system_memory(surface);
|
||||
memset(surface->resource.heap_memory, 0, surface->resource.size);
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
|
||||
@ -97,7 +106,7 @@ index 350a2b2..929ea5d 100644
|
||||
|
||||
/* We also get here when the ddraw swapchain is destroyed, for example
|
||||
* for a mode switch. In this case this surface won't necessarily be
|
||||
@@ -1180,7 +1180,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1183,7 +1183,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
{
|
||||
surface_prepare_map_memory(surface);
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
@ -106,7 +115,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
@@ -1218,7 +1218,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1221,7 +1221,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
|
||||
static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
{
|
||||
@ -118,7 +127,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
@@ -1686,7 +1689,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1690,7 +1693,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -127,7 +136,7 @@ index 350a2b2..929ea5d 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2746,7 +2749,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2738,7 +2741,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
@ -136,7 +145,7 @@ index 350a2b2..929ea5d 100644
|
||||
|
||||
switch (surface->resource.map_binding)
|
||||
{
|
||||
@@ -2862,7 +2865,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2854,7 +2857,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
}
|
||||
|
||||
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
|
||||
@ -145,7 +154,7 @@ index 350a2b2..929ea5d 100644
|
||||
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -2911,7 +2914,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2903,7 +2906,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);
|
||||
@ -154,7 +163,7 @@ index 350a2b2..929ea5d 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -3289,7 +3292,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -3281,7 +3284,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);
|
||||
@ -163,7 +172,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
/* Uses the hardware to stretch and flip the image */
|
||||
@@ -3357,7 +3360,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3349,7 +3352,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 */
|
||||
@ -172,7 +181,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3562,7 +3565,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3554,7 +3557,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);
|
||||
@ -181,7 +190,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
/* Front buffer coordinates are always full screen coordinates, but our GL
|
||||
@@ -4064,18 +4067,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4059,18 +4062,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -200,7 +209,7 @@ index 350a2b2..929ea5d 100644
|
||||
static DWORD resource_access_from_location(DWORD location)
|
||||
{
|
||||
switch (location)
|
||||
@@ -4627,7 +4618,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -4620,7 +4611,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -209,7 +218,7 @@ index 350a2b2..929ea5d 100644
|
||||
}
|
||||
|
||||
const struct blit_shader ffp_blit = {
|
||||
@@ -5599,7 +5590,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5600,7 +5591,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);
|
||||
@ -218,7 +227,7 @@ index 350a2b2..929ea5d 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -5727,7 +5718,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5730,7 +5721,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);
|
||||
@ -228,7 +237,7 @@ index 350a2b2..929ea5d 100644
|
||||
|
||||
return hr;
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 075bffc..bd5348c 100644
|
||||
index cd1aabd..74aefd5 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -512,7 +512,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@ -278,10 +287,10 @@ index 075bffc..bd5348c 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 172e5c4..140124f 100644
|
||||
index b596aef..3e4e65d 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -779,7 +779,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -781,7 +781,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
context_release(context);
|
||||
@ -290,7 +299,7 @@ index 172e5c4..140124f 100644
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
@@ -791,9 +791,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
@@ -793,9 +793,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
|
||||
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -302,10 +311,10 @@ index 172e5c4..140124f 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 27bba5b..19b8d31 100644
|
||||
index 0612b17..e0bcbba 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2391,7 +2391,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
@@ -2429,7 +2429,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;
|
||||
@ -314,5 +323,5 @@ index 27bba5b..19b8d31 100644
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.3.5
|
||||
2.5.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d934f1879e55a8787562d4cc75ce2bd981f8b585 Mon Sep 17 00:00:00 2001
|
||||
From ba7975a0842a03691b9ab43254df9be230d25754 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:33:17 +0100
|
||||
Subject: wined3d: Replace surface_load_location with resource_load_location.
|
||||
@ -6,19 +6,19 @@ Subject: wined3d: Replace surface_load_location with resource_load_location.
|
||||
FIXME: Check if this patch is complete enough to make sense.
|
||||
---
|
||||
dlls/wined3d/context.c | 2 +-
|
||||
dlls/wined3d/device.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 +-
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 111 +++++++++++++----------------------------
|
||||
dlls/wined3d/swapchain.c | 8 +--
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 2 -
|
||||
7 files changed, 43 insertions(+), 86 deletions(-)
|
||||
7 files changed, 44 insertions(+), 87 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 167ea7d..5644ea0 100644
|
||||
index 4752fff..5f70ce5 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2224,7 +2224,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2279,7 +2279,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@ -28,7 +28,7 @@ index 167ea7d..5644ea0 100644
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
context_set_render_offscreen(context, TRUE);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 1874a2b..ab874de 100644
|
||||
index a127f9d..1da2df4 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -323,7 +323,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -40,8 +40,17 @@ index 1874a2b..ab874de 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4049,7 +4049,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
&& src_rect.bottom == sub_resource->height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
- surface_load_location(surface, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+ wined3d_resource_load_location(&surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
|
||||
wined3d_surface_upload_data(surface, gl_info, resource->format,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 6f226ce..f2c2f42 100644
|
||||
index 8a27363..bafe7dd 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -628,7 +628,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@ -54,10 +63,10 @@ index 6f226ce..f2c2f42 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 1fcbc98..f7171df 100644
|
||||
index 9a37dcd..4e8cf9b 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -758,7 +758,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -759,7 +759,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, surface);
|
||||
@ -66,7 +75,7 @@ index 1fcbc98..f7171df 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -824,9 +824,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -825,9 +825,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
|
||||
/* Make sure the locations are up-to-date. Loading the destination
|
||||
* surface isn't required if the entire surface is overwritten. */
|
||||
@ -78,7 +87,7 @@ index 1fcbc98..f7171df 100644
|
||||
|
||||
gl_info = context->gl_info;
|
||||
|
||||
@@ -915,9 +915,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -916,9 +916,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
* surface isn't required if the entire surface is overwritten. (And is
|
||||
* in fact harmful if we're being called by surface_load_location() with
|
||||
* the purpose of loading the destination surface.) */
|
||||
@ -90,7 +99,7 @@ index 1fcbc98..f7171df 100644
|
||||
|
||||
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
|
||||
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
|
||||
@@ -1179,7 +1179,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1182,7 +1182,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
else
|
||||
{
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -99,7 +108,7 @@ index 1fcbc98..f7171df 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -1224,22 +1224,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1227,22 +1227,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
}
|
||||
|
||||
@ -122,7 +131,7 @@ index 1fcbc98..f7171df 100644
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
{
|
||||
surface_private_setup,
|
||||
@@ -1683,7 +1667,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1689,7 +1673,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
if (update_w == dst_w && update_h == dst_h)
|
||||
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
|
||||
else
|
||||
@ -131,7 +140,7 @@ index 1fcbc98..f7171df 100644
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->resource.locations);
|
||||
@@ -1816,7 +1800,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1822,7 +1806,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
}
|
||||
TRACE("Reloading because surface is dirty.\n");
|
||||
|
||||
@ -140,7 +149,7 @@ index 1fcbc98..f7171df 100644
|
||||
surface_evict_sysmem(surface);
|
||||
}
|
||||
|
||||
@@ -2749,7 +2733,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2743,7 +2727,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
|
||||
if (surface->resource.device->d3d_initialized)
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -149,7 +158,7 @@ index 1fcbc98..f7171df 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -2854,7 +2838,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2848,7 +2832,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
{
|
||||
if (surface->flags & SFLAG_CLIENT)
|
||||
{
|
||||
@ -158,7 +167,7 @@ index 1fcbc98..f7171df 100644
|
||||
surface_release_client_storage(surface);
|
||||
}
|
||||
hr = surface_create_dib_section(surface);
|
||||
@@ -2870,7 +2854,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2864,7 +2848,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
surface->resource.map_binding = WINED3D_LOCATION_DIB;
|
||||
}
|
||||
|
||||
@ -167,7 +176,7 @@ index 1fcbc98..f7171df 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB);
|
||||
|
||||
if (context)
|
||||
@@ -2919,7 +2903,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2913,7 +2897,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
@ -176,7 +185,7 @@ index 1fcbc98..f7171df 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB);
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -3634,8 +3618,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
@@ -3628,8 +3612,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
gl_info = context->gl_info;
|
||||
|
||||
/* Make sure the surface is up-to-date. This should probably use
|
||||
@ -187,7 +196,7 @@ index 1fcbc98..f7171df 100644
|
||||
wined3d_texture_load(src_surface->container, context, FALSE);
|
||||
|
||||
/* Activate the destination context, set it up for blitting */
|
||||
@@ -4073,29 +4057,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4070,29 +4054,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -217,7 +226,7 @@ index 1fcbc98..f7171df 100644
|
||||
static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
@@ -4145,7 +4106,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4142,7 +4103,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
|
||||
@ -226,7 +235,7 @@ index 1fcbc98..f7171df 100644
|
||||
|
||||
/* Download the surface to system memory. */
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
@@ -4181,7 +4142,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -4178,7 +4139,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@ -235,7 +244,7 @@ index 1fcbc98..f7171df 100644
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
@@ -4254,7 +4215,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4251,7 +4212,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -244,7 +253,7 @@ index 1fcbc98..f7171df 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4265,7 +4226,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4262,7 +4223,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -253,7 +262,7 @@ index 1fcbc98..f7171df 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4274,7 +4235,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4271,7 +4232,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... */
|
||||
surface_prepare_system_memory(surface);
|
||||
@ -262,7 +271,7 @@ index 1fcbc98..f7171df 100644
|
||||
}
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
@@ -4300,7 +4261,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4297,7 +4258,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -271,7 +280,7 @@ index 1fcbc98..f7171df 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -4368,9 +4329,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4365,9 +4326,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
|
||||
}
|
||||
|
||||
@ -285,7 +294,7 @@ index 1fcbc98..f7171df 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
@@ -4397,20 +4360,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4394,20 +4357,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +315,7 @@ index 1fcbc98..f7171df 100644
|
||||
if (!surface->resource.locations)
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
@@ -5552,7 +5501,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5555,7 +5504,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
{
|
||||
struct wined3d_context *context = context_acquire(device, dst_surface);
|
||||
@ -316,7 +325,7 @@ index 1fcbc98..f7171df 100644
|
||||
context_release(context);
|
||||
}
|
||||
return WINED3D_OK;
|
||||
@@ -5625,6 +5575,15 @@ cpu:
|
||||
@@ -5628,6 +5578,15 @@ cpu:
|
||||
return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter);
|
||||
}
|
||||
|
||||
@ -333,7 +342,7 @@ index 1fcbc98..f7171df 100644
|
||||
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
|
||||
{
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 6864a4a..15f7708 100644
|
||||
index 5fd09de..9ae610d 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -309,7 +309,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
||||
@ -372,10 +381,10 @@ index 6864a4a..15f7708 100644
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 0c64f39..9eb8da1 100644
|
||||
index 813984a..561f9e6 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -777,7 +777,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -779,7 +779,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -385,10 +394,10 @@ index 0c64f39..9eb8da1 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8e51f16..b8dbde3 100644
|
||||
index dd4c07f..b68ebbe 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2391,8 +2391,6 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -2436,8 +2436,6 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -398,5 +407,5 @@ index 8e51f16..b8dbde3 100644
|
||||
void surface_prepare_rb(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.3.5
|
||||
2.5.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 99ec63d5b866c832fd8dce4b249a338dd80a505e Mon Sep 17 00:00:00 2001
|
||||
From b21f804efaddc89cdce137a0bba20c1d92f09279 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 172 insertions(+), 127 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index eb46f8c..34e210a 100644
|
||||
index 71c7c2e..51fe69f 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -684,7 +684,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -42,10 +42,10 @@ index eb46f8c..34e210a 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index fb065cd..42a221c 100644
|
||||
index 5f70ce5..1be568c 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1475,6 +1475,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1509,6 +1509,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ index fb065cd..42a221c 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -1793,6 +1799,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1822,6 +1828,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -66,7 +66,7 @@ index fb065cd..42a221c 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -1827,6 +1834,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -1856,6 +1863,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
@ -74,7 +74,7 @@ index fb065cd..42a221c 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2342,7 +2350,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2371,7 +2379,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -83,7 +83,7 @@ index fb065cd..42a221c 100644
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2387,6 +2395,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2416,6 +2424,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(device,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
@ -92,7 +92,7 @@ index fb065cd..42a221c 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2437,7 +2447,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2466,7 +2476,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
@ -101,7 +101,7 @@ index fb065cd..42a221c 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2467,7 +2477,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2496,7 +2506,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_device *device = context->swapchain->device;
|
||||
@ -110,7 +110,7 @@ index fb065cd..42a221c 100644
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
||||
@@ -2499,6 +2509,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2528,6 +2538,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -119,17 +119,17 @@ index fb065cd..42a221c 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3087,7 +3099,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
@@ -3152,7 +3164,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
- const struct wined3d_fb_state *fb = state->fb;
|
||||
+ const struct wined3d_fb_state *fb = &state->fb;
|
||||
unsigned int i, j;
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 874129a..22a2de8 100644
|
||||
index 459fd56..a07cc6c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -290,7 +290,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@ -168,7 +168,7 @@ index 874129a..22a2de8 100644
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -1004,7 +1004,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1005,7 +1005,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
state_cleanup(&cs->state);
|
||||
memset(&cs->state, 0, sizeof(cs->state));
|
||||
@ -177,7 +177,7 @@ index 874129a..22a2de8 100644
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
}
|
||||
@@ -1087,17 +1087,9 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1088,17 +1088,9 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
|
||||
@ -196,7 +196,7 @@ index 874129a..22a2de8 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1118,7 +1110,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1119,7 +1111,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
{
|
||||
state_cleanup(&cs->state);
|
||||
@ -205,7 +205,7 @@ index 874129a..22a2de8 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index a13fb54..990545d 100644
|
||||
index 1da2df4..5200f3e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -317,7 +317,7 @@ index a13fb54..990545d 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1939,7 +1917,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -1938,7 +1916,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
surface = surface_from_resource(texture->sub_resources[0]);
|
||||
@ -326,7 +326,7 @@ index a13fb54..990545d 100644
|
||||
return;
|
||||
|
||||
wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
|
||||
@@ -3328,6 +3306,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
@@ -3327,6 +3305,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -335,7 +335,7 @@ index a13fb54..990545d 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
|
||||
|
||||
@@ -3339,7 +3319,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3338,7 +3318,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -344,7 +344,7 @@ index a13fb54..990545d 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3348,8 +3328,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3347,8 +3327,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -355,7 +355,7 @@ index a13fb54..990545d 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3725,8 +3705,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3724,8 +3704,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -366,7 +366,7 @@ index a13fb54..990545d 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3952,20 +3932,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4105,20 +4085,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ index a13fb54..990545d 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4005,13 +3986,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4158,13 +4139,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -406,7 +406,7 @@ index a13fb54..990545d 100644
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4023,18 +4004,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4176,18 +4157,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -428,7 +428,7 @@ index a13fb54..990545d 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4391,10 +4373,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4540,10 +4522,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -440,7 +440,7 @@ index a13fb54..990545d 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4403,6 +4384,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4552,6 +4533,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -452,7 +452,7 @@ index a13fb54..990545d 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_surface_decref(device->onscreen_depth_stencil);
|
||||
@@ -4693,7 +4679,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4765,7 +4751,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -461,7 +461,7 @@ index a13fb54..990545d 100644
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4702,22 +4688,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4774,22 +4760,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -489,7 +489,7 @@ index a13fb54..990545d 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4808,17 +4793,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4877,17 +4862,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -511,7 +511,7 @@ index a13fb54..990545d 100644
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4981,7 +4966,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5050,7 +5035,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -521,7 +521,7 @@ index a13fb54..990545d 100644
|
||||
{
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index f2c2f42..c6a72fc 100644
|
||||
index bafe7dd..496d66f 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -611,7 +611,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@ -577,10 +577,10 @@ index f2c2f42..c6a72fc 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 5ba246e..4775ff9 100644
|
||||
index 7bcf102..5b19799 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1531,7 +1531,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -1552,7 +1552,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@ -590,10 +590,10 @@ index 5ba246e..4775ff9 100644
|
||||
const struct wined3d_shader_lconst *lconst;
|
||||
const char *prefix;
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 5b32528..1c401c4 100644
|
||||
index e9be51e..8cf853d 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -2411,7 +2411,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -2404,7 +2404,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
{
|
||||
@ -603,7 +603,7 @@ index 5b32528..1c401c4 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index b7d7f92..59f9fd8 100644
|
||||
index 3225aa6..02e972c 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -653,7 +653,7 @@ index b7d7f92..59f9fd8 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
gl_info->gl_ops.gl.p_glStencilMask(mask);
|
||||
@@ -1644,7 +1644,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
@@ -1650,7 +1650,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|
||||
|| state->render_states[WINED3D_RS_DEPTHBIAS])
|
||||
{
|
||||
@ -662,7 +662,7 @@ index b7d7f92..59f9fd8 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4542,7 +4542,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4543,7 +4543,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
|
||||
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -671,7 +671,7 @@ index b7d7f92..59f9fd8 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
|
||||
@@ -4720,7 +4720,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4721,7 +4721,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -680,7 +680,7 @@ index b7d7f92..59f9fd8 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4784,7 +4784,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4785,7 +4785,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -790,10 +790,10 @@ index 763a5f9..790d769 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index f415b56..1808153 100644
|
||||
index 07eee26..1b05f65 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3418,8 +3418,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3405,8 +3405,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
@ -804,7 +804,7 @@ index f415b56..1808153 100644
|
||||
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
|
||||
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 1ac5e7a..454cb21 100644
|
||||
index 5c06f89..c46227a 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -421,7 +421,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@ -817,10 +817,10 @@ index 1ac5e7a..454cb21 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 44ba7ad..ade92b2 100644
|
||||
index 0d4e878..c763330 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3514,7 +3514,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -3721,7 +3721,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = context->render_offscreen
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -829,7 +829,7 @@ index 44ba7ad..ade92b2 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? 2.0f : 0.0f;
|
||||
float z_offset = zenable ? -1.0f : 0.0f;
|
||||
@@ -4104,7 +4104,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -4311,7 +4311,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
unsigned int i;
|
||||
DWORD ttff;
|
||||
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
|
||||
@ -839,10 +839,10 @@ index 44ba7ad..ade92b2 100644
|
||||
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7f9436a..a19fabe 100644
|
||||
index bf5abcf..b96b9c9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1137,6 +1137,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1138,6 +1138,36 @@ struct wined3d_timestamp_query
|
||||
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -879,7 +879,7 @@ index 7f9436a..a19fabe 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1151,6 +1181,7 @@ struct wined3d_context
|
||||
@@ -1152,6 +1182,7 @@ struct wined3d_context
|
||||
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
@ -887,7 +887,7 @@ index 7f9436a..a19fabe 100644
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1252,12 +1283,6 @@ struct wined3d_context
|
||||
@@ -1253,12 +1284,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -900,7 +900,7 @@ index 7f9436a..a19fabe 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1941,7 +1966,7 @@ struct wined3d_stream_state
|
||||
@@ -1969,7 +1994,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -909,7 +909,7 @@ index 7f9436a..a19fabe 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2047,7 +2072,6 @@ struct wined3d_device
|
||||
@@ -2075,7 +2100,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -917,7 +917,7 @@ index 7f9436a..a19fabe 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2553,9 +2577,8 @@ struct wined3d_stateblock
|
||||
@@ -2583,9 +2607,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -929,7 +929,7 @@ index 7f9436a..a19fabe 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2568,7 +2591,6 @@ struct wined3d_cs
|
||||
@@ -2598,7 +2621,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
@ -938,5 +938,5 @@ index 7f9436a..a19fabe 100644
|
||||
|
||||
size_t data_size;
|
||||
--
|
||||
2.4.2
|
||||
2.5.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ede3d178fc2a2ddde4b50913afca7920472c83c5 Mon Sep 17 00:00:00 2001
|
||||
From 628ad3187b1534791c9cecab65d8a9f958dbf3f4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 2 Apr 2013 17:25:19 +0200
|
||||
Subject: wined3d: Pass the state to draw_primitive
|
||||
@ -15,7 +15,7 @@ Subject: wined3d: Pass the state to draw_primitive
|
||||
8 files changed, 29 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 50dbb2d..206e969 100644
|
||||
index 1f9a213..8d20f76 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -423,7 +423,7 @@ static inline void fixup_d3dcolor(DWORD *dst_color)
|
||||
@ -27,7 +27,7 @@ index 50dbb2d..206e969 100644
|
||||
* If we want that stuff to work on big endian machines too we have to consider more things
|
||||
*
|
||||
* 0xff000000: Alpha mask
|
||||
@@ -1184,11 +1184,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
@@ -1190,11 +1190,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
|
||||
dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE] || gl_info->supported[ARB_MAP_BUFFER_RANGE];
|
||||
|
||||
@ -42,10 +42,10 @@ index 50dbb2d..206e969 100644
|
||||
*/
|
||||
if (!gl_info->supported[ARB_VERTEX_BUFFER_OBJECT])
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 9be96dc..097e0e9 100644
|
||||
index 4d124c6..8ff8ebe 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2955,7 +2955,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
||||
@@ -2985,7 +2985,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
|
||||
{
|
||||
@ -54,7 +54,7 @@ index 9be96dc..097e0e9 100644
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3095,9 +3095,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
|
||||
@@ -3160,9 +3160,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -65,9 +65,9 @@ index 9be96dc..097e0e9 100644
|
||||
- const struct wined3d_state *state = &device->state;
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
const struct wined3d_fb_state *fb = &state->fb;
|
||||
unsigned int i, j;
|
||||
unsigned int i;
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 8f1a016..84007cc 100644
|
||||
index 8ab6685..7e1891f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -492,7 +492,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@ -80,10 +80,10 @@ index 8f1a016..84007cc 100644
|
||||
|
||||
return sizeof(*op);
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index f238fc0..abc4aee 100644
|
||||
index 8e4448d..ff10b64 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5329,7 +5329,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
|
||||
@@ -5487,7 +5487,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
|
||||
}
|
||||
|
||||
/* Helper functions for providing vertex data to opengl. The arrays are initialized based on
|
||||
@ -198,7 +198,7 @@ index b10bc45..529bcd6 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index e2fcc5d..be26f8f 100644
|
||||
index 02e972c..976847d 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -1126,7 +1126,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
|
||||
@ -210,7 +210,7 @@ index e2fcc5d..be26f8f 100644
|
||||
* Same happens with Vertexfog on transformed vertices
|
||||
*/
|
||||
new_source = FOGSOURCE_COORD;
|
||||
@@ -4190,7 +4190,7 @@ static void load_vertex_data(struct wined3d_context *context,
|
||||
@@ -4187,7 +4187,7 @@ static void load_vertex_data(struct wined3d_context *context,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -220,10 +220,10 @@ index e2fcc5d..be26f8f 100644
|
||||
*/
|
||||
WARN("unsupported blending in openGl\n");
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 3465299..dfa9ee4 100644
|
||||
index c763330..3aca4f2 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3647,7 +3647,7 @@ static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const
|
||||
@@ -3854,7 +3854,7 @@ static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const
|
||||
* check for pixel shaders, and the shader has to undo the default gl divide.
|
||||
*
|
||||
* A more serious problem occurs if the app passes 4 coordinates in, and the
|
||||
@ -233,7 +233,7 @@ index 3465299..dfa9ee4 100644
|
||||
default:
|
||||
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f9bb9d0..a8af32e 100644
|
||||
index 92d5490..cf9e88e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1010,8 +1010,9 @@ struct wined3d_stream_info
|
||||
@ -248,7 +248,7 @@ index f9bb9d0..a8af32e 100644
|
||||
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
|
||||
|
||||
#define eps 1e-8f
|
||||
@@ -1417,7 +1418,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
@@ -1422,7 +1423,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
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;
|
||||
@ -259,5 +259,5 @@ index f9bb9d0..a8af32e 100644
|
||||
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,
|
||||
--
|
||||
2.4.2
|
||||
2.5.0
|
||||
|
||||
|
@ -1565,7 +1565,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3124,11 +3204,19 @@
|
||||
@@ -3159,11 +3239,19 @@
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -1582,10 +1582,10 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
+ const struct StateEntry *state_table = context->state_table;
|
||||
+ const struct wined3d_fb_state *fb = state->fb;
|
||||
+#endif /* STAGING_CSMT */
|
||||
unsigned int i, j;
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
@@ -3160,12 +3248,17 @@
|
||||
@@ -3196,12 +3284,17 @@
|
||||
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
|
||||
{
|
||||
if (map & 1)
|
||||
@ -1603,7 +1603,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3269,7 +3362,11 @@
|
||||
@@ -3296,7 +3389,11 @@
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -4002,7 +4002,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3705,6 +4141,7 @@
|
||||
@@ -3707,6 +4143,7 @@
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect,
|
||||
struct wined3d_surface *dst_surface, const POINT *dst_point)
|
||||
{
|
||||
@ -4010,7 +4010,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
const struct wined3d_format *src_format = src_surface->resource.format;
|
||||
const struct wined3d_format *dst_format = dst_surface->resource.format;
|
||||
UINT update_w, update_h;
|
||||
@@ -3712,6 +4149,7 @@
|
||||
@@ -3714,6 +4151,7 @@
|
||||
RECT r, dst_rect;
|
||||
POINT p;
|
||||
|
||||
@ -4018,7 +4018,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n",
|
||||
device, src_surface, wine_dbgstr_rect(src_rect),
|
||||
dst_surface, wine_dbgstr_point(dst_point));
|
||||
@@ -3723,6 +4161,7 @@
|
||||
@@ -3725,6 +4163,7 @@
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -4026,7 +4026,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (src_format->id != dst_format->id)
|
||||
{
|
||||
WARN("Source and destination surfaces should have the same format.\n");
|
||||
@@ -3785,6 +4224,9 @@
|
||||
@@ -3787,6 +4226,9 @@
|
||||
wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point);
|
||||
|
||||
return WINED3D_OK;
|
||||
@ -4036,7 +4036,33 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
||||
@@ -3960,8 +4402,14 @@
|
||||
@@ -4000,7 +4442,11 @@
|
||||
&& src_rect.bottom == sub_resource->height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
+#if defined(STAGING_CSMT)
|
||||
wined3d_resource_load_location(&surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ surface_load_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
|
||||
wined3d_surface_upload_data(surface, gl_info, resource->format,
|
||||
@@ -4008,8 +4454,13 @@
|
||||
|
||||
context_release(context);
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ surface_validate_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+ surface_invalidate_location(surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
@@ -4040,8 +4491,14 @@
|
||||
rect = &r;
|
||||
}
|
||||
|
||||
@ -4051,7 +4077,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
@@ -3975,6 +4423,7 @@
|
||||
@@ -4055,6 +4512,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -4059,7 +4085,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return device->state.fb.render_targets[view_idx];
|
||||
}
|
||||
|
||||
@@ -3990,6 +4439,22 @@
|
||||
@@ -4070,6 +4528,22 @@
|
||||
{
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
struct wined3d_fb_state *fb = &device->state.fb;
|
||||
@ -4082,7 +4108,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4029,6 +4494,7 @@
|
||||
@@ -4109,6 +4583,7 @@
|
||||
}
|
||||
|
||||
|
||||
@ -4090,7 +4116,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
prev = fb->render_targets[view_idx];
|
||||
if (view == prev)
|
||||
return WINED3D_OK;
|
||||
@@ -4036,6 +4502,15 @@
|
||||
@@ -4116,6 +4591,15 @@
|
||||
if (view)
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
fb->render_targets[view_idx] = view;
|
||||
@ -4106,7 +4132,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4047,6 +4522,7 @@
|
||||
@@ -4127,6 +4611,7 @@
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -4114,7 +4140,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_fb_state *fb = &device->state.fb;
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
@@ -4071,6 +4547,79 @@
|
||||
@@ -4151,6 +4636,79 @@
|
||||
{
|
||||
TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
|
||||
device, x_hotspot, y_hotspot, cursor_image);
|
||||
@ -4194,7 +4220,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (cursor_image)
|
||||
{
|
||||
@@ -4106,8 +4655,16 @@
|
||||
@@ -4186,8 +4744,16 @@
|
||||
* release it after setting the cursor image. Windows doesn't
|
||||
* addref the set surface, so we can't do this either without
|
||||
* creating circular refcount dependencies. */
|
||||
@ -4211,7 +4237,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
device->cursorWidth = cursor_image->resource.width;
|
||||
device->cursorHeight = cursor_image->resource.height;
|
||||
@@ -4207,6 +4764,12 @@
|
||||
@@ -4287,6 +4853,12 @@
|
||||
else
|
||||
SetCursor(NULL);
|
||||
}
|
||||
@ -4224,7 +4250,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return oldVisible;
|
||||
}
|
||||
@@ -4217,8 +4780,10 @@
|
||||
@@ -4297,8 +4869,10 @@
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@ -4235,7 +4261,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
@@ -4226,6 +4791,7 @@
|
||||
@@ -4306,6 +4880,7 @@
|
||||
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
|
||||
{
|
||||
TRACE("Evicting %p.\n", resource);
|
||||
@ -4243,7 +4269,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_evict_resource(device->cs, resource);
|
||||
}
|
||||
}
|
||||
@@ -4246,6 +4812,37 @@
|
||||
@@ -4326,6 +4901,37 @@
|
||||
gl_info = context->gl_info;
|
||||
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
@ -4281,7 +4307,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
@@ -4266,6 +4863,7 @@
|
||||
@@ -4346,6 +4952,7 @@
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@ -4289,7 +4315,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
swapchain->num_contexts = 0;
|
||||
}
|
||||
|
||||
@@ -4285,6 +4883,14 @@
|
||||
@@ -4365,6 +4972,14 @@
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@ -4304,7 +4330,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4301,6 +4907,7 @@
|
||||
@@ -4381,6 +4996,7 @@
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -4312,7 +4338,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
@@ -4311,6 +4918,34 @@
|
||||
@@ -4391,6 +5007,34 @@
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
@ -4347,7 +4373,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4327,8 +4962,10 @@
|
||||
@@ -4407,8 +5051,10 @@
|
||||
unsigned int i;
|
||||
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p.\n", device, swapchain_desc, mode, callback);
|
||||
@ -4358,7 +4384,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
|
||||
{
|
||||
@@ -4344,9 +4981,21 @@
|
||||
@@ -4424,9 +5070,21 @@
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
device->logo_texture = NULL;
|
||||
}
|
||||
@ -4380,7 +4406,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4355,6 +5004,7 @@
|
||||
@@ -4435,6 +5093,7 @@
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -4388,7 +4414,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (reset_state)
|
||||
{
|
||||
state_unbind_resources(&device->state);
|
||||
@@ -4364,6 +5014,12 @@
|
||||
@@ -4444,6 +5103,12 @@
|
||||
{
|
||||
wined3d_surface_decref(device->cs->onscreen_depth_stencil);
|
||||
device->cs->onscreen_depth_stencil = NULL;
|
||||
@ -4401,7 +4427,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (reset_state)
|
||||
@@ -4376,6 +5032,7 @@
|
||||
@@ -4456,6 +5121,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -4409,7 +4435,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Free implicit resources and wait for the command stream before modifying
|
||||
* swapchain parameters. After modifying the swapchain parameters a new GL
|
||||
* context may be acquired by the worker thread. This causes problems in the
|
||||
@@ -4397,6 +5054,7 @@
|
||||
@@ -4477,6 +5143,7 @@
|
||||
}
|
||||
device->cs->ops->finish(device->cs);
|
||||
|
||||
@ -4417,7 +4443,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("New params:\n");
|
||||
TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width);
|
||||
TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height);
|
||||
@@ -4523,6 +5181,13 @@
|
||||
@@ -4603,6 +5270,13 @@
|
||||
swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
|
||||
return hr;
|
||||
|
||||
@ -4431,7 +4457,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (swapchain->desc.enable_auto_depth_stencil)
|
||||
{
|
||||
struct wined3d_resource_desc surface_desc;
|
||||
@@ -4560,6 +5225,13 @@
|
||||
@@ -4640,6 +5314,13 @@
|
||||
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
|
||||
}
|
||||
|
||||
@ -4445,7 +4471,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (swapchain->desc.backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface(
|
||||
surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)),
|
||||
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
|
||||
@@ -4580,12 +5252,20 @@
|
||||
@@ -4660,12 +5341,20 @@
|
||||
}
|
||||
wined3d_cs_emit_reset_state(device->cs);
|
||||
state_cleanup(&device->state);
|
||||
@ -4466,7 +4492,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4594,6 +5274,7 @@
|
||||
@@ -4674,6 +5363,7 @@
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -4474,7 +4500,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_state *state = &device->state;
|
||||
|
||||
wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, FALSE);
|
||||
@@ -4609,6 +5290,24 @@
|
||||
@@ -4689,6 +5379,24 @@
|
||||
state->scissor_rect.left = 0;
|
||||
state->scissor_rect.right = swapchain->desc.backbuffer_width;
|
||||
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
|
||||
@ -4499,7 +4525,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4684,6 +5383,10 @@
|
||||
@@ -4764,6 +5472,10 @@
|
||||
|
||||
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
|
||||
|
||||
@ -4510,7 +4536,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_RTYPE_SURFACE:
|
||||
@@ -4694,6 +5397,7 @@
|
||||
@@ -4774,6 +5486,7 @@
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -4518,7 +4544,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[i]) == surface)
|
||||
{
|
||||
ERR("Surface %p is still in use as render target %u.\n", surface, i);
|
||||
@@ -4705,6 +5409,19 @@
|
||||
@@ -4785,6 +5498,19 @@
|
||||
{
|
||||
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
|
||||
device->state.fb.depth_stencil = NULL;
|
||||
@ -4538,7 +4564,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4867,7 +5584,11 @@
|
||||
@@ -4947,7 +5673,11 @@
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -4550,7 +4576,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
&adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
{
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
@@ -4966,6 +5687,7 @@
|
||||
@@ -5046,6 +5776,7 @@
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -4558,7 +4584,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Context activation is done by the caller */
|
||||
struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
@@ -5019,3 +5741,4 @@
|
||||
@@ -5099,3 +5830,4 @@
|
||||
|
||||
wined3d_device_destroy_bo(device, context, bo);
|
||||
}
|
||||
@ -6001,7 +6027,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
|
||||
@@ -418,10 +433,16 @@
|
||||
@@ -421,10 +436,16 @@
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -6018,7 +6044,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -493,8 +514,15 @@
|
||||
@@ -496,8 +517,15 @@
|
||||
|
||||
void CDECL wined3d_texture_preload(struct wined3d_texture *texture)
|
||||
{
|
||||
@ -6034,7 +6060,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
|
||||
@@ -523,6 +551,7 @@
|
||||
@@ -526,6 +554,7 @@
|
||||
|
||||
if (texture->lod != lod)
|
||||
{
|
||||
@ -6042,7 +6068,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
@@ -530,6 +559,7 @@
|
||||
@@ -533,6 +562,7 @@
|
||||
device->cs->ops->finish(device->cs);
|
||||
}
|
||||
|
||||
@ -6050,7 +6076,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
texture->lod = lod;
|
||||
|
||||
texture->texture_rgb.base_level = ~0u;
|
||||
@@ -599,6 +629,7 @@
|
||||
@@ -602,6 +632,7 @@
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -6058,7 +6084,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
/*
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
{
|
||||
@@ -607,6 +638,7 @@
|
||||
@@ -610,6 +641,7 @@
|
||||
}
|
||||
*/
|
||||
|
||||
@ -6066,7 +6092,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
wined3d_cs_emit_set_color_key(device->cs, texture, flags, color_key);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -662,10 +694,14 @@
|
||||
@@ -665,10 +697,14 @@
|
||||
}
|
||||
|
||||
if (device->d3d_initialized)
|
||||
@ -6081,7 +6107,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
texture->resource.format = format;
|
||||
texture->resource.multisample_type = multisample_type;
|
||||
@@ -791,6 +827,7 @@
|
||||
@@ -794,6 +830,7 @@
|
||||
static void texture2d_sub_resource_load(struct wined3d_resource *sub_resource,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
@ -6089,7 +6115,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface_load(surface_from_resource(sub_resource), context, srgb);
|
||||
}
|
||||
|
||||
@@ -805,6 +842,19 @@
|
||||
@@ -808,6 +845,19 @@
|
||||
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
|
||||
context_release(context);
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
@ -6109,7 +6135,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
@@ -816,12 +866,25 @@
|
||||
@@ -819,12 +869,25 @@
|
||||
|
||||
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -6135,7 +6161,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
@@ -900,6 +963,7 @@
|
||||
@@ -903,6 +966,7 @@
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
@ -6143,7 +6169,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (surface->flags & (SFLAG_NONPOW2)
|
||||
|| texture->flags & WINED3D_TEXTURE_CONVERTED)
|
||||
{
|
||||
@@ -908,12 +972,26 @@
|
||||
@@ -911,12 +975,26 @@
|
||||
* WINED3D_TEXTURE_CONVERTED: The conversion destination memory is freed after loading the surface
|
||||
* heap_memory == NULL: Not defined in the extension. Seems to disable client storage effectively
|
||||
*/
|
||||
@ -6170,7 +6196,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface->flags |= SFLAG_CLIENT;
|
||||
mem = surface->resource.heap_memory;
|
||||
|
||||
@@ -983,6 +1061,7 @@
|
||||
@@ -986,6 +1064,7 @@
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
}
|
||||
|
||||
@ -6178,7 +6204,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
static void wined3d_texture_load_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
{
|
||||
ERR("Should not be called on textures.\n");
|
||||
@@ -1002,6 +1081,13 @@
|
||||
@@ -1005,6 +1084,13 @@
|
||||
wined3d_texture_unload,
|
||||
wined3d_texture_load_location_invalidated,
|
||||
wined3d_texture_load_location,
|
||||
@ -6192,7 +6218,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
@@ -1018,7 +1104,9 @@
|
||||
@@ -1021,7 +1107,9 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -6202,7 +6228,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1028,6 +1116,7 @@
|
||||
@@ -1031,6 +1119,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -6210,7 +6236,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1036,6 +1125,14 @@
|
||||
@@ -1039,6 +1128,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -6225,7 +6251,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1056,7 +1153,9 @@
|
||||
@@ -1059,7 +1156,9 @@
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
@ -6235,7 +6261,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1066,7 +1165,9 @@
|
||||
@@ -1069,7 +1168,9 @@
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
@ -6245,7 +6271,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1129,7 +1230,9 @@
|
||||
@@ -1132,7 +1233,9 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -6255,7 +6281,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1160,7 +1263,9 @@
|
||||
@@ -1163,7 +1266,9 @@
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
@ -6265,7 +6291,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1173,6 +1278,7 @@
|
||||
@@ -1176,6 +1281,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@ -6273,7 +6299,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1181,6 +1287,14 @@
|
||||
@@ -1184,6 +1290,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -6288,7 +6314,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1189,7 +1303,9 @@
|
||||
@@ -1192,7 +1306,9 @@
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -6298,7 +6324,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1275,12 +1391,25 @@
|
||||
@@ -1278,12 +1394,25 @@
|
||||
|
||||
static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -6324,7 +6350,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
@@ -1290,7 +1419,11 @@
|
||||
@@ -1293,7 +1422,11 @@
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
@ -6336,7 +6362,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
|
||||
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
|
||||
|
||||
@@ -1315,7 +1448,11 @@
|
||||
@@ -1318,7 +1451,11 @@
|
||||
void *mem = NULL;
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert
|
||||
@ -6348,7 +6374,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
{
|
||||
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);
|
||||
@@ -1362,6 +1499,7 @@
|
||||
@@ -1365,6 +1502,7 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -6356,7 +6382,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1370,6 +1508,14 @@
|
||||
@@ -1373,6 +1511,14 @@
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture);
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -6371,7 +6397,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1379,6 +1525,7 @@
|
||||
@@ -1382,6 +1528,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -6379,7 +6405,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1387,6 +1534,14 @@
|
||||
@@ -1390,6 +1537,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -6394,7 +6420,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1414,7 +1569,9 @@
|
||||
@@ -1417,7 +1572,9 @@
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@ -6404,7 +6430,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1424,7 +1581,9 @@
|
||||
@@ -1427,7 +1584,9 @@
|
||||
0, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -6414,7 +6440,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1501,6 +1660,9 @@
|
||||
@@ -1504,6 +1663,9 @@
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
|
@ -1,100 +0,0 @@
|
||||
From e6a6251091cdffd205827f5755622ad2b787aa0c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 9 Aug 2015 16:44:49 +0200
|
||||
Subject: winhttp: Raw request headers needs to be terminated using double
|
||||
\r\n.
|
||||
|
||||
---
|
||||
dlls/winhttp/request.c | 14 ++++++++------
|
||||
dlls/winhttp/tests/winhttp.c | 18 ++++++++++++++++++
|
||||
2 files changed, 26 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
|
||||
index 607b502..498df2b 100644
|
||||
--- a/dlls/winhttp/request.c
|
||||
+++ b/dlls/winhttp/request.c
|
||||
@@ -672,11 +672,8 @@ static BOOL query_headers( request_t *request, DWORD level, LPCWSTR name, LPVOID
|
||||
if (!(p = headers)) return FALSE;
|
||||
for (len = 0; *p; p++) if (*p != '\r') len++;
|
||||
|
||||
- if (!buffer || (len + 1) * sizeof(WCHAR) > *buflen)
|
||||
- {
|
||||
- len++;
|
||||
+ if (!buffer || len * sizeof(WCHAR) > *buflen)
|
||||
set_last_error( ERROR_INSUFFICIENT_BUFFER );
|
||||
- }
|
||||
else
|
||||
{
|
||||
for (p = headers, q = buffer; *p; p++, q++)
|
||||
@@ -688,8 +685,8 @@ static BOOL query_headers( request_t *request, DWORD level, LPCWSTR name, LPVOID
|
||||
p++; /* skip '\n' */
|
||||
}
|
||||
}
|
||||
- *q = 0;
|
||||
TRACE("returning data: %s\n", debugstr_wn(buffer, len));
|
||||
+ if (len) len--;
|
||||
ret = TRUE;
|
||||
}
|
||||
*buflen = len * sizeof(WCHAR);
|
||||
@@ -2155,7 +2152,7 @@ static BOOL read_reply( request_t *request )
|
||||
|
||||
buflen = MAX_REPLY_LEN;
|
||||
if (!read_line( request, buffer, &buflen )) return TRUE;
|
||||
- if (!*buffer) break;
|
||||
+ if (!*buffer) buflen = 1;
|
||||
|
||||
while (len - offset < buflen + crlf_len)
|
||||
{
|
||||
@@ -2164,6 +2161,11 @@ static BOOL read_reply( request_t *request )
|
||||
if (!(tmp = heap_realloc( raw_headers, len * sizeof(WCHAR) ))) return FALSE;
|
||||
request->raw_headers = raw_headers = tmp;
|
||||
}
|
||||
+ if (!*buffer)
|
||||
+ {
|
||||
+ memcpy( raw_headers + offset, crlf, sizeof(crlf) );
|
||||
+ break;
|
||||
+ }
|
||||
MultiByteToWideChar( CP_ACP, 0, buffer, buflen, raw_headers + offset, buflen );
|
||||
|
||||
if (!(header = parse_header( raw_headers + offset ))) break;
|
||||
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
|
||||
index cb462bb..3131dcf 100644
|
||||
--- a/dlls/winhttp/tests/winhttp.c
|
||||
+++ b/dlls/winhttp/tests/winhttp.c
|
||||
@@ -2126,8 +2126,11 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
||||
|
||||
static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
|
||||
{
|
||||
+ static const WCHAR test_header_end_clrf[] = {'\r','\n','\r','\n',0};
|
||||
+ static const WCHAR test_header_end_raw[] = {0,0};
|
||||
HINTERNET ses, con, req;
|
||||
char buffer[0x100];
|
||||
+ WCHAR buffer2[0x100];
|
||||
DWORD count, status, size, error, supported, first, target;
|
||||
BOOL ret;
|
||||
|
||||
@@ -2162,6 +2165,21 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
|
||||
ok(first == 0xdeadbeef, "got %x\n", first);
|
||||
ok(target == 0xdeadbeef, "got %x\n", target);
|
||||
|
||||
+ size = sizeof(buffer2);
|
||||
+ memset(buffer2, 0, sizeof(buffer2));
|
||||
+ ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, buffer2, &size, NULL);
|
||||
+ ok(ret, "failed to query for raw headers: %u\n", GetLastError());
|
||||
+ ok(memcmp(buffer2 + lstrlenW(buffer2) - 4, test_header_end_clrf, sizeof(test_header_end_clrf)) == 0,
|
||||
+ "WinHttpQueryHeaders returned invalid end of header string\n");
|
||||
+
|
||||
+ size = sizeof(buffer2);
|
||||
+ memset(buffer2, 0, sizeof(buffer2));
|
||||
+ ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS, NULL, buffer2, &size, NULL);
|
||||
+ ok(ret, "failed to query for raw headers: %u\n", GetLastError());
|
||||
+ ok(memcmp(buffer2 + (size / sizeof(WCHAR)) - 1, test_header_end_raw, sizeof(test_header_end_raw)) == 0,
|
||||
+ "WinHttpQueryHeaders returned invalid end of header string\n");
|
||||
+ ok(buffer2[(size / sizeof(WCHAR)) - 2] != 0, "String has too many NULL characters\n");
|
||||
+
|
||||
count = 0;
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = WinHttpReadData(req, buffer, sizeof buffer, &count);
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [35953] Winhttp raw request headers must be terminated using double \r\n
|
Loading…
x
Reference in New Issue
Block a user