mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Partially removed patches to fix handling of opening read-only files for FILE_DELETE_ON_CLOSE (accepted upstream).
This commit is contained in:
parent
0ce637dcda
commit
582e9666ed
@ -39,12 +39,11 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [7]:**
|
||||
**Bug fixes and features included in the next upcoming release [6]:**
|
||||
|
||||
* Add stub for D3DXFrameFind ([Wine Bug #38334](https://bugs.winehq.org/show_bug.cgi?id=38334))
|
||||
* Add stub for advapi32.ImpersonateAnonymousToken
|
||||
* Add stub for d3d11.D3D11CreateDeviceAndSwapChain ([Wine Bug #33153](https://bugs.winehq.org/show_bug.cgi?id=33153))
|
||||
* Fix check for texture levels in wined3d_device_update_texture ([Wine Bug #38048](https://bugs.winehq.org/show_bug.cgi?id=38048))
|
||||
* Fix regression caused by blacklisting supported OpenGL extensions ([Wine Bug #38480](https://bugs.winehq.org/show_bug.cgi?id=38480))
|
||||
* Ignore garbage after decoding gif lines ([Wine Bug #32227](https://bugs.winehq.org/show_bug.cgi?id=32227))
|
||||
* Support for FileFsFullSizeInformation information class
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -12,6 +12,7 @@ wine-staging (1.7.42) UNRELEASED; urgency=low
|
||||
* Removed patch to fix issues with invalid console handles for new processes (accepted upstream).
|
||||
* Removed patches to fix timezone information (accepted upstream).
|
||||
* Removed patch to recognize localhost as local machine in wbemprox (accepted upstream).
|
||||
* Partially removed patches to fix handling of opening read-only files for FILE_DELETE_ON_CLOSE (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 20 Apr 2015 15:55:51 +0200
|
||||
|
||||
wine-staging (1.7.41) unstable; urgency=low
|
||||
|
@ -231,7 +231,6 @@ patch_enable_all ()
|
||||
enable_wined3d_CSMT_Helper="$1"
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_Level_Count="$1"
|
||||
enable_wined3d_Multisampling="$1"
|
||||
enable_wined3d_Revert_PixelFormat="$1"
|
||||
enable_wined3d_UnhandledBlendFactor="$1"
|
||||
@ -770,9 +769,6 @@ patch_enable ()
|
||||
wined3d-DXTn)
|
||||
enable_wined3d_DXTn="$2"
|
||||
;;
|
||||
wined3d-Level_Count)
|
||||
enable_wined3d_Level_Count="$2"
|
||||
;;
|
||||
wined3d-Multisampling)
|
||||
enable_wined3d_Multisampling="$2"
|
||||
;;
|
||||
@ -1394,13 +1390,9 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_wined3d_DXTn" -gt 1; then
|
||||
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Level_Count" -gt 1; then
|
||||
abort "Patchset wined3d-Level_Count disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
enable_makedep_PARENTSPEC=1
|
||||
enable_ntdll_DllRedirects=1
|
||||
enable_wined3d_DXTn=1
|
||||
enable_wined3d_Level_Count=1
|
||||
fi
|
||||
|
||||
if test "$enable_dsound_EAX" -eq 1; then
|
||||
@ -2220,21 +2212,6 @@ if test "$enable_makedep_PARENTSPEC" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Level_Count
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38048] Fix check for texture levels in wined3d_device_update_texture
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/device.c
|
||||
# |
|
||||
if test "$enable_wined3d_Level_Count" -eq 1; then
|
||||
patch_apply wined3d-Level_Count/0001-wined3d-Fix-check-for-texture-levels-in-wined3d_devi.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Fix check for texture levels in wined3d_device_update_texture.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-DllRedirects
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -4160,10 +4137,8 @@ fi
|
||||
# | * dlls/kernel32/file.c, dlls/kernel32/tests/file.c, server/fd.c
|
||||
# |
|
||||
if test "$enable_server_Delete_On_Close" -eq 1; then
|
||||
patch_apply server-Delete_On_Close/0001-kernel32-tests-Add-tests-for-deleting-readonly-files.patch
|
||||
patch_apply server-Delete_On_Close/0002-server-Fix-handling-of-opening-read-only-files-with-.patch
|
||||
patch_apply server-Delete_On_Close/0001-server-Fix-handling-of-opening-read-only-files-with-.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for deleting readonly files with NtCreateFile.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "server: Fix handling of opening read-only files with FILE_DELETE_ON_CLOSE.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
@ -1,146 +0,0 @@
|
||||
From a3dc138dc397db75243c20acae021106731e2b07 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 11:22:51 +0200
|
||||
Subject: kernel32/tests: Add tests for deleting readonly files with
|
||||
NtCreateFile.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/file.c | 74 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 73 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index 99fffab..3a82364 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -28,10 +28,13 @@
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+#include "ntstatus.h"
|
||||
+#define WIN32_NO_STATUS
|
||||
#include "wine/test.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
+#include "winternl.h"
|
||||
#include "winnls.h"
|
||||
#include "fileapi.h"
|
||||
|
||||
@@ -48,6 +51,10 @@ static HRESULT (WINAPI *pCopyFile2)(PCWSTR,PCWSTR,COPYFILE2_EXTENDED_PARAMETERS*
|
||||
static HANDLE (WINAPI *pCreateFile2)(LPCWSTR, DWORD, DWORD, DWORD, CREATEFILE2_EXTENDED_PARAMETERS*);
|
||||
static DWORD (WINAPI *pGetFinalPathNameByHandleA)(HANDLE, LPSTR, DWORD, DWORD);
|
||||
static DWORD (WINAPI *pGetFinalPathNameByHandleW)(HANDLE, LPWSTR, DWORD, DWORD);
|
||||
+static NTSTATUS (WINAPI *pNtCreateFile)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK,
|
||||
+ PLARGE_INTEGER, ULONG, ULONG, ULONG, ULONG, PVOID, ULONG);
|
||||
+static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)(LPCWSTR, PUNICODE_STRING, PWSTR*, CURDIR*);
|
||||
+static NTSTATUS (WINAPI *pRtlAnsiStringToUnicodeString)(PUNICODE_STRING, PCANSI_STRING, BOOLEAN);
|
||||
|
||||
static const char filename[] = "testfile.xxx";
|
||||
static const char sillytext[] =
|
||||
@@ -72,8 +79,13 @@ struct test_list {
|
||||
|
||||
static void InitFunctionPointers(void)
|
||||
{
|
||||
+ HMODULE hntdll = GetModuleHandleA("ntdll");
|
||||
HMODULE hkernel32 = GetModuleHandleA("kernel32");
|
||||
|
||||
+ pNtCreateFile = (void *)GetProcAddress(hntdll, "NtCreateFile");
|
||||
+ pRtlDosPathNameToNtPathName_U = (void *)GetProcAddress(hntdll, "RtlDosPathNameToNtPathName_U");
|
||||
+ pRtlAnsiStringToUnicodeString = (void *)GetProcAddress(hntdll, "RtlAnsiStringToUnicodeString");
|
||||
+
|
||||
pFindFirstFileExA=(void*)GetProcAddress(hkernel32, "FindFirstFileExA");
|
||||
pReplaceFileA=(void*)GetProcAddress(hkernel32, "ReplaceFileA");
|
||||
pReplaceFileW=(void*)GetProcAddress(hkernel32, "ReplaceFileW");
|
||||
@@ -243,15 +255,36 @@ static void test__lclose( void )
|
||||
ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) );
|
||||
}
|
||||
|
||||
+/* helper function for test__lcreat */
|
||||
+static void get_nt_pathW(const char *name, UNICODE_STRING *nameW)
|
||||
+{
|
||||
+ UNICODE_STRING strW;
|
||||
+ ANSI_STRING str;
|
||||
+ NTSTATUS status;
|
||||
+ BOOLEAN ret;
|
||||
+ RtlInitAnsiString(&str, name);
|
||||
+
|
||||
+ status = pRtlAnsiStringToUnicodeString(&strW, &str, TRUE);
|
||||
+ ok(!status, "RtlAnsiStringToUnicodeString failed with %08x\n", status);
|
||||
+
|
||||
+ ret = pRtlDosPathNameToNtPathName_U(strW.Buffer, nameW, NULL, NULL);
|
||||
+ ok(ret, "RtlDosPathNameToNtPathName_U failed\n");
|
||||
+
|
||||
+ RtlFreeUnicodeString(&strW);
|
||||
+}
|
||||
|
||||
static void test__lcreat( void )
|
||||
{
|
||||
+ UNICODE_STRING filenameW;
|
||||
+ OBJECT_ATTRIBUTES attr;
|
||||
+ IO_STATUS_BLOCK io;
|
||||
HFILE filehandle;
|
||||
char buffer[10000];
|
||||
WIN32_FIND_DATAA search_results;
|
||||
char slashname[] = "testfi/";
|
||||
int err;
|
||||
- HANDLE find;
|
||||
+ HANDLE find, file;
|
||||
+ NTSTATUS status;
|
||||
BOOL ret;
|
||||
|
||||
filehandle = _lcreat( filename, 0 );
|
||||
@@ -287,12 +320,51 @@ static void test__lcreat( void )
|
||||
ok( INVALID_HANDLE_VALUE != find, "should be able to find file\n" );
|
||||
FindClose( find );
|
||||
|
||||
+ SetLastError( 0xdeadbeef );
|
||||
ok( 0 == DeleteFileA( filename ), "shouldn't be able to delete a readonly file\n" );
|
||||
+ ok( GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError() );
|
||||
|
||||
ok( SetFileAttributesA(filename, FILE_ATTRIBUTE_NORMAL ) != 0, "couldn't change attributes on file\n" );
|
||||
|
||||
ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file!\n" );
|
||||
|
||||
+ filehandle = _lcreat( filename, 1 ); /* readonly */
|
||||
+ ok( HFILE_ERROR != filehandle, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError() );
|
||||
+ ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen(sillytext) ),
|
||||
+ "_hwrite shouldn't be able to write never the less\n" );
|
||||
+ ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" );
|
||||
+
|
||||
+ find = FindFirstFileA( filename, &search_results );
|
||||
+ ok( INVALID_HANDLE_VALUE != find, "should be able to find file\n" );
|
||||
+ FindClose( find );
|
||||
+
|
||||
+ get_nt_pathW(filename, &filenameW);
|
||||
+ attr.Length = sizeof(attr);
|
||||
+ attr.RootDirectory = 0;
|
||||
+ attr.Attributes = OBJ_CASE_INSENSITIVE;
|
||||
+ attr.ObjectName = &filenameW;
|
||||
+ attr.SecurityDescriptor = NULL;
|
||||
+ attr.SecurityQualityOfService = NULL;
|
||||
+
|
||||
+ status = NtCreateFile( &file, GENERIC_READ | GENERIC_WRITE | DELETE, &attr, &io, NULL, 0,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
+ FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0 );
|
||||
+ ok( status == STATUS_ACCESS_DENIED, "expected STATUS_ACCESS_DENIED, got %08x\n", status );
|
||||
+ ok( GetFileAttributesA( filename ) != INVALID_FILE_ATTRIBUTES, "file was deleted\n" );
|
||||
+
|
||||
+ status = NtCreateFile( &file, DELETE, &attr, &io, NULL, 0,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
+ FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0 );
|
||||
+ todo_wine
|
||||
+ ok( status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08x\n", status );
|
||||
+ if (!status) CloseHandle( file );
|
||||
+ todo_wine
|
||||
+ ok( GetFileAttributesA( filename ) != INVALID_FILE_ATTRIBUTES, "file was deleted\n" );
|
||||
+ todo_wine
|
||||
+ ok( SetFileAttributesA(filename, FILE_ATTRIBUTE_NORMAL ) != 0, "couldn't change attributes on file\n" );
|
||||
+ todo_wine
|
||||
+ ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file!\n" );
|
||||
+
|
||||
filehandle = _lcreat( filename, 2 );
|
||||
ok( HFILE_ERROR != filehandle, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError( ) );
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6f4c5f44d93d38b4b71aa56fe2ad0eb4b31fbe7f Mon Sep 17 00:00:00 2001
|
||||
From d6491287dccc2e5cc97c160bce8c39555e478044 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 12:40:38 +0200
|
||||
Subject: server: Fix handling of opening read-only files with
|
||||
@ -25,25 +25,28 @@ index 006db1c..d16a0a1 100644
|
||||
FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0);
|
||||
if (status == STATUS_SUCCESS) status = NtClose(hFile);
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index 3a82364..0f5ac52 100644
|
||||
index 9a6e972..d54b45d 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -355,14 +355,10 @@ static void test__lcreat( void )
|
||||
@@ -355,17 +355,13 @@ static void test__lcreat( void )
|
||||
status = NtCreateFile( &file, DELETE, &attr, &io, NULL, 0,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0 );
|
||||
- todo_wine
|
||||
ok( status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08x\n", status );
|
||||
if (!status) CloseHandle( file );
|
||||
|
||||
RtlFreeUnicodeString( &filenameW );
|
||||
|
||||
- todo_wine
|
||||
ok( GetFileAttributesA( filename ) != INVALID_FILE_ATTRIBUTES, "file was deleted\n" );
|
||||
- todo_wine
|
||||
ok( SetFileAttributesA(filename, FILE_ATTRIBUTE_NORMAL ) != 0, "couldn't change attributes on file\n" );
|
||||
- todo_wine
|
||||
ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file!\n" );
|
||||
ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file\n" );
|
||||
|
||||
filehandle = _lcreat( filename, 2 );
|
||||
@@ -1718,14 +1714,12 @@ static void test_DeleteFileA( void )
|
||||
@@ -1721,14 +1717,12 @@ static void test_DeleteFileA( void )
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = DeleteFileA(temp_file);
|
||||
@ -59,10 +62,10 @@ index 3a82364..0f5ac52 100644
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 9a4aac4..ca68e49 100644
|
||||
index e3b722c..eeb3055 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -1858,6 +1858,16 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
|
||||
@@ -1832,6 +1832,16 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
|
||||
fd->cacheable = !inode->device->removable;
|
||||
list_add_head( &inode->open, &fd->inode_entry );
|
||||
|
@ -1,4 +1,3 @@
|
||||
Depends: wined3d-DXTn
|
||||
Depends: wined3d-Level_Count
|
||||
Depends: makedep-PARENTSPEC
|
||||
Depends: ntdll-DllRedirects
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e6796ac98c5263a0cec410ecaf7392f2a22ff4da Mon Sep 17 00:00:00 2001
|
||||
From 76b683f536da9f8465eca14ed1505dff8596bf5c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Apr 2013 11:50:09 +0200
|
||||
Subject: wined3d: Request a glFinish before modifying resources outside the cs
|
||||
@ -13,7 +13,7 @@ Subject: wined3d: Request a glFinish before modifying resources outside the cs
|
||||
6 files changed, 104 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index bc34050..d2c1d62 100644
|
||||
index df82bd2..e1c40bb 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -931,6 +931,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
|
||||
@ -51,10 +51,10 @@ index bc34050..d2c1d62 100644
|
||||
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
|
||||
* fill rate test seems to depend on this. When we map a buffer with
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 56cbcb6..8b24e73 100644
|
||||
index 410a431..b2d087d 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -65,6 +65,7 @@ enum wined3d_cs_op
|
||||
@@ -66,6 +66,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_PS_CONSTS_F,
|
||||
@ -62,7 +62,7 @@ index 56cbcb6..8b24e73 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -284,6 +285,11 @@ struct wined3d_cs_set_consts_f
|
||||
@@ -294,6 +295,11 @@ struct wined3d_cs_set_consts_f
|
||||
float constants[4];
|
||||
};
|
||||
|
||||
@ -74,7 +74,7 @@ index 56cbcb6..8b24e73 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -1250,6 +1256,29 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1363,6 +1369,29 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ index 56cbcb6..8b24e73 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1281,6 +1310,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1395,6 +1424,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
|
||||
@ -113,10 +113,10 @@ index 56cbcb6..8b24e73 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 2aba2a4..4d15518 100644
|
||||
index a6a88ae..7ab8fc0 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2737,6 +2737,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
@@ -2759,6 +2759,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -130,8 +130,8 @@ index 2aba2a4..4d15518 100644
|
||||
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
|
||||
@@ -3531,6 +3538,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
@@ -3572,6 +3579,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
++src_skip_levels;
|
||||
}
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
@ -144,7 +144,7 @@ index 2aba2a4..4d15518 100644
|
||||
/* Make sure that the destination texture is loaded. */
|
||||
context = context_acquire(device, NULL);
|
||||
wined3d_texture_load(dst_texture, context, FALSE);
|
||||
@@ -3768,6 +3782,13 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device,
|
||||
@@ -3818,6 +3832,13 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ index 2aba2a4..4d15518 100644
|
||||
return surface_upload_from_surface(dst_surface, dst_point, src_surface, src_rect);
|
||||
}
|
||||
|
||||
@@ -3870,6 +3891,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -3920,6 +3941,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
rect = &r;
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ index 2aba2a4..4d15518 100644
|
||||
resource = wined3d_texture_get_sub_resource(wined3d_texture_from_resource(resource), view->sub_resource_idx);
|
||||
|
||||
return surface_color_fill(surface_from_resource(resource), rect, color);
|
||||
@@ -4200,6 +4228,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4233,6 +4261,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@ -186,7 +186,7 @@ index 2aba2a4..4d15518 100644
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
@@ -4324,6 +4359,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4358,6 +4393,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p.\n", device, swapchain_desc, mode, callback);
|
||||
|
||||
@ -201,10 +201,10 @@ index 2aba2a4..4d15518 100644
|
||||
{
|
||||
ERR("Failed to get the first implicit swapchain.\n");
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 8486dc3..bf228d1 100644
|
||||
index 568f2cb..f379bbc 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -702,6 +702,13 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
|
||||
@@ -716,6 +716,13 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
|
||||
|
||||
flags = wined3d_resource_sanitize_map_flags(resource, flags);
|
||||
|
||||
@ -219,10 +219,10 @@ index 8486dc3..bf228d1 100644
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 8f8af4d..97450ef 100644
|
||||
index ef683f7..b81d137 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -5051,6 +5051,13 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5119,6 +5119,13 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
flags &= ~WINEDDBLT_DONOTWAIT;
|
||||
}
|
||||
|
||||
@ -237,10 +237,10 @@ index 8f8af4d..97450ef 100644
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d673a8f..ba0ce26 100644
|
||||
index 4f232be..6116a5a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2615,6 +2615,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
@@ -2663,6 +2663,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
@ -249,5 +249,5 @@ index d673a8f..ba0ce26 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.1.3
|
||||
2.3.5
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 2aa7d1f0d71e4d6a80b532f188d70dab9e955ed2 Mon Sep 17 00:00:00 2001
|
||||
From 59bc0b8c16cd0e7c3a1d899c140c88ccba9f99ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:33:48 +0200
|
||||
Subject: wined3d: Send update_texture calls through the CS
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 33 ++++++++++
|
||||
dlls/wined3d/device.c | 134 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/cs.c | 33 ++++++++++++
|
||||
dlls/wined3d/device.c | 114 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/wined3d_private.h | 4 ++
|
||||
3 files changed, 97 insertions(+), 74 deletions(-)
|
||||
3 files changed, 86 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index ad55b60..b10d67a 100644
|
||||
index 4210ddf..93e6e5f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -73,6 +73,7 @@ enum wined3d_cs_op
|
||||
@ -75,10 +75,10 @@ index ad55b60..b10d67a 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 138bc8d..e69e7ea 100644
|
||||
index 0e4e2ba..c55505e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3426,16 +3426,15 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3430,16 +3430,15 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
}
|
||||
|
||||
/* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */
|
||||
@ -98,7 +98,7 @@ index 138bc8d..e69e7ea 100644
|
||||
|
||||
if (src_volume->resource.format != dst_volume->resource.format)
|
||||
{
|
||||
@@ -3453,8 +3452,6 @@ static HRESULT device_update_volume(struct wined3d_device *device,
|
||||
@@ -3457,8 +3456,6 @@ static HRESULT device_update_volume(struct wined3d_device *device,
|
||||
if (FAILED(hr = wined3d_volume_map(src_volume, &src, NULL, WINED3D_MAP_READONLY)))
|
||||
return hr;
|
||||
|
||||
@ -107,7 +107,7 @@ index 138bc8d..e69e7ea 100644
|
||||
/* Only a prepare, since we're uploading the entire volume. */
|
||||
wined3d_texture_prepare_texture(dst_volume->container, context, FALSE);
|
||||
wined3d_texture_bind_and_dirtify(dst_volume->container, context, FALSE);
|
||||
@@ -3464,68 +3461,21 @@ static HRESULT device_update_volume(struct wined3d_device *device,
|
||||
@@ -3468,48 +3465,17 @@ static HRESULT device_update_volume(struct wined3d_device *device,
|
||||
wined3d_volume_upload_data(dst_volume, context, &data);
|
||||
wined3d_resource_invalidate_location(&dst_volume->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
|
||||
@ -125,7 +125,8 @@ index 138bc8d..e69e7ea 100644
|
||||
+ struct wined3d_texture *dst_texture)
|
||||
{
|
||||
- enum wined3d_resource_type type;
|
||||
- unsigned int level_count, i;
|
||||
+ enum wined3d_resource_type type = src_texture->resource.type;
|
||||
unsigned int level_count, i, j, src_size, dst_size, src_skip_levels = 0;
|
||||
- HRESULT hr;
|
||||
- struct wined3d_context *context;
|
||||
-
|
||||
@ -156,25 +157,20 @@ index 138bc8d..e69e7ea 100644
|
||||
- WARN("Source and destination have different types, returning WINED3DERR_INVALIDCALL.\n");
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
- }
|
||||
-
|
||||
- /* Check that source texture has equal or more levels than the destination texture. */
|
||||
- level_count = wined3d_texture_get_level_count(dst_texture);
|
||||
- if (wined3d_texture_get_level_count(src_texture) < level_count)
|
||||
- {
|
||||
- WARN("Source has fewer level counts then destination, returning WINED3DERR_INVALIDCALL.\n");
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
- }
|
||||
-
|
||||
|
||||
level_count = min(wined3d_texture_get_level_count(src_texture),
|
||||
wined3d_texture_get_level_count(dst_texture));
|
||||
@@ -3527,17 +3493,8 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
++src_skip_levels;
|
||||
}
|
||||
|
||||
- if (wined3d_settings.cs_multithreaded)
|
||||
- {
|
||||
- FIXME("Waiting for cs.\n");
|
||||
- wined3d_cs_emit_glfinish(device->cs);
|
||||
- device->cs->ops->finish(device->cs);
|
||||
- }
|
||||
+ enum wined3d_resource_type type = src_texture->resource.type;
|
||||
+ unsigned int level_count = wined3d_texture_get_level_count(dst_texture);
|
||||
+ unsigned int i;
|
||||
|
||||
-
|
||||
/* Make sure that the destination texture is loaded. */
|
||||
- context = context_acquire(device, NULL);
|
||||
wined3d_texture_load(dst_texture, context, FALSE);
|
||||
@ -182,9 +178,9 @@ index 138bc8d..e69e7ea 100644
|
||||
|
||||
/* Update every surface level of the texture. */
|
||||
switch (type)
|
||||
@@ -3539,12 +3489,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
{
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i));
|
||||
@@ -3552,12 +3509,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture,
|
||||
i + src_skip_levels));
|
||||
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i));
|
||||
- hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
|
||||
- if (FAILED(hr))
|
||||
@ -196,28 +192,29 @@ index 138bc8d..e69e7ea 100644
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3558,12 +3503,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
{
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i));
|
||||
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i));
|
||||
- hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- WARN("Failed to update surface, hr %#x.\n", hr);
|
||||
- return hr;
|
||||
- }
|
||||
+ surface_upload_from_surface(dst_surface, NULL, src_surface, NULL);
|
||||
@@ -3577,12 +3529,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
i * src_levels + j + src_skip_levels));
|
||||
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture,
|
||||
i * dst_levels + j));
|
||||
- hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- WARN("Failed to update surface, hr %#x.\n", hr);
|
||||
- return hr;
|
||||
- }
|
||||
+ surface_upload_from_surface(dst_surface, NULL, src_surface, NULL);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3572,13 +3512,14 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3592,14 +3539,15 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
{
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
- hr = device_update_volume(device,
|
||||
+ HRESULT hr;
|
||||
+ hr = device_update_volume(context,
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i)),
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(src_texture,
|
||||
i + src_skip_levels)),
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
@ -227,20 +224,19 @@ index 138bc8d..e69e7ea 100644
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3586,9 +3527,54 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3607,8 +3555,44 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
|
||||
default:
|
||||
FIXME("Unsupported texture type %#x.\n", type);
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
+}
|
||||
+
|
||||
+HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
+ struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture)
|
||||
+{
|
||||
+ enum wined3d_resource_type type;
|
||||
+ unsigned int level_count;
|
||||
+
|
||||
+ TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
+
|
||||
@ -249,8 +245,8 @@ index 138bc8d..e69e7ea 100644
|
||||
+ {
|
||||
+ WARN("Source and destination textures must be non-NULL, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ if (src_texture->resource.pool != WINED3D_POOL_SYSTEM_MEM)
|
||||
+ {
|
||||
+ WARN("Source texture not in WINED3D_POOL_SYSTEM_MEM, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@ -270,24 +266,15 @@ index 138bc8d..e69e7ea 100644
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ /* Check that source texture has equal or more levels than the destination texture. */
|
||||
+ level_count = wined3d_texture_get_level_count(dst_texture);
|
||||
+ if (wined3d_texture_get_level_count(src_texture) < level_count)
|
||||
+ {
|
||||
+ WARN("Source has fewer level counts then destination, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ wined3d_cs_emit_update_texture(device->cs, src_texture, dst_texture);
|
||||
+
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6beb2bd..6a14923 100644
|
||||
index d141e3e..fa9270a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2110,6 +2110,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
@@ -2114,6 +2114,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
|
||||
@ -296,7 +283,7 @@ index 6beb2bd..6a14923 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2699,6 +2701,8 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac
|
||||
@@ -2703,6 +2705,8 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac
|
||||
const RECT *src_rect, struct wined3d_surface *dst, const POINT *dst_point) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 18748f98ac34cb03bf13f9179ae7002393b3495e Mon Sep 17 00:00:00 2001
|
||||
From ef5650c2467c6902fca699bb05d0302a0f42d900 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 29 Aug 2013 22:25:14 +0200
|
||||
Subject: wined3d: Don't lock the src volume in device_update_volume
|
||||
@ -13,10 +13,10 @@ FIXME: Maybe merge this with the previous patch or change their order.
|
||||
1 file changed, 7 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 03202f7..0cfb10e 100644
|
||||
index c55505e..1db616d 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3426,12 +3426,10 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3430,12 +3430,10 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
}
|
||||
|
||||
/* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */
|
||||
@ -31,7 +31,7 @@ index 03202f7..0cfb10e 100644
|
||||
|
||||
TRACE("src_volume %p, dst_volume %p.\n",
|
||||
src_volume, dst_volume);
|
||||
@@ -3439,31 +3437,22 @@ static HRESULT device_update_volume(struct wined3d_context *context,
|
||||
@@ -3443,31 +3441,22 @@ static HRESULT device_update_volume(struct wined3d_context *context,
|
||||
if (src_volume->resource.format != dst_volume->resource.format)
|
||||
{
|
||||
FIXME("Source and destination formats do not match.\n");
|
||||
@ -67,14 +67,15 @@ index 03202f7..0cfb10e 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller */
|
||||
@@ -3512,15 +3501,9 @@ void device_exec_update_texture(struct wined3d_context *context, struct wined3d_
|
||||
@@ -3539,16 +3528,10 @@ void device_exec_update_texture(struct wined3d_context *context, struct wined3d_
|
||||
{
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
- HRESULT hr;
|
||||
- hr = device_update_volume(context,
|
||||
+ device_update_volume(context,
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i)),
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(src_texture,
|
||||
i + src_skip_levels)),
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)));
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
|
@ -1099,7 +1099,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3293,7 +3293,11 @@
|
||||
@@ -3298,7 +3298,11 @@
|
||||
float y_offset = context->render_offscreen
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -1111,7 +1111,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
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;
|
||||
@@ -3416,6 +3420,7 @@
|
||||
@@ -3421,6 +3425,7 @@
|
||||
/* case WINED3D_TTFF_COUNT1: Won't ever get here. */
|
||||
case WINED3D_TTFF_COUNT2:
|
||||
mat._13 = mat._23 = mat._33 = mat._43 = 0.0f;
|
||||
@ -1119,7 +1119,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
/* OpenGL divides the first 3 vertex coord by the 4th by default,
|
||||
* which is essentially the same as D3DTTFF_PROJECTED. Make sure that
|
||||
* the 4th coord evaluates to 1.0 to eliminate that.
|
||||
@@ -3428,6 +3433,20 @@
|
||||
@@ -3433,6 +3438,20 @@
|
||||
* A more serious problem occurs if the app passes 4 coordinates in, and the
|
||||
* 4th is != 1.0(opengl default). This would have to be fixed in draw_strided_slow
|
||||
* or a replacement shader. */
|
||||
@ -1140,7 +1140,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
default:
|
||||
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
|
||||
}
|
||||
@@ -3787,7 +3806,11 @@
|
||||
@@ -3792,7 +3811,11 @@
|
||||
unsigned int i;
|
||||
DWORD ttff;
|
||||
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
|
||||
@ -2290,7 +2290,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function prototypes
|
||||
@@ -3176,7 +3402,9 @@
|
||||
@@ -3177,7 +3403,9 @@
|
||||
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
|
||||
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
|
||||
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;
|
||||
@ -3767,10 +3767,10 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
static void device_update_volume(struct wined3d_context *context,
|
||||
struct wined3d_volume *src_volume, struct wined3d_volume *dst_volume)
|
||||
{
|
||||
@@ -3432,6 +3737,101 @@
|
||||
|
||||
/* Make sure that the destination texture is loaded. */
|
||||
wined3d_texture_load(dst_texture, context, FALSE);
|
||||
@@ -3428,6 +3733,88 @@
|
||||
{
|
||||
enum wined3d_resource_type type = src_texture->resource.type;
|
||||
unsigned int level_count, i, j, src_size, dst_size, src_skip_levels = 0;
|
||||
+#else /* STAGING_CSMT */
|
||||
+static HRESULT device_update_volume(struct wined3d_device *device,
|
||||
+ struct wined3d_volume *src_volume, struct wined3d_volume *dst_volume)
|
||||
@ -3821,7 +3821,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
+ struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture)
|
||||
+{
|
||||
+ enum wined3d_resource_type type;
|
||||
+ unsigned int level_count, i;
|
||||
+ unsigned int level_count, i, j, src_size, dst_size, src_skip_levels = 0;
|
||||
+ HRESULT hr;
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
@ -3852,16 +3852,17 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
+ WARN("Source and destination have different types, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ /* Check that source texture has equal or more levels than the destination texture. */
|
||||
+ level_count = wined3d_texture_get_level_count(dst_texture);
|
||||
+ if (wined3d_texture_get_level_count(src_texture) < level_count)
|
||||
+ {
|
||||
+ WARN("Source has fewer level counts then destination, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ /* Make sure that the destination texture is loaded. */
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
level_count = min(wined3d_texture_get_level_count(src_texture),
|
||||
wined3d_texture_get_level_count(dst_texture));
|
||||
@@ -3446,7 +3833,13 @@
|
||||
}
|
||||
|
||||
/* Make sure that the destination texture is loaded. */
|
||||
+#if defined(STAGING_CSMT)
|
||||
wined3d_texture_load(dst_texture, context, FALSE);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ context = context_acquire(device, NULL);
|
||||
+ wined3d_texture_load(dst_texture, context, FALSE);
|
||||
+ context_release(context);
|
||||
@ -3869,9 +3870,9 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Update every surface level of the texture. */
|
||||
switch (type)
|
||||
@@ -3445,7 +3845,16 @@
|
||||
{
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i));
|
||||
@@ -3461,7 +3854,16 @@
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture,
|
||||
i + src_skip_levels));
|
||||
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i));
|
||||
+#if defined(STAGING_CSMT)
|
||||
surface_upload_from_surface(dst_surface, NULL, src_surface, NULL);
|
||||
@ -3886,38 +3887,39 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3459,7 +3868,16 @@
|
||||
{
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i));
|
||||
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i));
|
||||
@@ -3481,7 +3883,16 @@
|
||||
i * src_levels + j + src_skip_levels));
|
||||
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture,
|
||||
i * dst_levels + j));
|
||||
+#if defined(STAGING_CSMT)
|
||||
surface_upload_from_surface(dst_surface, NULL, src_surface, NULL);
|
||||
surface_upload_from_surface(dst_surface, NULL, src_surface, NULL);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ WARN("Failed to update surface, hr %#x.\n", hr);
|
||||
+ return hr;
|
||||
+ }
|
||||
+ hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ WARN("Failed to update surface, hr %#x.\n", hr);
|
||||
+ return hr;
|
||||
+ }
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3468,6 +3886,7 @@
|
||||
@@ -3491,6 +3902,7 @@
|
||||
{
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
+#if defined(STAGING_CSMT)
|
||||
device_update_volume(context,
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i)),
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)));
|
||||
@@ -3524,6 +3943,24 @@
|
||||
volume_from_resource(wined3d_texture_get_sub_resource(src_texture,
|
||||
i + src_skip_levels)),
|
||||
@@ -3539,6 +3951,25 @@
|
||||
}
|
||||
|
||||
wined3d_cs_emit_update_texture(device->cs, src_texture, dst_texture);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ hr = device_update_volume(device,
|
||||
+ volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i)),
|
||||
+ volume_from_resource(wined3d_texture_get_sub_resource(src_texture,
|
||||
+ i + src_skip_levels)),
|
||||
+ volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)));
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
@ -3936,7 +3938,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -3586,8 +4023,13 @@
|
||||
@@ -3601,8 +4032,13 @@
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -3950,7 +3952,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3684,6 +4126,7 @@
|
||||
@@ -3699,6 +4135,7 @@
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect,
|
||||
struct wined3d_surface *dst_surface, const POINT *dst_point)
|
||||
{
|
||||
@ -3958,7 +3960,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;
|
||||
@@ -3691,6 +4134,7 @@
|
||||
@@ -3706,6 +4143,7 @@
|
||||
RECT r, dst_rect;
|
||||
POINT p;
|
||||
|
||||
@ -3966,7 +3968,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));
|
||||
@@ -3702,6 +4146,7 @@
|
||||
@@ -3717,6 +4155,7 @@
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -3974,7 +3976,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");
|
||||
@@ -3764,6 +4209,9 @@
|
||||
@@ -3779,6 +4218,9 @@
|
||||
wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point);
|
||||
|
||||
return WINED3D_OK;
|
||||
@ -3984,7 +3986,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
||||
@@ -3865,8 +4313,14 @@
|
||||
@@ -3880,8 +4322,14 @@
|
||||
rect = &r;
|
||||
}
|
||||
|
||||
@ -3999,7 +4001,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,
|
||||
@@ -3880,6 +4334,7 @@
|
||||
@@ -3895,6 +4343,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -4007,7 +4009,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return device->state.fb.render_targets[view_idx];
|
||||
}
|
||||
|
||||
@@ -3895,6 +4350,22 @@
|
||||
@@ -3910,6 +4359,22 @@
|
||||
{
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
struct wined3d_fb_state *fb = &device->state.fb;
|
||||
@ -4030,7 +4032,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);
|
||||
@@ -3934,6 +4405,7 @@
|
||||
@@ -3949,6 +4414,7 @@
|
||||
}
|
||||
|
||||
|
||||
@ -4038,7 +4040,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;
|
||||
@@ -3941,6 +4413,15 @@
|
||||
@@ -3956,6 +4422,15 @@
|
||||
if (view)
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
fb->render_targets[view_idx] = view;
|
||||
@ -4054,7 +4056,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. */
|
||||
@@ -3952,6 +4433,7 @@
|
||||
@@ -3967,6 +4442,7 @@
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -4062,7 +4064,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;
|
||||
|
||||
@@ -3976,6 +4458,79 @@
|
||||
@@ -3991,6 +4467,79 @@
|
||||
{
|
||||
TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
|
||||
device, x_hotspot, y_hotspot, cursor_image);
|
||||
@ -4142,7 +4144,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (cursor_image)
|
||||
{
|
||||
@@ -4011,8 +4566,16 @@
|
||||
@@ -4026,8 +4575,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. */
|
||||
@ -4159,7 +4161,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;
|
||||
@@ -4112,6 +4675,12 @@
|
||||
@@ -4127,6 +4684,12 @@
|
||||
else
|
||||
SetCursor(NULL);
|
||||
}
|
||||
@ -4172,7 +4174,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return oldVisible;
|
||||
}
|
||||
@@ -4122,8 +4691,10 @@
|
||||
@@ -4137,8 +4700,10 @@
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@ -4183,7 +4185,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);
|
||||
@@ -4131,6 +4702,7 @@
|
||||
@@ -4146,6 +4711,7 @@
|
||||
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
|
||||
{
|
||||
TRACE("Evicting %p.\n", resource);
|
||||
@ -4191,7 +4193,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_evict_resource(device->cs, resource);
|
||||
}
|
||||
}
|
||||
@@ -4151,6 +4723,37 @@
|
||||
@@ -4166,6 +4732,37 @@
|
||||
gl_info = context->gl_info;
|
||||
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
@ -4229,7 +4231,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
@@ -4171,6 +4774,7 @@
|
||||
@@ -4186,6 +4783,7 @@
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@ -4237,7 +4239,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
swapchain->num_contexts = 0;
|
||||
}
|
||||
|
||||
@@ -4190,6 +4794,14 @@
|
||||
@@ -4205,6 +4803,14 @@
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@ -4252,7 +4254,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,
|
||||
@@ -4206,6 +4818,7 @@
|
||||
@@ -4221,6 +4827,7 @@
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -4260,7 +4262,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))
|
||||
{
|
||||
@@ -4216,6 +4829,34 @@
|
||||
@@ -4231,6 +4838,34 @@
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
@ -4295,7 +4297,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4236,8 +4877,10 @@
|
||||
@@ -4251,8 +4886,10 @@
|
||||
unsigned int i;
|
||||
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p.\n", device, swapchain_desc, mode, callback);
|
||||
@ -4306,7 +4308,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
|
||||
{
|
||||
@@ -4253,9 +4896,21 @@
|
||||
@@ -4268,9 +4905,21 @@
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
device->logo_texture = NULL;
|
||||
}
|
||||
@ -4328,7 +4330,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4264,6 +4919,7 @@
|
||||
@@ -4279,6 +4928,7 @@
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -4336,7 +4338,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (reset_state)
|
||||
{
|
||||
state_unbind_resources(&device->state);
|
||||
@@ -4273,6 +4929,12 @@
|
||||
@@ -4288,6 +4938,12 @@
|
||||
{
|
||||
wined3d_surface_decref(device->cs->onscreen_depth_stencil);
|
||||
device->cs->onscreen_depth_stencil = NULL;
|
||||
@ -4349,7 +4351,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (reset_state)
|
||||
@@ -4285,6 +4947,7 @@
|
||||
@@ -4300,6 +4956,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -4357,7 +4359,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
|
||||
@@ -4306,6 +4969,7 @@
|
||||
@@ -4321,6 +4978,7 @@
|
||||
}
|
||||
device->cs->ops->finish(device->cs);
|
||||
|
||||
@ -4365,7 +4367,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Is it necessary to recreate the gl context? Actually every setting can be changed
|
||||
* on an existing gl context, so there's no real need for recreation.
|
||||
*
|
||||
@@ -4447,6 +5111,13 @@
|
||||
@@ -4462,6 +5120,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -4379,7 +4381,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;
|
||||
@@ -4484,6 +5155,13 @@
|
||||
@@ -4499,6 +5164,13 @@
|
||||
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
|
||||
}
|
||||
|
||||
@ -4393,7 +4395,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)))
|
||||
@@ -4566,12 +5244,20 @@
|
||||
@@ -4581,12 +5253,20 @@
|
||||
}
|
||||
wined3d_cs_emit_reset_state(device->cs);
|
||||
state_cleanup(&device->state);
|
||||
@ -4414,7 +4416,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;
|
||||
@@ -4580,6 +5266,7 @@
|
||||
@@ -4595,6 +5275,7 @@
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -4422,7 +4424,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);
|
||||
@@ -4595,6 +5282,24 @@
|
||||
@@ -4610,6 +5291,24 @@
|
||||
state->scissor_rect.left = 0;
|
||||
state->scissor_rect.right = swapchain->desc.backbuffer_width;
|
||||
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
|
||||
@ -4447,7 +4449,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4673,6 +5378,10 @@
|
||||
@@ -4688,6 +5387,10 @@
|
||||
|
||||
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
|
||||
|
||||
@ -4458,7 +4460,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_RTYPE_SURFACE:
|
||||
@@ -4683,6 +5392,7 @@
|
||||
@@ -4698,6 +5401,7 @@
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -4466,7 +4468,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);
|
||||
@@ -4694,6 +5404,19 @@
|
||||
@@ -4709,6 +5413,19 @@
|
||||
{
|
||||
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
|
||||
device->state.fb.depth_stencil = NULL;
|
||||
@ -4486,7 +4488,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4856,7 +5579,11 @@
|
||||
@@ -4871,7 +5588,11 @@
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -4498,7 +4500,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);
|
||||
@@ -4955,6 +5682,7 @@
|
||||
@@ -4970,6 +5691,7 @@
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -4506,7 +4508,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,
|
||||
@@ -5008,3 +5736,4 @@
|
||||
@@ -5023,3 +5745,4 @@
|
||||
|
||||
wined3d_device_destroy_bo(device, context, bo);
|
||||
}
|
||||
@ -9078,7 +9080,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -1859,7 +1859,11 @@
|
||||
@@ -1872,7 +1872,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -9090,7 +9092,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, shader->output_signature.elements);
|
||||
HeapFree(GetProcessHeap(), 0, shader->input_signature.elements);
|
||||
@@ -2116,10 +2120,16 @@
|
||||
@@ -2129,10 +2133,16 @@
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -9107,7 +9109,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -2394,7 +2404,11 @@
|
||||
@@ -2407,7 +2417,11 @@
|
||||
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])
|
||||
{
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 9d415a0b7671c0ab067f344ab7c6cb8520b744ff Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 27 Apr 2015 01:20:38 +0200
|
||||
Subject: wined3d: Fix check for texture levels in
|
||||
wined3d_device_update_texture.
|
||||
|
||||
Based on analysis by Sergey Isakov.
|
||||
---
|
||||
dlls/wined3d/device.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 4954d00..f435739 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3561,11 +3561,11 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- /* Check that both textures have the identical numbers of levels. */
|
||||
- level_count = wined3d_texture_get_level_count(src_texture);
|
||||
- if (wined3d_texture_get_level_count(dst_texture) != level_count)
|
||||
+ /* Check that source texture has equal or more levels than the destination texture. */
|
||||
+ level_count = wined3d_texture_get_level_count(dst_texture);
|
||||
+ if (wined3d_texture_get_level_count(src_texture) < level_count)
|
||||
{
|
||||
- WARN("Source and destination have different level counts, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ WARN("Source has fewer level counts then destination, returning WINED3DERR_INVALIDCALL.\n");
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [38048] Fix check for texture levels in wined3d_device_update_texture
|
Loading…
x
Reference in New Issue
Block a user