mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 1cc93e3f05bce5ae9758fad44f69f44e1462d81b.
This commit is contained in:
parent
4136b55f1c
commit
5b58419a0e
@ -1,81 +1,52 @@
|
||||
From 0f19391f2d2b5478137635a66a560bb9e097075a Mon Sep 17 00:00:00 2001
|
||||
From aefdbc0fabb66052164ecd45fecfb0b947a130ac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Apr 2016 01:02:34 +0200
|
||||
Subject: uiautomationcore: Add dll and stub some functions.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/uiautomationcore/Makefile.in | 5 ++
|
||||
dlls/uiautomationcore/main.c | 117 ++++++++++++++++++++++++++++
|
||||
dlls/uiautomationcore/uiautomationcore.spec | 99 +++++++++++++++++++++++
|
||||
include/uiautomationcoreapi.h | 16 ++++
|
||||
5 files changed, 238 insertions(+)
|
||||
create mode 100644 dlls/uiautomationcore/Makefile.in
|
||||
create mode 100644 dlls/uiautomationcore/main.c
|
||||
create mode 100644 dlls/uiautomationcore/uiautomationcore.spec
|
||||
dlls/uiautomationcore/Makefile.in | 1 +
|
||||
dlls/uiautomationcore/uia_main.c | 89 ++++++++++++++++++++++++++++-
|
||||
dlls/uiautomationcore/uiautomationcore.spec | 14 +++--
|
||||
include/uiautomationcoreapi.h | 16 ++++++
|
||||
4 files changed, 114 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4cfcdb1..9e8bbb9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3314,6 +3314,7 @@ WINE_CONFIG_TEST(dlls/twain_32/tests)
|
||||
WINE_CONFIG_DLL(typelib.dll16,enable_win16)
|
||||
WINE_CONFIG_DLL(ucrtbase,,[implib])
|
||||
WINE_CONFIG_TEST(dlls/ucrtbase/tests)
|
||||
+WINE_CONFIG_DLL(uiautomationcore)
|
||||
WINE_CONFIG_DLL(unicows,,[implib])
|
||||
WINE_CONFIG_DLL(updspapi)
|
||||
WINE_CONFIG_DLL(url,,[implib])
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000..bd6f9d6
|
||||
--- /dev/null
|
||||
index 78d6254a015..029fc2e4995 100644
|
||||
--- a/dlls/uiautomationcore/Makefile.in
|
||||
+++ b/dlls/uiautomationcore/Makefile.in
|
||||
@@ -0,0 +1,5 @@
|
||||
+MODULE = uiautomationcore.dll
|
||||
@@ -1,4 +1,5 @@
|
||||
MODULE = uiautomationcore.dll
|
||||
+IMPORTS = uuid
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ main.c
|
||||
diff --git a/dlls/uiautomationcore/main.c b/dlls/uiautomationcore/main.c
|
||||
new file mode 100644
|
||||
index 0000000..71fe84c
|
||||
--- /dev/null
|
||||
+++ b/dlls/uiautomationcore/main.c
|
||||
@@ -0,0 +1,117 @@
|
||||
+/*
|
||||
+ * uiautomationcore API
|
||||
+ *
|
||||
|
||||
C_SRCS = \
|
||||
uia_main.c
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index 994d8e6080b..f1429faeff9 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
+ * Copyright 2016 Michael Müller
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+
|
||||
* Copyright 2017 Jacek Caban for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -16,7 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
-#include "uiautomationcore.h"
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+#define COBJMACROS
|
||||
+#include "uiautomationcoreapi.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(uiautomation);
|
||||
+
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -37,11 +42,91 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, void *lpv)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static HRESULT WINAPI dummy_QueryInterface(IUnknown *iface, REFIID iid, void **ppv)
|
||||
+{
|
||||
+ TRACE("(%p, %s, %p)\n", iface, debugstr_guid(iid), ppv);
|
||||
@ -115,12 +86,18 @@ index 0000000..71fe84c
|
||||
+
|
||||
+static IUnknown dummy = { &dummy_Vtbl };
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * UiaLookupId (uiautomationcore.@)
|
||||
+ */
|
||||
+int WINAPI UiaLookupId(AutomationIdentifierType type, const GUID *guid)
|
||||
+{
|
||||
+ FIXME("(%d, %s)\n", type, debugstr_guid(guid));
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * UiaGetReservedMixedAttributeValue (uiautomationcore.@)
|
||||
+ */
|
||||
+HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
|
||||
+{
|
||||
+ FIXME("(%p): stub\n", value);
|
||||
@ -129,6 +106,9 @@ index 0000000..71fe84c
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * UiaGetReservedNotSupportedValue (uiautomationcore.@)
|
||||
+ */
|
||||
+HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value)
|
||||
+{
|
||||
+ FIXME("(%p): stub\n", value);
|
||||
@ -137,6 +117,9 @@ index 0000000..71fe84c
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * UiaReturnRawElementProvider (uiautomationcore.@)
|
||||
+ */
|
||||
+LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wparam, LPARAM lparam,
|
||||
+ IRawElementProviderSimple *provider)
|
||||
+{
|
||||
@ -144,129 +127,68 @@ index 0000000..71fe84c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
+{
|
||||
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
|
||||
+
|
||||
+ switch (reason)
|
||||
+ {
|
||||
+ case DLL_WINE_PREATTACH:
|
||||
+ return FALSE; /* prefer native version */
|
||||
+ case DLL_PROCESS_ATTACH:
|
||||
+ DisableThreadLibraryCalls(instance);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
/***********************************************************************
|
||||
* UiaClientsAreListening (uiautomationcore.@)
|
||||
*/
|
||||
BOOL WINAPI UiaClientsAreListening(void)
|
||||
{
|
||||
- FIXME("()\n");
|
||||
+ FIXME("(): stub\n");
|
||||
return FALSE;
|
||||
}
|
||||
diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec
|
||||
new file mode 100644
|
||||
index 0000000..321cd06
|
||||
--- /dev/null
|
||||
index 3026001b6b7..221711c41d2 100644
|
||||
--- a/dlls/uiautomationcore/uiautomationcore.spec
|
||||
+++ b/dlls/uiautomationcore/uiautomationcore.spec
|
||||
@@ -0,0 +1,99 @@
|
||||
+@ stub DllCanUnloadNow
|
||||
+@ stub DllGetClassObject
|
||||
+@ stub DllRegisterServer
|
||||
+@ stub DllUnregisterServer
|
||||
+@ stub DockPattern_SetDockPosition
|
||||
+@ stub ExpandCollapsePattern_Collapse
|
||||
+@ stub ExpandCollapsePattern_Expand
|
||||
+@ stub GridPattern_GetItem
|
||||
+@ stub InvokePattern_Invoke
|
||||
+@ stub ItemContainerPattern_FindItemByProperty
|
||||
+@ stub LegacyIAccessiblePattern_DoDefaultAction
|
||||
+@ stub LegacyIAccessiblePattern_GetIAccessible
|
||||
+@ stub LegacyIAccessiblePattern_Select
|
||||
+@ stub LegacyIAccessiblePattern_SetValue
|
||||
+@ stub MultipleViewPattern_GetViewName
|
||||
+@ stub MultipleViewPattern_SetCurrentView
|
||||
+@ stub RangeValuePattern_SetValue
|
||||
+@ stub ScrollItemPattern_ScrollIntoView
|
||||
+@ stub ScrollPattern_Scroll
|
||||
+@ stub ScrollPattern_SetScrollPercent
|
||||
+@ stub SelectionItemPattern_AddToSelection
|
||||
+@ stub SelectionItemPattern_RemoveFromSelection
|
||||
+@ stub SelectionItemPattern_Select
|
||||
+@ stub SynchronizedInputPattern_Cancel
|
||||
+@ stub SynchronizedInputPattern_StartListening
|
||||
+@ stub TextPattern_GetSelection
|
||||
+@ stub TextPattern_GetVisibleRanges
|
||||
+@ stub TextPattern_RangeFromChild
|
||||
+@ stub TextPattern_RangeFromPoint
|
||||
+@ stub TextPattern_get_DocumentRange
|
||||
+@ stub TextPattern_get_SupportedTextSelection
|
||||
+@ stub TextRange_AddToSelection
|
||||
+@ stub TextRange_Clone
|
||||
+@ stub TextRange_Compare
|
||||
+@ stub TextRange_CompareEndpoints
|
||||
+@ stub TextRange_ExpandToEnclosingUnit
|
||||
+@ stub TextRange_FindAttribute
|
||||
+@ stub TextRange_FindText
|
||||
+@ stub TextRange_GetAttributeValue
|
||||
+@ stub TextRange_GetBoundingRectangles
|
||||
+@ stub TextRange_GetChildren
|
||||
+@ stub TextRange_GetEnclosingElement
|
||||
+@ stub TextRange_GetText
|
||||
+@ stub TextRange_Move
|
||||
+@ stub TextRange_MoveEndpointByRange
|
||||
+@ stub TextRange_MoveEndpointByUnit
|
||||
+@ stub TextRange_RemoveFromSelection
|
||||
+@ stub TextRange_ScrollIntoView
|
||||
+@ stub TextRange_Select
|
||||
+@ stub TogglePattern_Toggle
|
||||
+@ stub TransformPattern_Move
|
||||
+@ stub TransformPattern_Resize
|
||||
+@ stub TransformPattern_Rotate
|
||||
+@ stub UiaAddEvent
|
||||
+@ stub UiaClientsAreListening
|
||||
@@ -53,14 +53,16 @@
|
||||
@ stub TransformPattern_Rotate
|
||||
@ stub UiaAddEvent
|
||||
@ stdcall UiaClientsAreListening()
|
||||
+@ stub UiaDisconnectAllProviders
|
||||
+@ stub UiaDisconnectProvider
|
||||
+@ stub UiaEventAddWindow
|
||||
+@ stub UiaEventRemoveWindow
|
||||
+@ stub UiaFind
|
||||
+@ stub UiaGetErrorDescription
|
||||
+@ stub UiaGetPatternProvider
|
||||
+@ stub UiaGetPropertyValue
|
||||
@ stub UiaEventAddWindow
|
||||
@ stub UiaEventRemoveWindow
|
||||
@ stub UiaFind
|
||||
@ stub UiaGetErrorDescription
|
||||
@ stub UiaGetPatternProvider
|
||||
@ stub UiaGetPropertyValue
|
||||
-@ stub UiaGetReservedMixedAttributeValue
|
||||
-@ stub UiaGetReservedNotSupportedValue
|
||||
+@ stdcall UiaGetReservedMixedAttributeValue(ptr)
|
||||
+@ stdcall UiaGetReservedNotSupportedValue(ptr)
|
||||
+@ stub UiaGetRootNode
|
||||
+@ stub UiaGetRuntimeId
|
||||
+@ stub UiaGetUpdatedCache
|
||||
+@ stub UiaHPatternObjectFromVariant
|
||||
+@ stub UiaHTextRangeFromVariant
|
||||
+@ stub UiaHUiaNodeFromVariant
|
||||
+@ stub UiaHasServerSideProvider
|
||||
+@ stub UiaHostProviderFromHwnd
|
||||
@ stub UiaGetRootNode
|
||||
@ stub UiaGetRuntimeId
|
||||
@ stub UiaGetUpdatedCache
|
||||
@@ -69,7 +71,8 @@
|
||||
@ stub UiaHUiaNodeFromVariant
|
||||
@ stub UiaHasServerSideProvider
|
||||
@ stub UiaHostProviderFromHwnd
|
||||
-@ stub UiaLookupId
|
||||
+@ stub UiaIAccessibleFromProvider
|
||||
+@ stdcall UiaLookupId(long ptr)
|
||||
+@ stub UiaNavigate
|
||||
+@ stub UiaNodeFromFocus
|
||||
+@ stub UiaNodeFromHandle
|
||||
+@ stub UiaNodeFromPoint
|
||||
+@ stub UiaNodeFromProvider
|
||||
+@ stub UiaNodeRelease
|
||||
+@ stub UiaPatternRelease
|
||||
@ stub UiaNavigate
|
||||
@ stub UiaNodeFromFocus
|
||||
@ stub UiaNodeFromHandle
|
||||
@@ -77,13 +80,16 @@
|
||||
@ stub UiaNodeFromProvider
|
||||
@ stub UiaNodeRelease
|
||||
@ stub UiaPatternRelease
|
||||
+@ stub UiaProviderForNonClient
|
||||
+@ stub UiaProviderFromIAccessible
|
||||
+@ stub UiaRaiseAsyncContentLoadedEvent
|
||||
+@ stub UiaRaiseAutomationEvent
|
||||
+@ stub UiaRaiseAutomationPropertyChangedEvent
|
||||
+@ stub UiaRaiseStructureChangedEvent
|
||||
@ stub UiaRaiseAsyncContentLoadedEvent
|
||||
@ stub UiaRaiseAutomationEvent
|
||||
@ stub UiaRaiseAutomationPropertyChangedEvent
|
||||
@ stub UiaRaiseStructureChangedEvent
|
||||
+@ stub UiaRaiseTextEditTextChangedEvent
|
||||
+@ stub UiaRegisterProviderCallback
|
||||
+@ stub UiaRemoveEvent
|
||||
@ stub UiaRegisterProviderCallback
|
||||
@ stub UiaRemoveEvent
|
||||
-@ stub UiaReturnRawElementProvider
|
||||
+@ stdcall UiaReturnRawElementProvider(long long long ptr)
|
||||
+@ stub UiaSetFocus
|
||||
+@ stub UiaTextRangeRelease
|
||||
+@ stub ValuePattern_SetValue
|
||||
+@ stub VirtualizedItemPattern_Realize
|
||||
+@ stub WindowPattern_Close
|
||||
+@ stub WindowPattern_SetWindowVisualState
|
||||
+@ stub WindowPattern_WaitForInputIdle
|
||||
@ stub UiaSetFocus
|
||||
@ stub UiaTextRangeRelease
|
||||
@ stub ValuePattern_SetValue
|
||||
diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h
|
||||
index 340f500..b9107ce 100644
|
||||
index 340f5005db4..b9107ceb792 100644
|
||||
--- a/include/uiautomationcoreapi.h
|
||||
+++ b/include/uiautomationcoreapi.h
|
||||
@@ -19,6 +19,8 @@
|
||||
@ -307,5 +229,5 @@ index 340f500..b9107ce 100644
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 7b2e5b361ebe380ae671b8f3d2ae4c90167354dc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 15 Nov 2016 22:00:38 +0100
|
||||
Subject: uiautomationcore: Add stub for UiaClientsAreListening.
|
||||
|
||||
---
|
||||
dlls/uiautomationcore/main.c | 6 ++++++
|
||||
dlls/uiautomationcore/uiautomationcore.spec | 2 +-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/main.c b/dlls/uiautomationcore/main.c
|
||||
index 71fe84c..6ea1351 100644
|
||||
--- a/dlls/uiautomationcore/main.c
|
||||
+++ b/dlls/uiautomationcore/main.c
|
||||
@@ -99,6 +99,12 @@ LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wparam, LPARAM lpar
|
||||
return 0;
|
||||
}
|
||||
|
||||
+BOOL WINAPI UiaClientsAreListening(void)
|
||||
+{
|
||||
+ FIXME("(): stub\n");
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
{
|
||||
diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec
|
||||
index 321cd06..221711c 100644
|
||||
--- a/dlls/uiautomationcore/uiautomationcore.spec
|
||||
+++ b/dlls/uiautomationcore/uiautomationcore.spec
|
||||
@@ -52,7 +52,7 @@
|
||||
@ stub TransformPattern_Resize
|
||||
@ stub TransformPattern_Rotate
|
||||
@ stub UiaAddEvent
|
||||
-@ stub UiaClientsAreListening
|
||||
+@ stdcall UiaClientsAreListening()
|
||||
@ stub UiaDisconnectAllProviders
|
||||
@ stub UiaDisconnectProvider
|
||||
@ stub UiaEventAddWindow
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6f7aea78c09e8c1ef0e93aef214ac28fe223d544 Mon Sep 17 00:00:00 2001
|
||||
From a6015c0c962802b44e1bf918e454745f1cc377b8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 4 Aug 2014 05:01:11 +0200
|
||||
Subject: server: Use SOCK_SEQPACKET socket in combination with SO_PEEK_OFF to
|
||||
@ -36,10 +36,10 @@ Changes in v6:
|
||||
create mode 100644 server/sock.h
|
||||
|
||||
diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
|
||||
index 11626a2..0a3f2d7 100644
|
||||
index 494db9c1a31..38aaccfa55c 100644
|
||||
--- a/dlls/kernel32/sync.c
|
||||
+++ b/dlls/kernel32/sync.c
|
||||
@@ -1470,7 +1470,7 @@ BOOL WINAPI PeekNamedPipe( HANDLE hPipe, LPVOID lpvBuffer, DWORD cbBuffer,
|
||||
@@ -1475,7 +1475,7 @@ BOOL WINAPI PeekNamedPipe( HANDLE hPipe, LPVOID lpvBuffer, DWORD cbBuffer,
|
||||
ULONG read_size = io.Information - FIELD_OFFSET( FILE_PIPE_PEEK_BUFFER, Data );
|
||||
if (lpcbAvail) *lpcbAvail = buffer->ReadDataAvailable;
|
||||
if (lpcbRead) *lpcbRead = read_size;
|
||||
@ -49,10 +49,10 @@ index 11626a2..0a3f2d7 100644
|
||||
}
|
||||
else SetLastError( RtlNtStatusToDosError(status) );
|
||||
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
|
||||
index 544b7fa..5f5553b 100644
|
||||
index e7cfce4c00e..71d75be90e8 100644
|
||||
--- a/dlls/kernel32/tests/pipe.c
|
||||
+++ b/dlls/kernel32/tests/pipe.c
|
||||
@@ -286,7 +286,6 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -294,7 +294,6 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
if (pipemode == PIPE_TYPE_BYTE)
|
||||
ok(leftmsg == 0, "peek got %d bytes left in message\n", leftmsg);
|
||||
else
|
||||
@ -60,7 +60,7 @@ index 544b7fa..5f5553b 100644
|
||||
ok(leftmsg == sizeof(obuf2) - 4, "peek got %d bytes left in message\n", leftmsg);
|
||||
ok(ReadFile(hFile, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile\n");
|
||||
ok(readden == sizeof(obuf2) - 4, "read got %d bytes\n", readden);
|
||||
@@ -357,7 +356,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -365,7 +364,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -69,7 +69,7 @@ index 544b7fa..5f5553b 100644
|
||||
}
|
||||
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes available\n", avail);
|
||||
pbuf = ibuf;
|
||||
@@ -385,7 +384,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -393,7 +392,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -78,7 +78,7 @@ index 544b7fa..5f5553b 100644
|
||||
}
|
||||
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes available\n", avail);
|
||||
pbuf = ibuf;
|
||||
@@ -426,7 +425,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -434,7 +433,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), " WriteFile5b\n");
|
||||
ok(written == sizeof(obuf2), "write file len 3b\n");
|
||||
ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek5\n");
|
||||
@ -87,7 +87,7 @@ index 544b7fa..5f5553b 100644
|
||||
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek5 got %d bytes available\n", avail);
|
||||
pbuf = ibuf;
|
||||
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
|
||||
@@ -458,7 +457,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -466,7 +465,7 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), " WriteFile6b\n");
|
||||
ok(written == sizeof(obuf2), "write file len 6b\n");
|
||||
ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6\n");
|
||||
@ -96,7 +96,7 @@ index 544b7fa..5f5553b 100644
|
||||
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek6b got %d bytes available\n", avail);
|
||||
pbuf = ibuf;
|
||||
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n");
|
||||
@@ -510,12 +509,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -518,12 +517,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
readden = leftmsg = -1;
|
||||
ok(PeekNamedPipe(hFile, NULL, 0, NULL, &readden, &leftmsg), "PeekNamedPipe 9\n");
|
||||
ok(readden == sizeof(obuf) + sizeof(obuf2), "peek got %d bytes total 9\n", readden);
|
||||
@ -109,7 +109,7 @@ index 544b7fa..5f5553b 100644
|
||||
ok(leftmsg == sizeof(obuf), "peek got %d bytes left in message 9\n", leftmsg);
|
||||
SetLastError(0xdeadbeef);
|
||||
todo_wine
|
||||
@@ -533,12 +530,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -541,12 +538,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
readden = leftmsg = -1;
|
||||
ok(PeekNamedPipe(hFile, NULL, 0, NULL, &readden, &leftmsg), "PeekNamedPipe 9\n");
|
||||
ok(readden == sizeof(obuf) - 8 + sizeof(obuf2), "peek got %d bytes total 9\n", readden);
|
||||
@ -122,7 +122,7 @@ index 544b7fa..5f5553b 100644
|
||||
ok(leftmsg == sizeof(obuf) - 8, "peek got %d bytes left in message 9\n", leftmsg);
|
||||
ret = RpcReadFile(hFile, ibuf + 8, sizeof(ibuf), &readden, NULL);
|
||||
ok(ret, "RpcReadFile 9\n");
|
||||
@@ -599,12 +594,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -607,12 +602,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
readden = leftmsg = -1;
|
||||
ok(PeekNamedPipe(hnp, NULL, 0, NULL, &readden, &leftmsg), "PeekNamedPipe 10\n");
|
||||
ok(readden == sizeof(obuf) + sizeof(obuf2), "peek got %d bytes total 10\n", readden);
|
||||
@ -135,7 +135,7 @@ index 544b7fa..5f5553b 100644
|
||||
ok(leftmsg == sizeof(obuf2), "peek got %d bytes left in message 10\n", leftmsg);
|
||||
SetLastError(0xdeadbeef);
|
||||
todo_wine
|
||||
@@ -622,12 +615,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
@@ -630,12 +623,10 @@ static void test_CreateNamedPipe(int pipemode)
|
||||
readden = leftmsg = -1;
|
||||
ok(PeekNamedPipe(hnp, NULL, 0, NULL, &readden, &leftmsg), "PeekNamedPipe 10\n");
|
||||
ok(readden == sizeof(obuf2) - 8 + sizeof(obuf), "peek got %d bytes total 10\n", readden);
|
||||
@ -149,10 +149,10 @@ index 544b7fa..5f5553b 100644
|
||||
ret = RpcReadFile(hnp, ibuf + 8, sizeof(ibuf), &readden, NULL);
|
||||
ok(ret, "RpcReadFile 10\n");
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index eef36ad..420984c 100644
|
||||
index af582ecfdb0..42b81fb3fbb 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -91,6 +91,10 @@
|
||||
@@ -96,6 +96,10 @@
|
||||
# include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
@ -163,7 +163,7 @@ index eef36ad..420984c 100644
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#define NONAMELESSUNION
|
||||
@@ -509,18 +513,57 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
|
||||
@@ -515,18 +519,57 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
|
||||
STATUS_PIPE_BROKEN : STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ index eef36ad..420984c 100644
|
||||
{
|
||||
if (*total)
|
||||
return STATUS_SUCCESS;
|
||||
@@ -536,16 +579,17 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
|
||||
@@ -542,16 +585,17 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
|
||||
return STATUS_PIPE_BROKEN;
|
||||
}
|
||||
}
|
||||
@ -246,7 +246,7 @@ index eef36ad..420984c 100644
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -1103,13 +1147,14 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -1127,13 +1171,14 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
|
||||
/* helper function for NtWriteFile and FILE_AsyncWriteService */
|
||||
static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG length, enum server_fd_type type)
|
||||
{
|
||||
@ -262,7 +262,7 @@ index eef36ad..420984c 100644
|
||||
if (result >= 0)
|
||||
{
|
||||
*total += result;
|
||||
@@ -1118,6 +1163,17 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
|
||||
@@ -1142,6 +1187,17 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
|
||||
else if (type != FD_TYPE_FILE) /* no async I/O on regular files */
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
@ -280,7 +280,7 @@ index eef36ad..420984c 100644
|
||||
else if (errno != EINTR)
|
||||
{
|
||||
if (errno == EAGAIN)
|
||||
@@ -1708,20 +1764,40 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
|
||||
@@ -1734,20 +1790,40 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
|
||||
status = unix_fd_avail( fd, &avail );
|
||||
if (!status)
|
||||
{
|
||||
@ -329,7 +329,7 @@ index eef36ad..420984c 100644
|
||||
if (needs_close) close( fd );
|
||||
}
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 3e1eff0..3d9917f 100644
|
||||
index c75a7379283..6c6a8b40bd1 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -42,6 +42,10 @@
|
||||
@ -351,7 +351,7 @@ index 3e1eff0..3d9917f 100644
|
||||
#include "handle.h"
|
||||
#include "thread.h"
|
||||
#include "request.h"
|
||||
@@ -799,14 +804,43 @@ static int named_pipe_link_name( struct object *obj, struct object_name *name, s
|
||||
@@ -761,14 +766,43 @@ static int named_pipe_link_name( struct object *obj, struct object_name *name, s
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ index 3e1eff0..3d9917f 100644
|
||||
|
||||
if (!(server = find_available_server( pipe )))
|
||||
{
|
||||
@@ -825,7 +859,10 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
|
||||
@@ -787,7 +821,10 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
|
||||
|
||||
if ((client = create_pipe_client( options, pipe->flags )))
|
||||
{
|
||||
@ -406,18 +406,13 @@ index 3e1eff0..3d9917f 100644
|
||||
+
|
||||
+ if (!socketpair( PF_UNIX, type, 0, fds ))
|
||||
{
|
||||
assert( !server->fd );
|
||||
assert( !server->pipe_end.fd );
|
||||
|
||||
@@ -835,32 +872,55 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
|
||||
@@ -797,32 +834,55 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
|
||||
if (is_overlapped( options )) fcntl( fds[1], F_SETFL, O_NONBLOCK );
|
||||
if (is_overlapped( server->options )) fcntl( fds[0], F_SETFL, O_NONBLOCK );
|
||||
|
||||
- if (pipe->insize)
|
||||
- {
|
||||
- setsockopt( fds[0], SOL_SOCKET, SO_RCVBUF, &pipe->insize, sizeof(pipe->insize) );
|
||||
- setsockopt( fds[1], SOL_SOCKET, SO_RCVBUF, &pipe->insize, sizeof(pipe->insize) );
|
||||
- }
|
||||
- if (pipe->outsize)
|
||||
+ /* FIXME: For message mode we don't pay attention to the provided buffer size.
|
||||
+ * Linux pipes cannot dynamically adjust size, so we leave the size to the system
|
||||
+ * instead of using the application provided value. Please note that this will
|
||||
@ -425,6 +420,11 @@ index 3e1eff0..3d9917f 100644
|
||||
+ * messages. */
|
||||
+ if (type != SOCK_SEQPACKET)
|
||||
{
|
||||
- setsockopt( fds[0], SOL_SOCKET, SO_RCVBUF, &pipe->insize, sizeof(pipe->insize) );
|
||||
- setsockopt( fds[1], SOL_SOCKET, SO_RCVBUF, &pipe->insize, sizeof(pipe->insize) );
|
||||
- }
|
||||
- if (pipe->outsize)
|
||||
- {
|
||||
- setsockopt( fds[0], SOL_SOCKET, SO_SNDBUF, &pipe->outsize, sizeof(pipe->outsize) );
|
||||
- setsockopt( fds[1], SOL_SOCKET, SO_SNDBUF, &pipe->outsize, sizeof(pipe->outsize) );
|
||||
+ if (pipe->insize)
|
||||
@ -439,32 +439,32 @@ index 3e1eff0..3d9917f 100644
|
||||
+ }
|
||||
}
|
||||
|
||||
- client->fd = create_anonymous_fd( &pipe_client_fd_ops, fds[1], &client->obj, options );
|
||||
- server->fd = create_anonymous_fd( &pipe_server_fd_ops, fds[0], &server->obj, server->options );
|
||||
- if (client->fd && server->fd)
|
||||
- client->pipe_end.fd = create_anonymous_fd( &pipe_client_fd_ops, fds[1], &client->pipe_end.obj, options );
|
||||
- server->pipe_end.fd = create_anonymous_fd( &pipe_server_fd_ops, fds[0], &server->pipe_end.obj, server->options );
|
||||
- if (client->pipe_end.fd && server->pipe_end.fd)
|
||||
+ if (type != SOCK_SEQPACKET || (setsockopt( fds[0], SOL_SOCKET, SO_PEEK_OFF, &zero, sizeof(zero) ) != -1 &&
|
||||
+ setsockopt( fds[1], SOL_SOCKET, SO_PEEK_OFF, &zero, sizeof(zero) ) != -1))
|
||||
{
|
||||
- allow_fd_caching( client->fd );
|
||||
- allow_fd_caching( server->fd );
|
||||
- fd_copy_completion( server->ioctl_fd, server->fd );
|
||||
- allow_fd_caching( client->pipe_end.fd );
|
||||
- allow_fd_caching( server->pipe_end.fd );
|
||||
- fd_copy_completion( server->ioctl_fd, server->pipe_end.fd );
|
||||
- if (server->state == ps_wait_open)
|
||||
- fd_async_wake_up( server->ioctl_fd, ASYNC_TYPE_WAIT, STATUS_SUCCESS );
|
||||
- set_server_state( server, ps_connected_server );
|
||||
- server->client = client;
|
||||
- client->server = server;
|
||||
+ #ifdef __linux__
|
||||
+ fcntl( fds[0], F_SETSIG, messagemode_flags( server->pipe_flags ) );
|
||||
+ fcntl( fds[1], F_SETSIG, messagemode_flags( client->pipe_flags ) );
|
||||
+ fcntl( fds[0], F_SETSIG, messagemode_flags( server->pipe_end.flags ) );
|
||||
+ fcntl( fds[1], F_SETSIG, messagemode_flags( client->pipe_end.flags ) );
|
||||
+ #endif
|
||||
+
|
||||
+ client->fd = create_anonymous_fd( &pipe_client_fd_ops, fds[1], &client->obj, options );
|
||||
+ server->fd = create_anonymous_fd( &pipe_server_fd_ops, fds[0], &server->obj, server->options );
|
||||
+ if (client->fd && server->fd)
|
||||
+ client->pipe_end.fd = create_anonymous_fd( &pipe_client_fd_ops, fds[1], &client->pipe_end.obj, options );
|
||||
+ server->pipe_end.fd = create_anonymous_fd( &pipe_server_fd_ops, fds[0], &server->pipe_end.obj, server->options );
|
||||
+ if (client->pipe_end.fd && server->pipe_end.fd)
|
||||
+ {
|
||||
+ allow_fd_caching( client->fd );
|
||||
+ allow_fd_caching( server->fd );
|
||||
+ fd_copy_completion( server->ioctl_fd, server->fd );
|
||||
+ allow_fd_caching( client->pipe_end.fd );
|
||||
+ allow_fd_caching( server->pipe_end.fd );
|
||||
+ fd_copy_completion( server->ioctl_fd, server->pipe_end.fd );
|
||||
+ if (server->state == ps_wait_open)
|
||||
+ fd_async_wake_up( server->ioctl_fd, ASYNC_TYPE_WAIT, STATUS_SUCCESS );
|
||||
+ set_server_state( server, ps_connected_server );
|
||||
@ -483,7 +483,7 @@ index 3e1eff0..3d9917f 100644
|
||||
release_object( client );
|
||||
client = NULL;
|
||||
}
|
||||
@@ -951,7 +1011,7 @@ DECL_HANDLER(create_named_pipe)
|
||||
@@ -907,7 +967,7 @@ DECL_HANDLER(create_named_pipe)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ index 3e1eff0..3d9917f 100644
|
||||
|
||||
if (!name.len) /* pipes need a root directory even without a name */
|
||||
{
|
||||
@@ -1054,6 +1114,9 @@ DECL_HANDLER(set_named_pipe_info)
|
||||
@@ -1010,6 +1070,9 @@ DECL_HANDLER(set_named_pipe_info)
|
||||
{
|
||||
struct pipe_server *server;
|
||||
struct pipe_client *client = NULL;
|
||||
@ -502,29 +502,29 @@ index 3e1eff0..3d9917f 100644
|
||||
|
||||
server = get_pipe_server_obj( current->process, req->handle, FILE_WRITE_ATTRIBUTES );
|
||||
if (!server)
|
||||
@@ -1080,10 +1143,20 @@ DECL_HANDLER(set_named_pipe_info)
|
||||
@@ -1036,10 +1099,20 @@ DECL_HANDLER(set_named_pipe_info)
|
||||
else if (client)
|
||||
{
|
||||
client->pipe_flags = server->pipe->flags | req->flags;
|
||||
client->pipe_end.flags = server->pipe->flags | req->flags;
|
||||
+ #ifdef __linux__
|
||||
+ if (client->fd && (unix_fd = get_unix_fd( client->fd )) != -1)
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( client->pipe_flags ) );
|
||||
+ if (client->pipe_end.fd && (unix_fd = get_unix_fd( client->pipe_end.fd )) != -1)
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( client->pipe_end.flags ) );
|
||||
+ clear_error();
|
||||
+ #endif
|
||||
}
|
||||
else
|
||||
{
|
||||
server->pipe_flags = server->pipe->flags | req->flags;
|
||||
server->pipe_end.flags = server->pipe->flags | req->flags;
|
||||
+ #ifdef __linux__
|
||||
+ if (server->fd && (unix_fd = get_unix_fd( server->fd )) != -1)
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( server->pipe_flags ) );
|
||||
+ if (server->pipe_end.fd && (unix_fd = get_unix_fd( server->pipe_end.fd )) != -1)
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( server->pipe_end.flags ) );
|
||||
+ clear_error();
|
||||
+ #endif
|
||||
}
|
||||
|
||||
if (client)
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index a11964f..0a2e079 100644
|
||||
index d6b4fb2fa5c..49b6d3d5758 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -61,6 +61,7 @@
|
||||
@ -535,7 +535,7 @@ index a11964f..0a2e079 100644
|
||||
#include "handle.h"
|
||||
#include "thread.h"
|
||||
#include "request.h"
|
||||
@@ -136,7 +137,6 @@ static int sock_cancel_async( struct fd *fd, struct process *process, struct thr
|
||||
@@ -135,7 +136,6 @@ static void sock_reselect_async( struct fd *fd, struct async_queue *queue );
|
||||
|
||||
static int sock_get_ntstatus( int err );
|
||||
static int sock_get_error( int err );
|
||||
@ -543,7 +543,7 @@ index a11964f..0a2e079 100644
|
||||
|
||||
static const struct object_ops sock_ops =
|
||||
{
|
||||
@@ -958,7 +958,7 @@ static int sock_get_ntstatus( int err )
|
||||
@@ -941,7 +941,7 @@ static int sock_get_ntstatus( int err )
|
||||
}
|
||||
|
||||
/* set the last error depending on errno */
|
||||
@ -554,7 +554,7 @@ index a11964f..0a2e079 100644
|
||||
}
|
||||
diff --git a/server/sock.h b/server/sock.h
|
||||
new file mode 100644
|
||||
index 0000000..21551b4
|
||||
index 00000000000..21551b42b1c
|
||||
--- /dev/null
|
||||
+++ b/server/sock.h
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -585,5 +585,5 @@ index 0000000..21551b4
|
||||
+
|
||||
+#endif /* __WINE_SERVER_SOCK_H */
|
||||
--
|
||||
2.7.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8bba3ddd8ee9234d7c1f9d21b2aa3f4cdcdd1b3a Mon Sep 17 00:00:00 2001
|
||||
From 260d35bbb99549c5ebf8447f6f1bf0680f6e3943 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 6 Jun 2015 01:21:05 +0200
|
||||
Subject: server: Return correct error codes for NtWriteFile when pipes are
|
||||
@ -39,10 +39,10 @@ index ab34d99d5b6..d0662d9ae59 100644
|
||||
}
|
||||
}
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index e480f31a00e..eccf6a463f5 100644
|
||||
index 6c6a8b40bd1..47a88790fa3 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -147,6 +147,7 @@ static const struct object_ops named_pipe_ops =
|
||||
@@ -150,6 +150,7 @@ static const struct object_ops named_pipe_ops =
|
||||
/* server end functions */
|
||||
static void pipe_server_dump( struct object *obj, int verbose );
|
||||
static struct fd *pipe_server_get_fd( struct object *obj );
|
||||
@ -50,7 +50,7 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
static void pipe_server_destroy( struct object *obj);
|
||||
static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int blocking );
|
||||
static enum server_fd_type pipe_server_get_fd_type( struct fd *fd );
|
||||
@@ -172,7 +173,7 @@ static const struct object_ops pipe_server_ops =
|
||||
@@ -175,7 +176,7 @@ static const struct object_ops pipe_server_ops =
|
||||
NULL, /* unlink_name */
|
||||
no_open_file, /* open_file */
|
||||
no_alloc_handle, /* alloc_handle */
|
||||
@ -59,7 +59,7 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
pipe_server_destroy /* destroy */
|
||||
};
|
||||
|
||||
@@ -193,6 +194,7 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||
@@ -196,6 +197,7 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||
static void pipe_client_dump( struct object *obj, int verbose );
|
||||
static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
static struct fd *pipe_client_get_fd( struct object *obj );
|
||||
@ -67,7 +67,7 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
static void pipe_client_destroy( struct object *obj );
|
||||
static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int blocking );
|
||||
static enum server_fd_type pipe_client_get_fd_type( struct fd *fd );
|
||||
@@ -216,7 +218,7 @@ static const struct object_ops pipe_client_ops =
|
||||
@@ -219,7 +221,7 @@ static const struct object_ops pipe_client_ops =
|
||||
NULL, /* unlink_name */
|
||||
no_open_file, /* open_file */
|
||||
no_alloc_handle, /* alloc_handle */
|
||||
@ -76,7 +76,7 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
pipe_client_destroy /* destroy */
|
||||
};
|
||||
|
||||
@@ -281,6 +283,8 @@ static const struct fd_ops named_pipe_device_fd_ops =
|
||||
@@ -284,6 +286,8 @@ static const struct fd_ops named_pipe_device_fd_ops =
|
||||
default_fd_reselect_async /* reselect_async */
|
||||
};
|
||||
|
||||
@ -85,8 +85,8 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
static void named_pipe_dump( struct object *obj, int verbose )
|
||||
{
|
||||
fputs( "Named pipe\n", stderr );
|
||||
@@ -390,6 +394,23 @@ static void do_disconnect( struct pipe_server *server )
|
||||
server->fd = NULL;
|
||||
@@ -393,6 +397,23 @@ static void do_disconnect( struct pipe_server *server )
|
||||
server->pipe_end.fd = NULL;
|
||||
}
|
||||
|
||||
+static int pipe_server_close_handle( struct object *obj, struct process *process, obj_handle_t handle )
|
||||
@ -97,10 +97,10 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
+ int unix_fd;
|
||||
+
|
||||
+ assert( obj->ops == &pipe_server_ops );
|
||||
+ if (obj->handle_count == 1 && client && client->fd && (unix_fd = get_unix_fd( client->fd )) != -1)
|
||||
+ if (obj->handle_count == 1 && client && client->pipe_end.fd && (unix_fd = get_unix_fd( client->pipe_end.fd )) != -1)
|
||||
+ {
|
||||
+ /* set the NAMED_PIPE_CLOSED_HANDLE flag, to distinguish disconnect / closing pipe */
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( client->pipe_flags ) | NAMED_PIPE_CLOSED_HANDLE );
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( client->pipe_end.flags ) | NAMED_PIPE_CLOSED_HANDLE );
|
||||
+ }
|
||||
+#endif
|
||||
+ return 1;
|
||||
@ -109,7 +109,7 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
static void pipe_server_destroy( struct object *obj)
|
||||
{
|
||||
struct pipe_server *server = (struct pipe_server *)obj;
|
||||
@@ -416,6 +437,24 @@ static void pipe_server_destroy( struct object *obj)
|
||||
@@ -419,6 +440,24 @@ static void pipe_server_destroy( struct object *obj)
|
||||
release_object( server->pipe );
|
||||
}
|
||||
|
||||
@ -121,11 +121,11 @@ index e480f31a00e..eccf6a463f5 100644
|
||||
+ int unix_fd;
|
||||
+
|
||||
+ assert( obj->ops == &pipe_client_ops );
|
||||
+ if (obj->handle_count == 1 && server && server->fd &&
|
||||
+ server->state != ps_wait_connect && (unix_fd = get_unix_fd( server->fd )) != -1)
|
||||
+ if (obj->handle_count == 1 && server && server->pipe_end.fd &&
|
||||
+ server->state != ps_wait_connect && (unix_fd = get_unix_fd( server->pipe_end.fd )) != -1)
|
||||
+ {
|
||||
+ /* set the NAMED_PIPE_CLOSED_HANDLE flag, to distinguish disconnect / closing pipe */
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( server->pipe_flags ) | NAMED_PIPE_CLOSED_HANDLE );
|
||||
+ fcntl( unix_fd, F_SETSIG, messagemode_flags( server->pipe_end.flags ) | NAMED_PIPE_CLOSED_HANDLE );
|
||||
+ }
|
||||
+#endif
|
||||
+ return 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c108a14664db758d26cffd022a8c9255b6c47b1c Mon Sep 17 00:00:00 2001
|
||||
From 7fce25b8259f816e1cc8c2c40b6a73379f2fb4ef Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 24 Feb 2016 15:45:09 +0100
|
||||
Subject: server: Do not allow to queue async operation for broken pipes.
|
||||
@ -8,10 +8,10 @@ Subject: server: Do not allow to queue async operation for broken pipes.
|
||||
1 file changed, 32 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index eccf6a463f5..2f1a8c8fb99 100644
|
||||
index 47a88790fa3..e5c5c4968c4 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -153,6 +153,7 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b
|
||||
@@ -156,6 +156,7 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b
|
||||
static enum server_fd_type pipe_server_get_fd_type( struct fd *fd );
|
||||
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
|
||||
int blocking );
|
||||
@ -19,7 +19,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
|
||||
static const struct object_ops pipe_server_ops =
|
||||
{
|
||||
@@ -186,7 +187,7 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||
@@ -189,7 +190,7 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||
no_fd_write, /* write */
|
||||
pipe_server_flush, /* flush */
|
||||
pipe_server_ioctl, /* ioctl */
|
||||
@ -28,7 +28,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
default_fd_reselect_async /* reselect_async */
|
||||
};
|
||||
|
||||
@@ -198,6 +199,7 @@ static int pipe_client_close_handle( struct object *obj, struct process *process
|
||||
@@ -201,6 +202,7 @@ static int pipe_client_close_handle( struct object *obj, struct process *process
|
||||
static void pipe_client_destroy( struct object *obj );
|
||||
static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int blocking );
|
||||
static enum server_fd_type pipe_client_get_fd_type( struct fd *fd );
|
||||
@ -36,7 +36,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
|
||||
static const struct object_ops pipe_client_ops =
|
||||
{
|
||||
@@ -231,7 +233,7 @@ static const struct fd_ops pipe_client_fd_ops =
|
||||
@@ -234,7 +236,7 @@ static const struct fd_ops pipe_client_fd_ops =
|
||||
no_fd_write, /* write */
|
||||
pipe_client_flush, /* flush */
|
||||
default_fd_ioctl, /* ioctl */
|
||||
@ -45,7 +45,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
default_fd_reselect_async /* reselect_async */
|
||||
};
|
||||
|
||||
@@ -620,6 +622,20 @@ static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int b
|
||||
@@ -630,6 +632,20 @@ static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int b
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
+ struct pipe_client *client = get_fd_user( fd );
|
||||
+ struct pipe_server *server = client->server;
|
||||
+
|
||||
+ if (!server || !server->fd)
|
||||
+ if (!server || !server->pipe_end.fd)
|
||||
+ {
|
||||
+ set_error( STATUS_PIPE_BROKEN );
|
||||
+ return;
|
||||
@ -66,7 +66,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
static inline int is_overlapped( unsigned int options )
|
||||
{
|
||||
return !(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT));
|
||||
@@ -705,6 +721,20 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct
|
||||
@@ -714,6 +730,20 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ index eccf6a463f5..2f1a8c8fb99 100644
|
||||
+ struct pipe_server *server = get_fd_user( fd );
|
||||
+ struct pipe_client *client = server->client;
|
||||
+
|
||||
+ if (!client || !client->fd)
|
||||
+ if (!client || !client->pipe_end.fd)
|
||||
+ {
|
||||
+ set_error( STATUS_PIPE_BROKEN );
|
||||
+ return;
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "3d62cd26d1b988b373efae0b9c4a0a988985d45f"
|
||||
echo "1cc93e3f05bce5ae9758fad44f69f44e1462d81b"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -2730,7 +2730,7 @@ fi
|
||||
# | dlls/feclient/feclient.spec, dlls/feclient/main.c, dlls/iertutil/Makefile.in, dlls/iertutil/iertutil.spec,
|
||||
# | dlls/iertutil/main.c, dlls/kernelbase/Makefile.in, dlls/kernelbase/kernelbase.spec, dlls/kernelbase/misc.c,
|
||||
# | dlls/shcore/Makefile.in, dlls/shcore/main.c, dlls/shcore/shcore.spec, dlls/shlwapi/shlwapi.spec,
|
||||
# | dlls/uiautomationcore/Makefile.in, dlls/uiautomationcore/main.c, dlls/uiautomationcore/uiautomationcore.spec,
|
||||
# | dlls/uiautomationcore/Makefile.in, dlls/uiautomationcore/uia_main.c, dlls/uiautomationcore/uiautomationcore.spec,
|
||||
# | include/Makefile.in, include/shellscalingapi.h, include/uiautomationcoreapi.h, tools/make_specfiles
|
||||
# |
|
||||
if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
@ -2757,7 +2757,6 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
patch_apply api-ms-win-Stub_DLLs/0025-shcore-Add-stub-for-GetProcessDpiAwareness.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0026-feclient-Add-stub-dll.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0027-uiautomationcore-Add-dll-and-stub-some-functions.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0028-uiautomationcore-Add-stub-for-UiaClientsAreListening.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "kernelbase: Add dll and add stub for QuirkIsEnabled.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "api-ms-win-core-quirks-l1-1-0: Add dll.", 1 },';
|
||||
@ -2782,7 +2781,6 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "shcore: Add stub for GetProcessDpiAwareness.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "feclient: Add stub dll.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "uiautomationcore: Add dll and stub some functions.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "uiautomationcore: Add stub for UiaClientsAreListening.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6e987dbcbba1b00bfef41ecd962973648bfab823 Mon Sep 17 00:00:00 2001
|
||||
From 0cd60112c33592a78b573201b55bdcc0eb20e52e Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 17 Aug 2015 01:11:47 +0200
|
||||
Subject: server: Store a reference to the parent object for pipe servers. (v2)
|
||||
@ -30,10 +30,10 @@ index 43c5ee46d71..9a1ba670ab7 100644
|
||||
"name too short %s\n", wine_dbgstr_w(str->Buffer) );
|
||||
trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len );
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 748651f701a..255c88b135d 100644
|
||||
index e5c5c4968c4..bc4b6f08fde 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -147,6 +147,8 @@ static const struct object_ops named_pipe_ops =
|
||||
@@ -150,6 +150,8 @@ static const struct object_ops named_pipe_ops =
|
||||
/* server end functions */
|
||||
static void pipe_server_dump( struct object *obj, int verbose );
|
||||
static struct fd *pipe_server_get_fd( struct object *obj );
|
||||
@ -42,7 +42,7 @@ index 748651f701a..255c88b135d 100644
|
||||
static int pipe_server_close_handle( struct object *obj, struct process *process, obj_handle_t handle );
|
||||
static void pipe_server_destroy( struct object *obj);
|
||||
static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int blocking );
|
||||
@@ -170,8 +172,8 @@ static const struct object_ops pipe_server_ops =
|
||||
@@ -173,8 +175,8 @@ static const struct object_ops pipe_server_ops =
|
||||
default_get_sd, /* get_sd */
|
||||
default_set_sd, /* set_sd */
|
||||
no_lookup_name, /* lookup_name */
|
||||
@ -53,7 +53,7 @@ index 748651f701a..255c88b135d 100644
|
||||
no_open_file, /* open_file */
|
||||
no_alloc_handle, /* alloc_handle */
|
||||
pipe_server_close_handle, /* close_handle */
|
||||
@@ -195,6 +197,8 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||
@@ -198,6 +200,8 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||
static void pipe_client_dump( struct object *obj, int verbose );
|
||||
static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
static struct fd *pipe_client_get_fd( struct object *obj );
|
||||
@ -62,7 +62,7 @@ index 748651f701a..255c88b135d 100644
|
||||
static int pipe_client_close_handle( struct object *obj, struct process *process, obj_handle_t handle );
|
||||
static void pipe_client_destroy( struct object *obj );
|
||||
static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int blocking );
|
||||
@@ -216,8 +220,8 @@ static const struct object_ops pipe_client_ops =
|
||||
@@ -219,8 +223,8 @@ static const struct object_ops pipe_client_ops =
|
||||
default_get_sd, /* get_sd */
|
||||
default_set_sd, /* set_sd */
|
||||
no_lookup_name, /* lookup_name */
|
||||
@ -73,8 +73,8 @@ index 748651f701a..255c88b135d 100644
|
||||
no_open_file, /* open_file */
|
||||
no_alloc_handle, /* alloc_handle */
|
||||
pipe_client_close_handle, /* close_handle */
|
||||
@@ -396,6 +400,17 @@ static void do_disconnect( struct pipe_server *server )
|
||||
server->fd = NULL;
|
||||
@@ -399,6 +403,17 @@ static void do_disconnect( struct pipe_server *server )
|
||||
server->pipe_end.fd = NULL;
|
||||
}
|
||||
|
||||
+static int pipe_server_link_name( struct object *obj, struct object_name *name, struct object *parent )
|
||||
@ -91,7 +91,7 @@ index 748651f701a..255c88b135d 100644
|
||||
static int pipe_server_close_handle( struct object *obj, struct process *process, obj_handle_t handle )
|
||||
{
|
||||
#ifdef __linux__
|
||||
@@ -439,6 +454,17 @@ static void pipe_server_destroy( struct object *obj)
|
||||
@@ -442,6 +457,17 @@ static void pipe_server_destroy( struct object *obj)
|
||||
release_object( server->pipe );
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ index 748651f701a..255c88b135d 100644
|
||||
static int pipe_client_close_handle( struct object *obj, struct process *process, obj_handle_t handle )
|
||||
{
|
||||
#ifdef __linux__
|
||||
@@ -746,9 +772,10 @@ static struct pipe_server *get_pipe_server_obj( struct process *process,
|
||||
@@ -761,9 +787,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags )
|
||||
static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned int options,
|
||||
unsigned int pipe_flags )
|
||||
{
|
||||
@ -121,7 +121,7 @@ index 748651f701a..255c88b135d 100644
|
||||
if (!server)
|
||||
return NULL;
|
||||
|
||||
@@ -771,11 +798,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned
|
||||
@@ -785,11 +812,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned
|
||||
return server;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ index 748651f701a..255c88b135d 100644
|
||||
if (!client)
|
||||
return NULL;
|
||||
|
||||
@@ -875,7 +904,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
|
||||
@@ -888,7 +917,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cb83d4886548b66c4c4fd0c006c3eca43d134067 Mon Sep 17 00:00:00 2001
|
||||
From 06958496811f70af6507c8de08347d3aac61057b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 29 Apr 2013 18:49:53 +0200
|
||||
Subject: wined3d: Send blits through the command stream.
|
||||
@ -13,7 +13,7 @@ between surface_blt and surface_blt_ugly isn't particularly nice.
|
||||
4 files changed, 228 insertions(+), 97 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 130478e8882..420a2cc8327 100644
|
||||
index 9934b74e150..b563dfbd080 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
@ -43,7 +43,7 @@ index 130478e8882..420a2cc8327 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1792,6 +1805,44 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1799,6 +1812,44 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ index 130478e8882..420a2cc8327 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1835,6 +1886,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1842,6 +1893,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
@ -97,10 +97,10 @@ index 130478e8882..420a2cc8327 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 0b1b389af0b..6195122ff10 100644
|
||||
index 335ff016cf3..f4cdb5d9c10 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4016,6 +4016,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4032,6 +4032,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
struct wined3d_texture *dst_texture, *src_texture;
|
||||
RECT dst_rect, src_rect;
|
||||
HRESULT hr;
|
||||
@ -108,7 +108,7 @@ index 0b1b389af0b..6195122ff10 100644
|
||||
|
||||
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
|
||||
"src_resource %p, src_sub_resource_idx %u, src_box %s.\n",
|
||||
@@ -4103,6 +4104,14 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4119,6 +4120,14 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
|
||||
if (src_box)
|
||||
{
|
||||
@ -123,7 +123,7 @@ index 0b1b389af0b..6195122ff10 100644
|
||||
SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom);
|
||||
}
|
||||
else
|
||||
@@ -4116,6 +4125,23 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4132,6 +4141,23 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
SetRect(&dst_rect, dst_x, dst_y, dst_x + (src_rect.right - src_rect.left),
|
||||
dst_y + (src_rect.bottom - src_rect.top));
|
||||
|
||||
@ -148,10 +148,10 @@ index 0b1b389af0b..6195122ff10 100644
|
||||
src_texture, src_sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_POINT)))
|
||||
WARN("Failed to blit, hr %#x.\n", hr);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 19d6aa74373..5b8434d63b8 100644
|
||||
index 87cf6727cf5..8c5624c8787 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3794,7 +3794,7 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -3775,7 +3775,7 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
@ -160,7 +160,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
@@ -3804,9 +3804,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -3785,9 +3785,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
struct wined3d_device *device = dst_texture->resource.device;
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
@ -172,7 +172,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
DWORD src_ds_flags, dst_ds_flags;
|
||||
BOOL scale, convert;
|
||||
|
||||
@@ -3819,84 +3818,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -3800,84 +3799,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINED3D_BLT_DO_NOT_WAIT
|
||||
| WINED3D_BLT_ALPHA_TEST;
|
||||
|
||||
@ -262,7 +262,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
|
||||
if (!device->d3d_initialized)
|
||||
@@ -3921,11 +3853,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -3902,11 +3834,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
@ -274,14 +274,14 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
dst_swapchain = dst_texture->swapchain;
|
||||
|
||||
/* This isn't strictly needed. FBO blits for example could deal with
|
||||
@@ -3961,22 +3888,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -3942,22 +3869,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->fill_color, &depth))
|
||||
if (!wined3d_format_convert_color_to_float(dst_texture->resource.format, NULL, fx->fill_color, &color))
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
+ return;
|
||||
|
||||
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
|
||||
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, color.r)))
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
}
|
||||
@ -300,7 +300,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4012,7 +3933,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -3993,7 +3914,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
|
||||
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
|
||||
@ -309,7 +309,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4056,7 +3977,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4037,7 +3958,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
context, dst_texture->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@ -318,7 +318,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4080,7 +4001,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4061,7 +3982,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@ -327,7 +327,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
@@ -4101,7 +4022,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4082,7 +4003,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx,
|
||||
~dst_texture->resource.draw_binding);
|
||||
|
||||
@ -336,7 +336,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
|
||||
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
@@ -4111,7 +4032,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4092,7 +4013,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
{
|
||||
blitter->blit_surface(device, blit_op, filter, src_surface,
|
||||
src_rect, dst_surface, dst_rect, color_key);
|
||||
@ -345,7 +345,7 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4119,9 +4040,134 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4100,9 +4021,134 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
fallback:
|
||||
/* Special cases for render targets. */
|
||||
if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter)))
|
||||
@ -483,10 +483,10 @@ index 19d6aa74373..5b8434d63b8 100644
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b04d2f502bf..be01b6f3b6a 100644
|
||||
index 6fcfdcbe05c..a2663a10b82 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3038,6 +3038,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -3047,6 +3047,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
|
||||
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@ -496,7 +496,7 @@ index b04d2f502bf..be01b6f3b6a 100644
|
||||
|
||||
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
|
||||
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -3190,6 +3193,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HID
|
||||
@@ -3199,6 +3202,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HID
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a1ebeac4b7804415c3b1fd48f79fcf574576c645 Mon Sep 17 00:00:00 2001
|
||||
From 966ef73fc86a013fafb0ed3491d6347e4224b504 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 30 Aug 2013 17:00:35 +0200
|
||||
Subject: wined3d: Wrap GL BOs in a structure
|
||||
@ -13,10 +13,10 @@ them for DISCARD maps.
|
||||
4 files changed, 92 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3e4a1790946..bd3a132c496 100644
|
||||
index 1c424d517bb..18695774bc8 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -5154,3 +5154,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5169,3 +5169,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -74,10 +74,10 @@ index 3e4a1790946..bd3a132c496 100644
|
||||
+ wined3d_device_destroy_bo(device, context, bo);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 5b8434d63b8..33a0ecf0327 100644
|
||||
index 8c5624c8787..e641dcc8b80 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2809,7 +2809,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -2801,7 +2801,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
|
||||
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
|
||||
* getting called. */
|
||||
@ -87,7 +87,7 @@ index 5b8434d63b8..33a0ecf0327 100644
|
||||
TRACE("Removing the pbo attached to surface %p.\n", surface);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index de118e4d564..bff7452e773 100644
|
||||
index 7dc0f096f77..2d3d51f0489 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -337,7 +337,7 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
@ -167,7 +167,7 @@ index de118e4d564..bff7452e773 100644
|
||||
}
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -1325,22 +1321,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1327,22 +1323,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
@ -195,7 +195,7 @@ index de118e4d564..bff7452e773 100644
|
||||
}
|
||||
|
||||
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
|
||||
@@ -1466,7 +1459,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -1468,7 +1461,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@ -204,7 +204,7 @@ index de118e4d564..bff7452e773 100644
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -1766,7 +1759,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1768,7 +1761,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@ -213,7 +213,7 @@ index de118e4d564..bff7452e773 100644
|
||||
wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
texture1d_upload_data(texture, sub_resource_idx, context, NULL, &data, row_pitch, slice_pitch);
|
||||
@@ -1811,7 +1804,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1813,7 +1806,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@ -222,7 +222,7 @@ index de118e4d564..bff7452e773 100644
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2105,8 +2098,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -2107,8 +2100,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ index de118e4d564..bff7452e773 100644
|
||||
|
||||
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
|
||||
{
|
||||
@@ -2904,7 +2897,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2906,7 +2899,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@ -242,7 +242,7 @@ index de118e4d564..bff7452e773 100644
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
@@ -2950,7 +2943,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2952,7 +2945,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@ -252,10 +252,10 @@ index de118e4d564..bff7452e773 100644
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7cabc276a0b..e4474a7b2c5 100644
|
||||
index 834a681f6a4..6204fc3915d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2560,6 +2560,14 @@ struct wined3d_state
|
||||
@@ -2571,6 +2571,14 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -267,10 +267,10 @@ index 7cabc276a0b..e4474a7b2c5 100644
|
||||
+ UINT size;
|
||||
+};
|
||||
+
|
||||
#define WINED3D_UNMAPPED_STAGE ~0U
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2673,6 +2681,10 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -2684,6 +2692,10 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
|
||||
struct wined3d_texture *dst_texture) DECLSPEC_HIDDEN;
|
||||
@ -281,7 +281,7 @@ index 7cabc276a0b..e4474a7b2c5 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2863,7 +2875,7 @@ struct wined3d_texture
|
||||
@@ -2874,7 +2886,7 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5d3ab1ff100c046961cbe2ccc7da231b845a1b5b Mon Sep 17 00:00:00 2001
|
||||
From a6f17f1f44e34d5a4658aa6d772e6c6283f5d98e 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
|
||||
@ -19,7 +19,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
12 files changed, 182 insertions(+), 126 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 24dcb05d341..b5aa1037d77 100644
|
||||
index 18721005bc6..7879c6a2f7f 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -701,7 +701,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -31,7 +31,7 @@ index 24dcb05d341..b5aa1037d77 100644
|
||||
|
||||
/* Load DirectX 9 float constants for pixel shader */
|
||||
priv->highest_dirty_ps_const = shader_arb_load_constants_f(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
|
||||
@@ -4610,7 +4610,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
@@ -4608,7 +4608,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -41,7 +41,7 @@ index 24dcb05d341..b5aa1037d77 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 0115f1ba6da..bb65538ad7b 100644
|
||||
index 511b1bd4216..8aa2a77a171 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1720,6 +1720,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@ -56,23 +56,23 @@ index 0115f1ba6da..bb65538ad7b 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -2028,6 +2033,7 @@ out:
|
||||
if (hdc) wined3d_release_dc(swapchain->win_handle, hdc);
|
||||
@@ -2032,6 +2037,7 @@ out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
HeapFree(GetProcessHeap(), 0, ret->texture_type);
|
||||
+ HeapFree(GetProcessHeap(), 0, ret->current_fb.render_targets);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -2075,6 +2081,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
@@ -2080,6 +2086,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
HeapFree(GetProcessHeap(), 0, context->texture_type);
|
||||
HeapFree(GetProcessHeap(), 0, context->fbo_key);
|
||||
+ HeapFree(GetProcessHeap(), 0, context->current_fb.render_targets);
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2637,7 +2644,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2642,7 +2649,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -81,7 +81,7 @@ index 0115f1ba6da..bb65538ad7b 100644
|
||||
|| rt_count != gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2682,6 +2689,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2687,6 +2694,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(context,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL);
|
||||
}
|
||||
@ -90,7 +90,7 @@ index 0115f1ba6da..bb65538ad7b 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2738,7 +2747,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2743,7 +2752,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_state *state)
|
||||
{
|
||||
@ -99,7 +99,7 @@ index 0115f1ba6da..bb65538ad7b 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2768,7 +2777,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2773,7 +2782,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)
|
||||
{
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, state);
|
||||
@ -108,7 +108,7 @@ index 0115f1ba6da..bb65538ad7b 100644
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -3057,6 +3066,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
@@ -3056,6 +3065,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -117,17 +117,17 @@ index 0115f1ba6da..bb65538ad7b 100644
|
||||
}
|
||||
|
||||
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
|
||||
@@ -3501,7 +3512,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
const struct wined3d_device *device, const struct wined3d_state *state)
|
||||
@@ -3528,7 +3539,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
{
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
- const struct wined3d_fb_state *fb = state->fb;
|
||||
+ const struct wined3d_fb_state *fb = &state->fb;
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 381b7ca30ac..54b81f74f64 100644
|
||||
index a6ee6dda110..5606c73c10b 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -510,7 +510,7 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@ -238,7 +238,7 @@ index 381b7ca30ac..54b81f74f64 100644
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -1561,11 +1561,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1650,11 +1650,13 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
@ -254,7 +254,7 @@ index 381b7ca30ac..54b81f74f64 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -2356,15 +2358,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2362,15 +2364,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
|
||||
@ -272,7 +272,7 @@ index 381b7ca30ac..54b81f74f64 100644
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@@ -2372,7 +2372,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2378,7 +2378,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
|
||||
{
|
||||
state_cleanup(&cs->state);
|
||||
@ -280,7 +280,7 @@ index 381b7ca30ac..54b81f74f64 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2383,7 +2382,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2389,7 +2388,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
{
|
||||
state_cleanup(&cs->state);
|
||||
@ -289,7 +289,7 @@ index 381b7ca30ac..54b81f74f64 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 625357e4407..62abafd4125 100644
|
||||
index 914b99c3d29..78ba0435323 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -957,7 +957,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -376,7 +376,7 @@ index 625357e4407..62abafd4125 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1950,7 +1925,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -1949,7 +1924,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
|
||||
@ -385,7 +385,7 @@ index 625357e4407..62abafd4125 100644
|
||||
return;
|
||||
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
@@ -3472,6 +3447,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3487,6 +3462,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
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)
|
||||
{
|
||||
@ -394,7 +394,7 @@ index 625357e4407..62abafd4125 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, debug_color(color), depth, stencil);
|
||||
|
||||
@@ -3483,7 +3460,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3498,7 +3475,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -403,7 +403,7 @@ index 625357e4407..62abafd4125 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3492,8 +3469,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3507,8 +3484,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -414,7 +414,7 @@ index 625357e4407..62abafd4125 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3843,8 +3820,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3858,8 +3835,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])
|
||||
{
|
||||
@ -425,7 +425,7 @@ index 625357e4407..62abafd4125 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4279,20 +4256,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4294,20 +4271,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ index 625357e4407..62abafd4125 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4329,13 +4307,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4344,13 +4322,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -465,7 +465,7 @@ index 625357e4407..62abafd4125 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. */
|
||||
@@ -4347,18 +4325,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4362,18 +4340,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)
|
||||
{
|
||||
@ -487,7 +487,7 @@ index 625357e4407..62abafd4125 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4624,10 +4603,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4639,10 +4618,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -499,7 +499,7 @@ index 625357e4407..62abafd4125 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4638,6 +4616,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4653,6 +4631,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
|
||||
if (reset_state)
|
||||
{
|
||||
@ -511,7 +511,7 @@ index 625357e4407..62abafd4125 100644
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Enumerating resource %p.\n", resource);
|
||||
@@ -4806,27 +4789,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4821,27 +4804,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
@ -547,7 +547,7 @@ index 625357e4407..62abafd4125 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4918,11 +4902,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4933,11 +4917,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -561,7 +561,7 @@ index 625357e4407..62abafd4125 100644
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
}
|
||||
|
||||
@@ -5048,8 +5032,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5063,8 +5047,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -590,7 +590,7 @@ index 48421ef545e..d8f2ad17f2e 100644
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_rendertarget_view *dsv, *rtv;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 16cdd28a18d..b5d64421b42 100644
|
||||
index e503d224655..ad3ef2672cf 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1630,7 +1630,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@ -603,10 +603,10 @@ index 16cdd28a18d..b5d64421b42 100644
|
||||
0.0f,
|
||||
0.0f,
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 6f012cd8953..7bb43754279 100644
|
||||
index 519d0293357..7230ab6453f 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3267,7 +3267,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -3271,7 +3271,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
UINT i;
|
||||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
@ -616,7 +616,7 @@ index 6f012cd8953..7bb43754279 100644
|
||||
static unsigned int warned = 0;
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 0d6d83af7c3..dad58208c79 100644
|
||||
index 04a1c84b203..dff3d050b10 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -679,7 +679,7 @@ index 0d6d83af7c3..dad58208c79 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4637,8 +4637,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4635,8 +4635,8 @@ 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)
|
||||
{
|
||||
@ -690,7 +690,7 @@ index 0d6d83af7c3..dad58208c79 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
unsigned int width, height;
|
||||
@@ -4677,8 +4677,8 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
|
||||
@@ -4675,8 +4675,8 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
|
||||
static void viewport_miscpart_cc(struct wined3d_context *context,
|
||||
const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -701,7 +701,7 @@ index 0d6d83af7c3..dad58208c79 100644
|
||||
float pixel_center_offset = context->d3d_info->wined3d_creation_flags
|
||||
& WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -4873,7 +4873,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4871,7 +4871,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -710,7 +710,7 @@ index 0d6d83af7c3..dad58208c79 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4949,7 +4949,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4947,7 +4947,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
|
||||
@ -820,10 +820,10 @@ index ad347082c4d..a823ccb3168 100644
|
||||
if (type == WINED3D_SBT_RECORDED)
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 33a0ecf0327..8d8142204ca 100644
|
||||
index e641dcc8b80..086bd2d7403 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2518,7 +2518,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -2487,7 +2487,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
{
|
||||
struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
struct wined3d_device *device = dst_texture->resource.device;
|
||||
@ -833,10 +833,10 @@ index 33a0ecf0327..8d8142204ca 100644
|
||||
struct wined3d_texture *src_texture;
|
||||
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 48879bcd6a0..4b737ade91b 100644
|
||||
index 04ff2f7b50e..cd210b9f9b7 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4640,7 +4640,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -4642,7 +4642,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = flip
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -845,7 +845,7 @@ index 48879bcd6a0..4b737ade91b 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? clip_control ? 1.0f : 2.0f : 0.0f;
|
||||
float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f;
|
||||
@@ -5439,7 +5439,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -5454,7 +5454,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -855,10 +855,10 @@ index 48879bcd6a0..4b737ade91b 100644
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2b7b658a162..7d921011577 100644
|
||||
index f384e6b7ae5..c9b40b190db 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1555,6 +1555,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1560,6 +1560,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;
|
||||
|
||||
@ -895,7 +895,7 @@ index 2b7b658a162..7d921011577 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1570,6 +1600,7 @@ struct wined3d_context
|
||||
@@ -1575,6 +1605,7 @@ struct wined3d_context
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
unsigned int dirty_compute_states[STATE_COMPUTE_COUNT / (sizeof(unsigned int) * CHAR_BIT) + 1];
|
||||
@ -903,7 +903,7 @@ index 2b7b658a162..7d921011577 100644
|
||||
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -1683,12 +1714,6 @@ struct wined3d_context
|
||||
@@ -1689,12 +1720,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -916,7 +916,7 @@ index 2b7b658a162..7d921011577 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -2512,7 +2537,7 @@ struct wined3d_stream_state
|
||||
@@ -2523,7 +2548,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -925,7 +925,7 @@ index 2b7b658a162..7d921011577 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2626,7 +2651,6 @@ struct wined3d_device
|
||||
@@ -2637,7 +2662,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -933,7 +933,7 @@ index 2b7b658a162..7d921011577 100644
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
/* Cursor management */
|
||||
@@ -3171,9 +3195,8 @@ void wined3d_state_enable_light(struct wined3d_state *state, const struct wined3
|
||||
@@ -3182,9 +3206,8 @@ void wined3d_state_enable_light(struct wined3d_state *state, const struct wined3
|
||||
struct wined3d_light_info *light_info, BOOL enable) DECLSPEC_HIDDEN;
|
||||
struct wined3d_light_info *wined3d_state_get_light(const struct wined3d_state *state,
|
||||
unsigned int idx) DECLSPEC_HIDDEN;
|
||||
@ -945,7 +945,7 @@ index 2b7b658a162..7d921011577 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
enum wined3d_push_constants
|
||||
@@ -3197,7 +3220,6 @@ struct wined3d_cs
|
||||
@@ -3208,7 +3231,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2b2c215c4a7b4f3d6f42701e30752ce81da4cb75 Mon Sep 17 00:00:00 2001
|
||||
From 0d9d017dd3eb6404143209e1e91d8c55b3d24832 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 14:31:56 +0200
|
||||
Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
@ -12,10 +12,10 @@ Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
5 files changed, 435 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index adffe0127bc..a9fa00224ac 100644
|
||||
index af868464970..d0417e7644a 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3714,6 +3714,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
@@ -3758,6 +3758,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
|
||||
TRACE("device %p, texture %p, sub_resource_idx %u.\n", device, texture, sub_resource_idx);
|
||||
|
||||
@ -26,7 +26,7 @@ index adffe0127bc..a9fa00224ac 100644
|
||||
current_context = NULL;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 6613f8845bf..698d19f6ec7 100644
|
||||
index 2f43fccfcc9..126c6c24431 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -18,6 +18,7 @@
|
||||
@ -370,16 +370,16 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
struct wined3d_shader_resource_view *prev;
|
||||
@@ -1248,6 +1290,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
|
||||
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
@@ -1250,6 +1292,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
else
|
||||
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1264,7 +1308,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1266,7 +1310,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_unordered_access_view *op = data;
|
||||
struct wined3d_unordered_access_view *prev;
|
||||
@@ -1278,6 +1322,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
@@ -1280,6 +1324,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
InterlockedDecrement(&prev->resource->bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
|
||||
@ -397,7 +397,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
|
||||
@@ -1294,12 +1340,14 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1296,7 +1342,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -406,14 +406,16 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_sampler *op = data;
|
||||
|
||||
cs->state.sampler[op->type][op->sampler_idx] = op->sampler;
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
@@ -1305,6 +1351,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
else
|
||||
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1316,7 +1364,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1321,7 +1369,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -422,16 +424,16 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_shader *op = data;
|
||||
|
||||
@@ -1324,6 +1372,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_SHADER(op->type));
|
||||
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
@@ -1331,6 +1379,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
else
|
||||
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -1338,12 +1388,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1345,12 +1395,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -447,7 +449,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1358,12 +1410,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1365,12 +1417,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -463,7 +465,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -1378,12 +1432,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1385,12 +1439,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -479,7 +481,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1400,12 +1456,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1407,12 +1463,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -495,7 +497,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1422,13 +1480,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1429,13 +1487,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -512,7 +514,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1444,12 +1504,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1451,12 +1511,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -528,7 +530,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1464,7 +1526,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1471,7 +1533,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -537,7 +539,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1525,6 +1587,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1532,6 +1594,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -546,7 +548,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1547,12 +1611,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1554,12 +1618,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -562,7 +564,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1566,7 +1632,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1573,7 +1639,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -571,7 +573,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_light *op = data;
|
||||
struct wined3d_light_info *light_info;
|
||||
@@ -1580,7 +1646,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1587,7 +1653,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
if (!(light_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*light_info))))
|
||||
{
|
||||
ERR("Failed to allocate light info.\n");
|
||||
@ -580,7 +582,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
hash_idx = LIGHTMAP_HASHFUNC(light_idx);
|
||||
@@ -1601,6 +1667,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1608,6 +1674,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
light_info->direction = op->light.direction;
|
||||
light_info->exponent = op->light.exponent;
|
||||
light_info->cutoff = op->light.cutoff;
|
||||
@ -589,7 +591,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light)
|
||||
@@ -1614,7 +1682,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1621,7 +1689,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -598,7 +600,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_light_enable *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -1624,7 +1692,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1631,7 +1699,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
if (!(light_info = wined3d_state_get_light(&cs->state, op->idx)))
|
||||
{
|
||||
ERR("Light doesn't exist.\n");
|
||||
@ -607,7 +609,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
prev_idx = light_info->glIndex;
|
||||
@@ -1634,6 +1702,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1641,6 +1709,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
device_invalidate_state(device, STATE_LIGHT_TYPE);
|
||||
device_invalidate_state(device, STATE_ACTIVELIGHT(op->enable ? light_info->glIndex : prev_idx));
|
||||
}
|
||||
@ -616,7 +618,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable)
|
||||
@@ -1648,7 +1718,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
@@ -1655,7 +1725,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -625,7 +627,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
HRESULT hr;
|
||||
@@ -1658,6 +1728,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1665,6 +1735,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
if (FAILED(hr = state_init(&cs->state, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
@ -634,7 +636,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1670,11 +1742,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1677,11 +1749,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -649,7 +651,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1699,12 +1773,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
@@ -1706,12 +1780,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
wined3d_cs_emit_callback(cs, callback, object);
|
||||
}
|
||||
|
||||
@ -665,7 +667,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1719,12 +1795,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1726,12 +1802,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -681,7 +683,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1743,13 +1821,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
@@ -1750,13 +1828,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -698,7 +700,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1765,13 +1845,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1772,13 +1852,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -715,7 +717,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1787,13 +1869,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1794,13 +1876,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -732,7 +734,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -1816,12 +1900,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1823,12 +1907,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -748,7 +750,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
@@ -1862,10 +1948,11 @@ push_constant_info[] =
|
||||
@@ -1869,10 +1955,11 @@ push_constant_info[] =
|
||||
{FIELD_OFFSET(struct wined3d_state, ps_consts_b), sizeof(BOOL), WINED3D_SHADER_CONST_PS_B},
|
||||
};
|
||||
|
||||
@ -761,7 +763,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
unsigned int context_count;
|
||||
unsigned int i;
|
||||
size_t offset;
|
||||
@@ -1881,6 +1968,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
@@ -1888,6 +1975,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
{
|
||||
device->contexts[i]->constant_update_mask |= push_constant_info[op->p].mask;
|
||||
}
|
||||
@ -770,7 +772,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
@@ -1898,7 +1987,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -1905,7 +1994,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -779,7 +781,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_set_primitive_type *op = data;
|
||||
GLenum prev;
|
||||
@@ -1909,6 +1998,8 @@ static void wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void
|
||||
@@ -1916,6 +2005,8 @@ static void wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void
|
||||
device_invalidate_state(cs->device, STATE_POINT_ENABLE);
|
||||
|
||||
cs->state.gl_primitive_type = op->gl_primitive_type;
|
||||
@ -788,7 +790,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_type)
|
||||
@@ -1922,7 +2013,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1929,7 +2020,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -797,7 +799,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_blt *op = data;
|
||||
|
||||
@@ -1933,6 +2024,8 @@ static void wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1940,6 +2031,8 @@ static void wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
wined3d_resource_release(&op->dst_surface->container->resource);
|
||||
if (op->src_surface && op->src_surface != op->dst_surface)
|
||||
wined3d_resource_release(&op->src_surface->container->resource);
|
||||
@ -806,7 +808,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
|
||||
@@ -1960,7 +2053,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -1967,7 +2060,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -815,7 +817,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_clear_rtv *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -1971,6 +2064,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1978,6 +2071,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
op->blitter->depth_fill(device, op->view, &op->rect, op->flags, op->depth, op->stencil);
|
||||
|
||||
wined3d_resource_release(op->view->resource);
|
||||
@ -824,7 +826,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
@@ -1995,7 +2090,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2002,7 +2097,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -833,7 +835,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_update_texture *op = data;
|
||||
struct wined3d_context *context;
|
||||
@@ -2006,6 +2101,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
@@ -2013,6 +2108,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
|
||||
wined3d_resource_release(&op->src->resource);
|
||||
wined3d_resource_release(&op->dst->resource);
|
||||
@ -842,7 +844,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
@@ -2024,7 +2121,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2031,7 +2128,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -851,7 +853,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_update_sub_resource *op = data;
|
||||
struct wined3d_const_bo_address addr;
|
||||
@@ -2040,7 +2137,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
@@ -2047,7 +2144,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
if (FAILED(hr = wined3d_buffer_upload_data(buffer, op->box, op->data)))
|
||||
WARN("Failed to update buffer data, hr %#x.\n", hr);
|
||||
|
||||
@ -860,7 +862,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
texture = wined3d_texture_from_resource(op->resource);
|
||||
@@ -2069,6 +2166,8 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
@@ -2076,6 +2173,8 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
|
||||
wined3d_texture_validate_location(texture, op->sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_invalidate_location(texture, op->sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -869,7 +871,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -2091,11 +2190,13 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2098,11 +2197,13 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -884,7 +886,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -2115,11 +2216,13 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
@@ -2122,11 +2223,13 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -899,7 +901,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -2139,11 +2242,13 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2146,11 +2249,13 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -914,7 +916,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
@@ -2161,11 +2266,13 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
|
||||
@@ -2168,11 +2273,13 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -929,7 +931,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
@@ -2179,7 +2286,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2186,7 +2293,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -938,7 +940,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -2197,6 +2304,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
@@ -2204,6 +2311,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_release(&texture->resource);
|
||||
@ -947,7 +949,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2218,7 +2327,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2225,7 +2334,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -956,7 +958,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_buffer_copy *op = data;
|
||||
HRESULT hr;
|
||||
@@ -2228,6 +2337,8 @@ static void wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2235,6 +2344,8 @@ static void wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
wined3d_resource_release(&op->dst_buffer->resource);
|
||||
wined3d_resource_release(&op->src_buffer->resource);
|
||||
@ -965,7 +967,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
|
||||
@@ -2250,7 +2361,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
@@ -2257,7 +2368,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -974,7 +976,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
const struct wined3d_cs_map_vertex_buffers *op = data;
|
||||
struct wined3d_state *state = &cs->device->state;
|
||||
@@ -2297,6 +2408,8 @@ static void wined3d_cs_exec_map_vertex_buffers(struct wined3d_cs *cs, const void
|
||||
@@ -2304,6 +2415,8 @@ static void wined3d_cs_exec_map_vertex_buffers(struct wined3d_cs *cs, const void
|
||||
}
|
||||
|
||||
context_release(context);
|
||||
@ -983,7 +985,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_map_vertex_buffers(struct wined3d_cs *cs, UINT src_start_idx,
|
||||
@@ -2312,7 +2425,7 @@ void wined3d_cs_emit_map_vertex_buffers(struct wined3d_cs *cs, UINT src_start_id
|
||||
@@ -2319,7 +2432,7 @@ void wined3d_cs_emit_map_vertex_buffers(struct wined3d_cs *cs, UINT src_start_id
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -992,7 +994,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@@ -2420,6 +2533,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2427,6 +2540,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -1194,7 +1196,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -2446,12 +2754,40 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2453,12 +2761,40 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1236,7 +1238,7 @@ index 6613f8845bf..698d19f6ec7 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 4c12fd3d9e5..7c0f4bb1bf0 100644
|
||||
index 4c2aa48b6c6..3961fcdc94d 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1263,7 +1263,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@ -1279,7 +1281,7 @@ index e7962465279..a8409cfd4b8 100644
|
||||
if (hkey) RegCloseKey( hkey );
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d731d7d4692..128e5be297e 100644
|
||||
index 5f027cf026c..44db7f1f96c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -306,6 +306,7 @@ struct wined3d_settings
|
||||
@ -1290,7 +1292,7 @@ index d731d7d4692..128e5be297e 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -2787,11 +2788,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2796,11 +2797,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@ -1302,7 +1304,7 @@ index d731d7d4692..128e5be297e 100644
|
||||
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
|
||||
enum wined3d_resource_type type, const struct wined3d_format *format,
|
||||
@@ -3212,6 +3208,21 @@ enum wined3d_push_constants
|
||||
@@ -3221,6 +3217,21 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@ -1324,7 +1326,7 @@ index d731d7d4692..128e5be297e 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3228,9 +3239,21 @@ struct wined3d_cs
|
||||
@@ -3237,9 +3248,21 @@ struct wined3d_cs
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user