mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 64e4a03a92498abea428dc567372f3996fa9dc3a.
This commit is contained in:
parent
3a8de0f3f4
commit
a781d341a5
@ -1,20 +1,16 @@
|
||||
From a3c2ca382ff462bd602e65fda389ada28268012b Mon Sep 17 00:00:00 2001
|
||||
From 959bc50b0ad246420e4f697e28371a3bb99f69f2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 15 Jan 2016 13:01:15 +0100
|
||||
Subject: kernelbase: Add dll and add stub for QuirkIsEnabled.
|
||||
|
||||
---
|
||||
.../api-ms-win-core-quirks-l1-1-0.spec | 2 +-
|
||||
dlls/kernelbase/Makefile.in | 3 ++
|
||||
dlls/kernelbase/kernelbase.spec | 2 +-
|
||||
dlls/kernelbase/misc.c | 37 ++++++++++++++++++++++
|
||||
dlls/shlwapi/shlwapi.spec | 2 +-
|
||||
tools/make_specfiles | 1 +
|
||||
6 files changed, 44 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/kernelbase/misc.c
|
||||
.../api-ms-win-core-quirks-l1-1-0.spec | 2 +-
|
||||
dlls/kernelbase/kernelbase.spec | 2 +-
|
||||
dlls/kernelbase/main.c | 10 ++++++++++
|
||||
3 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
|
||||
index 761120f6f6..54ce373b96 100644
|
||||
index e8f77c73f3..1485512d0e 100644
|
||||
--- a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
|
||||
@@ -1,6 +1,6 @@
|
||||
@ -23,19 +19,10 @@ index 761120f6f6..54ce373b96 100644
|
||||
-@ stub QuirkIsEnabled
|
||||
+@ stdcall QuirkIsEnabled(ptr) kernelbase.QuirkIsEnabled
|
||||
@ stub QuirkIsEnabled2
|
||||
@ stub QuirkIsEnabled3
|
||||
@ stdcall QuirkIsEnabled3(ptr ptr) kernelbase.QuirkIsEnabled3
|
||||
@ stub QuirkIsEnabledForPackage
|
||||
diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in
|
||||
index b9caed090b..2beb34bafd 100644
|
||||
--- a/dlls/kernelbase/Makefile.in
|
||||
+++ b/dlls/kernelbase/Makefile.in
|
||||
@@ -1 +1,4 @@
|
||||
MODULE = kernelbase.dll
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ misc.c
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index da7c50a820..3772842ca4 100644
|
||||
index 67003da332..9fba5803b2 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -1223,7 +1223,7 @@
|
||||
@ -45,44 +32,22 @@ index da7c50a820..3772842ca4 100644
|
||||
-# @ stub QuirkIsEnabled
|
||||
+@ stdcall QuirkIsEnabled(ptr)
|
||||
# @ stub QuirkIsEnabled2
|
||||
# @ stub QuirkIsEnabled3
|
||||
@ stdcall QuirkIsEnabled3(ptr ptr)
|
||||
# @ stub QuirkIsEnabledForPackage
|
||||
diff --git a/dlls/kernelbase/misc.c b/dlls/kernelbase/misc.c
|
||||
new file mode 100644
|
||||
index 0000000000..be1591aee7
|
||||
--- /dev/null
|
||||
+++ b/dlls/kernelbase/misc.c
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ * kernelbase
|
||||
+ *
|
||||
diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c
|
||||
index 30cba3f6ca..6673f9b63e 100644
|
||||
--- a/dlls/kernelbase/main.c
|
||||
+++ b/dlls/kernelbase/main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
+ * Copyright (c) 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"
|
||||
+#include <stdarg.h>
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
|
||||
+
|
||||
+/***********************************************************************
|
||||
* Copyright 2017 Andrey Gusev
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -21,6 +22,15 @@
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
|
||||
|
||||
/***********************************************************************
|
||||
+ * QuirkIsEnabled (KERNELBASE.@)
|
||||
+ */
|
||||
+BOOL WINAPI QuirkIsEnabled(void *arg)
|
||||
@ -90,31 +55,11 @@ index 0000000000..be1591aee7
|
||||
+ FIXME("(%p): stub\n", arg);
|
||||
+ return FALSE;
|
||||
+}
|
||||
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
|
||||
index 6b6ead2696..7c2a9d117e 100644
|
||||
--- a/dlls/shlwapi/shlwapi.spec
|
||||
+++ b/dlls/shlwapi/shlwapi.spec
|
||||
@@ -417,7 +417,7 @@
|
||||
417 stdcall -noname SHWinHelpOnDemandA(long str long ptr long)
|
||||
418 stdcall -ordinal MLFreeLibrary(long)
|
||||
419 stdcall -noname SHFlushSFCacheWrap()
|
||||
-420 stub @ # CMemStream::Commit
|
||||
+420 stub @ # CMemStream::Commit, don't forward
|
||||
421 stub -noname SHLoadPersistedDataObject
|
||||
422 stdcall -noname SHGlobalCounterCreateNamedA(str long)
|
||||
423 stdcall -noname SHGlobalCounterCreateNamedW(wstr long)
|
||||
diff --git a/tools/make_specfiles b/tools/make_specfiles
|
||||
index d00603a41f..7a54f75801 100755
|
||||
--- a/tools/make_specfiles
|
||||
+++ b/tools/make_specfiles
|
||||
@@ -252,6 +252,7 @@ my @dll_groups =
|
||||
[
|
||||
"kernel32",
|
||||
"advapi32",
|
||||
+ "shlwapi",
|
||||
"user32",
|
||||
"shlwapi",
|
||||
"version",
|
||||
+
|
||||
+/***********************************************************************
|
||||
* QuirkIsEnabled3 (KERNELBASE.@)
|
||||
*/
|
||||
BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 0238a83494068c02721b955ab2cc52e58e7ed5a4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 4 Feb 2016 06:19:57 +0100
|
||||
Subject: kernelbase: Add stub for QuirkIsEnabled3.
|
||||
|
||||
---
|
||||
.../api-ms-win-core-quirks-l1-1-0.spec | 2 +-
|
||||
dlls/kernelbase/kernelbase.spec | 2 +-
|
||||
dlls/kernelbase/misc.c | 10 ++++++++++
|
||||
3 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
|
||||
index 54ce373b96..1485512d0e 100644
|
||||
--- a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
|
||||
@@ -2,7 +2,7 @@
|
||||
@ stub QuirkGetData2
|
||||
@ stdcall QuirkIsEnabled(ptr) kernelbase.QuirkIsEnabled
|
||||
@ stub QuirkIsEnabled2
|
||||
-@ stub QuirkIsEnabled3
|
||||
+@ stdcall QuirkIsEnabled3(ptr ptr) kernelbase.QuirkIsEnabled3
|
||||
@ stub QuirkIsEnabledForPackage
|
||||
@ stub QuirkIsEnabledForPackage2
|
||||
@ stub QuirkIsEnabledForProcess
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index 3772842ca4..9fba5803b2 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -1225,7 +1225,7 @@
|
||||
# @ stub QuirkGetData2
|
||||
@ stdcall QuirkIsEnabled(ptr)
|
||||
# @ stub QuirkIsEnabled2
|
||||
-# @ stub QuirkIsEnabled3
|
||||
+@ stdcall QuirkIsEnabled3(ptr ptr)
|
||||
# @ stub QuirkIsEnabledForPackage
|
||||
# @ stub QuirkIsEnabledForPackage2
|
||||
# @ stub QuirkIsEnabledForPackage3
|
||||
diff --git a/dlls/kernelbase/misc.c b/dlls/kernelbase/misc.c
|
||||
index be1591aee7..e703e6d244 100644
|
||||
--- a/dlls/kernelbase/misc.c
|
||||
+++ b/dlls/kernelbase/misc.c
|
||||
@@ -35,3 +35,13 @@ BOOL WINAPI QuirkIsEnabled(void *arg)
|
||||
FIXME("(%p): stub\n", arg);
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * QuirkIsEnabled3 (KERNELBASE.@)
|
||||
+ */
|
||||
+BOOL WINAPI QuirkIsEnabled3(void *arg1, void *arg2)
|
||||
+{
|
||||
+ static int once;
|
||||
+ if (!once++) FIXME("(%p, %p): stub\n", arg1, arg2);
|
||||
+ return FALSE;
|
||||
+}
|
||||
--
|
||||
2.11.0
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "63bcfa3354edd910ee52b8134af191f7a774b701"
|
||||
echo "64e4a03a92498abea428dc567372f3996fa9dc3a"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -2788,10 +2788,10 @@ fi
|
||||
# | win-uxtheme-themes-l1-1-0.spec, dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in, dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-
|
||||
# | xaml-pal-l1-1-0.spec, dlls/ext-ms-win-xaml-pal-l1-1-0/main.c, dlls/feclient/Makefile.in, 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/uia_main.c, dlls/uiautomationcore/uiautomationcore.spec, include/Makefile.in,
|
||||
# | include/shellscalingapi.h, include/uiautomationcoreapi.h, tools/make_specfiles
|
||||
# | dlls/kernelbase/kernelbase.spec, dlls/kernelbase/main.c, dlls/shcore/Makefile.in, dlls/shcore/main.c,
|
||||
# | dlls/shcore/shcore.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
|
||||
patch_apply api-ms-win-Stub_DLLs/0001-kernelbase-Add-dll-and-add-stub-for-QuirkIsEnabled.patch
|
||||
@ -2812,7 +2812,6 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
patch_apply api-ms-win-Stub_DLLs/0019-api-ms-win-rtcore-ntuser-draw-l1-1-0-Add-dll.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0022-shcore-Add-SetProcessDpiAwareness-stub.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0023-shcore-Implement-stub-for-GetDpiForMonitor.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0024-kernelbase-Add-stub-for-QuirkIsEnabled3.patch
|
||||
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
|
||||
@ -2835,7 +2834,6 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
printf '%s\n' '+ { "Michael Müller", "api-ms-win-rtcore-ntuser-draw-l1-1-0: Add dll.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "shcore: Add SetProcessDpiAwareness stub.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "shcore: Implement stub for GetDpiForMonitor.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "kernelbase: Add stub for QuirkIsEnabled3.", 1 },';
|
||||
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 },';
|
||||
@ -8611,7 +8609,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Update the swap interval through the CS in reset.", 1 },';
|
||||
printf '%s\n' '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Avoid destroying views in color and depth fills.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Add a separate variable to check if queries are started.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wait for the cs to finish before destroying the device.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Add swapchain waits.", 1 },';
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 706645d08ae7ebd9175f91532077694b988aef7d Mon Sep 17 00:00:00 2001
|
||||
From bc0a87c3b6553fae719b2181bc878e8b9e59838c 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.
|
||||
@ -11,10 +11,10 @@ between surface_blt and surface_blt_ugly isn't particularly nice.
|
||||
2 files changed, 16 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c3a10a2d13a..31453ed0ff8 100644
|
||||
index 8fced7ece3..9dc893bfeb 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4154,16 +4154,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4148,16 +4148,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -41,12 +41,12 @@ index c3a10a2d13a..31453ed0ff8 100644
|
||||
|
||||
if (!src_box)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 60e53f55463..9d0909852cd 100644
|
||||
index 8a92a77872..2b249c26c0 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3189,8 +3189,13 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
@@ -3301,8 +3301,13 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
|| (src_texture && src_texture->sub_resources[src_sub_resource_idx].map_count))
|
||||
|| src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
- WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
|
||||
- return WINEDDERR_SURFACEBUSY;
|
||||
@ -59,7 +59,7 @@ index 60e53f55463..9d0909852cd 100644
|
||||
+ }
|
||||
}
|
||||
|
||||
if ((dst_format_flags & WINED3DFMT_FLAG_BLOCKS) && (flags & WINED3D_BLT_COLOR_FILL))
|
||||
if ((src_format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
From bf11cf98c90e7f841ac3ccc1860409f918325203 Mon Sep 17 00:00:00 2001
|
||||
From 8ec257b616f5e216f9c41eb5a08c8e1e10e57495 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 21:10:16 +0200
|
||||
Subject: wined3d: Send render target view clears through the command stream
|
||||
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 2 +-
|
||||
dlls/d3d9/tests/visual.c | 4 ++--
|
||||
dlls/wined3d/cs.c | 49 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 6 ++----
|
||||
dlls/wined3d/wined3d_private.h | 3 +++
|
||||
4 files changed, 55 insertions(+), 5 deletions(-)
|
||||
4 files changed, 56 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 7070895aa2..c3034c4909 100644
|
||||
index 7070895aa2..c14ac9e938 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -1337,7 +1337,7 @@ static void color_fill_test(void)
|
||||
@ -23,8 +23,17 @@ index 7070895aa2..c3034c4909 100644
|
||||
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
|
||||
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
|
||||
* when created as texture. */
|
||||
@@ -1458,7 +1458,7 @@ static void color_fill_test(void)
|
||||
{
|
||||
hr = IDirect3DDevice9_ColorFill(device, surface, &rect2, 0xdeadbeef);
|
||||
if (formats[i].flags & BLOCKS)
|
||||
- todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
else
|
||||
ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
}
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index bf1b63b897..72e177a41e 100644
|
||||
index 80a9322224..c30dfbc898 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -68,6 +68,7 @@ enum wined3d_cs_op
|
||||
@ -54,7 +63,7 @@ index bf1b63b897..72e177a41e 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1940,6 +1953,41 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -1952,6 +1965,41 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -96,7 +105,7 @@ index bf1b63b897..72e177a41e 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1984,6 +2032,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1996,6 +2044,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
@ -105,10 +114,10 @@ index bf1b63b897..72e177a41e 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 500506d789..f1b90f5ee1 100644
|
||||
index 9dc893bfeb..33c1451a99 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4328,10 +4328,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4324,10 +4324,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -122,10 +131,10 @@ index 500506d789..f1b90f5ee1 100644
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ad72e10d7a..59b446167b 100644
|
||||
index 26df981c77..43cca136d1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3232,6 +3232,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -3237,6 +3237,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
|
@ -1,100 +0,0 @@
|
||||
From 3d5c666305162466d808a7f8c8940264c9af019c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Thu, 7 Apr 2016 20:04:17 +0100
|
||||
Subject: wined3d: Avoid destroying views in color and depth fills.
|
||||
|
||||
---
|
||||
dlls/wined3d/surface.c | 54 ++++++++++++++++++++------------------------------
|
||||
1 file changed, 22 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 24c8941ed7..5169cd8cea 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -548,8 +548,7 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
struct wined3d_resource *resource = &surface->container->resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
const struct wined3d_blitter_ops *blitter;
|
||||
- struct wined3d_rendertarget_view *view;
|
||||
- struct wined3d_view_desc view_desc;
|
||||
+ struct wined3d_rendertarget_view view;
|
||||
HRESULT hr;
|
||||
|
||||
if (!(blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info,
|
||||
@@ -559,21 +558,17 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- view_desc.format_id = resource->format->id;
|
||||
- view_desc.flags = 0;
|
||||
- view_desc.u.texture.level_idx = surface->texture_level;
|
||||
- view_desc.u.texture.level_count = 1;
|
||||
- view_desc.u.texture.layer_idx = surface->texture_layer;
|
||||
- view_desc.u.texture.layer_count = 1;
|
||||
- if (FAILED(hr = wined3d_rendertarget_view_create(&view_desc,
|
||||
- resource, NULL, &wined3d_null_parent_ops, &view)))
|
||||
- {
|
||||
- ERR("Failed to create rendertarget view, hr %#x.\n", hr);
|
||||
- return hr;
|
||||
- }
|
||||
+ view.resource = resource;
|
||||
+ view.parent = NULL;
|
||||
+ view.parent_ops = &wined3d_null_parent_ops;
|
||||
+ view.format = resource->format;
|
||||
+ view.buffer_offset = 0;
|
||||
+ view.width = wined3d_texture_get_level_width(surface->container, surface->texture_level);
|
||||
+ view.height = wined3d_texture_get_level_height(surface->container, surface->texture_level);;
|
||||
+ view.depth = 1;
|
||||
+ view.sub_resource_idx = surface->texture_layer * surface->container->level_count + surface->texture_level;
|
||||
|
||||
- hr = blitter->depth_fill(device, view, rect, WINED3DCLEAR_ZBUFFER, depth, 0);
|
||||
- wined3d_rendertarget_view_decref(view);
|
||||
+ hr = blitter->depth_fill(device, &view, rect, WINED3DCLEAR_ZBUFFER, depth, 0);
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -2259,8 +2254,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
struct wined3d_resource *resource = &s->container->resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
const struct wined3d_blitter_ops *blitter;
|
||||
- struct wined3d_rendertarget_view *view;
|
||||
- struct wined3d_view_desc view_desc;
|
||||
+ struct wined3d_rendertarget_view view;
|
||||
HRESULT hr;
|
||||
|
||||
if (!(blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info,
|
||||
@@ -2270,21 +2264,17 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- view_desc.format_id = resource->format->id;
|
||||
- view_desc.flags = 0;
|
||||
- view_desc.u.texture.level_idx = s->texture_level;
|
||||
- view_desc.u.texture.level_count = 1;
|
||||
- view_desc.u.texture.layer_idx = s->texture_layer;
|
||||
- view_desc.u.texture.layer_count = 1;
|
||||
- if (FAILED(hr = wined3d_rendertarget_view_create(&view_desc,
|
||||
- resource, NULL, &wined3d_null_parent_ops, &view)))
|
||||
- {
|
||||
- ERR("Failed to create rendertarget view, hr %#x.\n", hr);
|
||||
- return hr;
|
||||
- }
|
||||
+ view.resource = resource;
|
||||
+ view.parent = NULL;
|
||||
+ view.parent_ops = &wined3d_null_parent_ops;
|
||||
+ view.format = resource->format;
|
||||
+ view.buffer_offset = 0;
|
||||
+ view.width = wined3d_texture_get_level_width(s->container, s->texture_level);
|
||||
+ view.height = wined3d_texture_get_level_height(s->container, s->texture_level);;
|
||||
+ view.depth = 1;
|
||||
+ view.sub_resource_idx = s->texture_layer * s->container->level_count + s->texture_level;
|
||||
|
||||
- hr = blitter->color_fill(device, view, rect, color);
|
||||
- wined3d_rendertarget_view_decref(view);
|
||||
+ hr = blitter->color_fill(device, &view, rect, color);
|
||||
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 64dd5bb16beb1eafba1cceda4b2ab8edcc5145e3 Mon Sep 17 00:00:00 2001
|
||||
From 45ae4084e646d64789015cf7d78b1ca80c1a01b9 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, 416 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 9fa12e0c70..9bce86f775 100644
|
||||
index 1d0aedd7ce..d0297d38e3 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3766,6 +3766,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
@@ -3787,6 +3787,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 9fa12e0c70..9bce86f775 100644
|
||||
current_context = NULL;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d0c0d94537..94de259603 100644
|
||||
index a2fecf1cd4..b9c206ef78 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -18,6 +18,7 @@
|
||||
@ -147,7 +147,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
struct wined3d_state *state = &cs->state;
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@@ -763,6 +780,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -768,6 +785,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
release_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
|
||||
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
|
||||
@ -156,7 +156,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -808,12 +827,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
@@ -818,12 +837,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -828,12 +849,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -838,12 +859,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -847,12 +870,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -857,12 +880,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -866,12 +891,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -876,12 +901,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -887,7 +914,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -897,7 +924,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -922,6 +949,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -932,6 +959,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -238,7 +238,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -935,12 +964,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -945,12 +974,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -954,7 +985,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -964,7 +995,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -972,6 +1003,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -982,6 +1013,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -272,7 +272,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -989,7 +1022,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -999,7 +1032,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -999,6 +1032,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -1009,6 +1042,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -290,7 +290,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -1014,7 +1049,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1024,7 +1059,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -299,16 +299,16 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -1029,6 +1064,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
@@ -1041,6 +1076,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAM_OUTPUT);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1045,7 +1082,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1057,7 +1094,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1061,6 +1098,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -1073,6 +1110,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -326,7 +326,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -1077,7 +1116,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1089,7 +1128,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1091,6 +1130,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -1103,6 +1142,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -343,7 +343,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1107,7 +1147,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1119,7 +1159,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -1184,6 +1224,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1196,6 +1236,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -361,7 +361,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -1198,7 +1240,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1210,7 +1252,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
struct wined3d_shader_resource_view *prev;
|
||||
@@ -1215,6 +1257,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
@@ -1227,6 +1269,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);
|
||||
@ -379,7 +379,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1231,7 +1275,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1243,7 +1287,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_unordered_access_view *op = data;
|
||||
struct wined3d_unordered_access_view *prev;
|
||||
@@ -1245,6 +1289,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
@@ -1257,6 +1301,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 d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
|
||||
@@ -1261,7 +1307,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1273,7 +1319,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_sampler *op = data;
|
||||
|
||||
@@ -1270,6 +1316,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1282,6 +1328,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);
|
||||
@ -415,7 +415,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1286,7 +1334,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1298,7 +1346,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -424,7 +424,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_shader *op = data;
|
||||
|
||||
@@ -1296,6 +1344,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1308,6 +1356,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);
|
||||
@ -433,7 +433,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -1310,12 +1360,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1322,12 +1372,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1330,12 +1382,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1342,12 +1394,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -1350,12 +1404,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1362,12 +1416,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1372,12 +1428,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1384,12 +1440,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1394,13 +1452,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1406,13 +1464,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1416,12 +1476,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1428,12 +1488,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -530,7 +530,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1436,7 +1498,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1448,7 +1510,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1497,6 +1559,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1509,6 +1571,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -548,7 +548,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1519,12 +1583,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1531,12 +1595,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1538,7 +1604,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1550,7 +1616,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_light *op = data;
|
||||
struct wined3d_light_info *light_info;
|
||||
@@ -1552,7 +1618,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1564,7 +1630,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");
|
||||
@ -582,7 +582,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
hash_idx = LIGHTMAP_HASHFUNC(light_idx);
|
||||
@@ -1573,6 +1639,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1585,6 +1651,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;
|
||||
@ -591,7 +591,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light)
|
||||
@@ -1586,7 +1654,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1598,7 +1666,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -600,7 +600,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_set_light_enable *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -1596,7 +1664,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1608,7 +1676,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");
|
||||
@ -609,7 +609,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
prev_idx = light_info->glIndex;
|
||||
@@ -1606,6 +1674,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1618,6 +1686,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));
|
||||
}
|
||||
@ -618,7 +618,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable)
|
||||
@@ -1620,7 +1690,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
@@ -1632,7 +1702,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -627,7 +627,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
|
||||
@@ -1628,6 +1698,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1640,6 +1710,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
memset(&cs->state, 0, sizeof(cs->state));
|
||||
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
@ -636,7 +636,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1640,11 +1712,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1652,11 +1724,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -651,7 +651,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1669,12 +1743,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
@@ -1681,12 +1755,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
wined3d_cs_emit_callback(cs, callback, object);
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1689,12 +1765,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1701,12 +1777,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1713,13 +1791,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
@@ -1725,13 +1803,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -700,7 +700,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1735,13 +1815,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1747,13 +1827,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -717,7 +717,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1757,13 +1839,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1769,13 +1851,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -734,7 +734,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -1786,12 +1870,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1798,12 +1882,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
@@ -1810,7 +1896,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1822,7 +1908,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -759,7 +759,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_blt_sub_resource *op = data;
|
||||
|
||||
@@ -1849,6 +1935,8 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
||||
@@ -1861,6 +1947,8 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
||||
if (op->src_resource)
|
||||
wined3d_resource_release(op->src_resource);
|
||||
wined3d_resource_release(op->dst_resource);
|
||||
@ -768,7 +768,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource,
|
||||
@@ -1878,7 +1966,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1890,7 +1978,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_update_sub_resource *op = data;
|
||||
const struct wined3d_box *box = &op->box;
|
||||
@@ -1928,6 +2016,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
@@ -1940,6 +2028,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
|
||||
done:
|
||||
wined3d_resource_release(op->resource);
|
||||
@ -785,7 +785,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1972,10 +2061,11 @@ push_constant_info[] =
|
||||
@@ -1984,10 +2073,11 @@ push_constant_info[] =
|
||||
{FIELD_OFFSET(struct wined3d_state, ps_consts_b), sizeof(BOOL), WINED3D_SHADER_CONST_PS_B},
|
||||
};
|
||||
|
||||
@ -798,7 +798,7 @@ index d0c0d94537..94de259603 100644
|
||||
unsigned int context_count;
|
||||
unsigned int i;
|
||||
size_t offset;
|
||||
@@ -1991,6 +2081,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
@@ -2003,6 +2093,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;
|
||||
}
|
||||
@ -807,7 +807,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
@@ -2008,7 +2100,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2020,7 +2112,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -816,7 +816,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_clear_rtv *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -2019,6 +2111,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2031,6 +2123,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);
|
||||
@ -825,7 +825,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
@@ -2043,7 +2137,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2055,7 +2149,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_update_texture *op = data;
|
||||
struct wined3d_context *context;
|
||||
@@ -2054,6 +2148,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
@@ -2066,6 +2160,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);
|
||||
@ -843,7 +843,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
@@ -2072,11 +2168,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2084,11 +2180,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -858,7 +858,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
@@ -2090,7 +2188,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2102,7 +2200,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -867,7 +867,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -2108,6 +2206,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
@@ -2120,6 +2218,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_release(&texture->resource);
|
||||
@ -876,7 +876,7 @@ index d0c0d94537..94de259603 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2129,7 +2229,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2141,7 +2241,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -885,7 +885,7 @@ index d0c0d94537..94de259603 100644
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@@ -2231,6 +2331,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2243,6 +2343,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -1087,7 +1087,7 @@ index d0c0d94537..94de259603 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -2260,12 +2555,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2272,12 +2567,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1130,10 +1130,10 @@ index d0c0d94537..94de259603 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index b271e72c98..abfdcb1cd0 100644
|
||||
index 603bb27c6c..324219870b 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1310,7 +1310,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@@ -1304,7 +1304,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
|
||||
/* We can not acquire the context unless there is a swapchain. */
|
||||
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
|
||||
@ -1143,7 +1143,7 @@ index b271e72c98..abfdcb1cd0 100644
|
||||
GLint vram_free_kb;
|
||||
UINT64 vram_free;
|
||||
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
|
||||
index aaced215de..473a7550bd 100644
|
||||
index 1ce5937f17..4ef747ca89 100644
|
||||
--- a/dlls/wined3d/wined3d_main.c
|
||||
+++ b/dlls/wined3d/wined3d_main.c
|
||||
@@ -90,6 +90,7 @@ struct wined3d_settings wined3d_settings =
|
||||
@ -1173,10 +1173,10 @@ index aaced215de..473a7550bd 100644
|
||||
if (hkey) RegCloseKey( hkey );
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 5cdb7f1ea5..4e8fca716e 100644
|
||||
index d2484ba2c0..7ce9ab2ad3 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -391,6 +391,7 @@ struct wined3d_settings
|
||||
@@ -390,6 +390,7 @@ struct wined3d_settings
|
||||
unsigned int max_sm_ps;
|
||||
unsigned int max_sm_cs;
|
||||
BOOL no_3d;
|
||||
@ -1184,7 +1184,7 @@ index 5cdb7f1ea5..4e8fca716e 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -2805,11 +2806,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2806,11 +2807,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@ -1196,7 +1196,7 @@ index 5cdb7f1ea5..4e8fca716e 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,
|
||||
@@ -3220,6 +3216,21 @@ enum wined3d_push_constants
|
||||
@@ -3222,6 +3218,21 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@ -1218,7 +1218,7 @@ index 5cdb7f1ea5..4e8fca716e 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3237,9 +3248,21 @@ struct wined3d_cs
|
||||
@@ -3239,9 +3250,21 @@ struct wined3d_cs
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
|
||||
|
@ -23,10 +23,22 @@ diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
|
||||
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
|
||||
* when created as texture. */
|
||||
@@ -1458,7 +1462,11 @@ static void color_fill_test(void)
|
||||
{
|
||||
hr = IDirect3DDevice9_ColorFill(device, surface, &rect2, 0xdeadbeef);
|
||||
if (formats[i].flags & BLOCKS)
|
||||
+#if !defined(STAGING_CSMT)
|
||||
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
+#endif /* STAGING_CSMT */
|
||||
else
|
||||
ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
}
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1265,6 +1265,9 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
@@ -1279,6 +1279,9 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
const struct wined3d_box *box, const void *data)
|
||||
{
|
||||
UINT offset, size;
|
||||
@ -36,7 +48,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
HRESULT hr;
|
||||
BYTE *ptr;
|
||||
|
||||
@@ -1279,7 +1282,14 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
@@ -1293,7 +1296,14 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
size = buffer->resource.size;
|
||||
}
|
||||
|
||||
@ -54,7 +66,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3758,6 +3758,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
@@ -3787,6 +3787,11 @@ 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);
|
||||
|
||||
@ -390,7 +402,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
struct wined3d_state *state = &cs->state;
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@@ -649,6 +838,10 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -654,6 +843,10 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
release_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
|
||||
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
|
||||
@ -401,7 +413,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -658,7 +851,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
@@ -663,7 +856,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
struct wined3d_cs_draw *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -413,7 +425,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
op->primitive_type = primitive_type;
|
||||
op->base_vertex_idx = base_vertex_idx;
|
||||
@@ -694,70 +891,123 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
@@ -704,70 +901,123 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -537,7 +549,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -765,15 +1015,26 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -775,15 +1025,26 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
{
|
||||
struct wined3d_cs_set_rendertarget_view *op;
|
||||
|
||||
@ -564,7 +576,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -808,39 +1069,69 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -818,39 +1079,69 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -634,7 +646,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -858,6 +1149,10 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -868,6 +1159,10 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -645,7 +657,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -865,17 +1160,28 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -875,17 +1170,28 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_source *op;
|
||||
|
||||
@ -674,7 +686,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -885,22 +1191,37 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -895,22 +1201,37 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -712,10 +724,10 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -915,6 +1236,10 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
@@ -927,6 +1248,10 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAM_OUTPUT);
|
||||
+#if defined(STAGING_CSMT)
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
@ -723,7 +735,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -922,16 +1247,27 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -934,16 +1259,27 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_output *op;
|
||||
|
||||
@ -751,7 +763,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -947,6 +1283,10 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -959,6 +1295,10 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -762,7 +774,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -954,16 +1294,27 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -966,16 +1306,27 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
{
|
||||
struct wined3d_cs_set_index_buffer *op;
|
||||
|
||||
@ -790,7 +802,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -977,6 +1328,9 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -989,6 +1340,9 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -800,7 +812,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -984,16 +1338,27 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -996,16 +1350,27 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
{
|
||||
struct wined3d_cs_set_constant_buffer *op;
|
||||
|
||||
@ -828,7 +840,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -1070,21 +1435,36 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1082,21 +1447,36 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -865,7 +877,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
struct wined3d_shader_resource_view *prev;
|
||||
@@ -1101,6 +1481,10 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
@@ -1113,6 +1493,10 @@ 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);
|
||||
@ -876,7 +888,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1108,16 +1492,27 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1120,16 +1504,27 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
{
|
||||
struct wined3d_cs_set_shader_resource_view *op;
|
||||
|
||||
@ -904,7 +916,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_unordered_access_view *op = data;
|
||||
struct wined3d_unordered_access_view *prev;
|
||||
@@ -1131,6 +1526,10 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
@@ -1143,6 +1538,10 @@ 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));
|
||||
@ -915,7 +927,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
|
||||
@@ -1138,16 +1537,27 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1150,16 +1549,27 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
{
|
||||
struct wined3d_cs_set_unordered_access_view *op;
|
||||
|
||||
@ -943,7 +955,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_sampler *op = data;
|
||||
|
||||
@@ -1156,6 +1566,10 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1168,6 +1578,10 @@ 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);
|
||||
@ -954,7 +966,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1163,16 +1577,27 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1175,16 +1589,27 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
{
|
||||
struct wined3d_cs_set_sampler *op;
|
||||
|
||||
@ -982,7 +994,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_shader *op = data;
|
||||
|
||||
@@ -1182,26 +1607,45 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1194,26 +1619,45 @@ 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);
|
||||
@ -1028,7 +1040,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1209,39 +1653,69 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1221,39 +1665,69 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
{
|
||||
struct wined3d_cs_set_rasterizer_state *op;
|
||||
|
||||
@ -1098,7 +1110,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1249,21 +1723,36 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1261,21 +1735,36 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
{
|
||||
struct wined3d_cs_set_texture_state *op;
|
||||
|
||||
@ -1135,7 +1147,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1271,22 +1760,37 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1283,22 +1772,37 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
{
|
||||
struct wined3d_cs_set_sampler_state *op;
|
||||
|
||||
@ -1173,7 +1185,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1294,35 +1798,61 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1306,35 +1810,61 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
{
|
||||
struct wined3d_cs_set_transform *op;
|
||||
|
||||
@ -1235,7 +1247,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1383,6 +1913,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1395,6 +1925,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1246,7 +1258,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1390,7 +1924,11 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1402,7 +1936,11 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
{
|
||||
struct wined3d_cs_set_color_key *op;
|
||||
|
||||
@ -1258,7 +1270,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
|
||||
op->texture = texture;
|
||||
op->flags = flags;
|
||||
@@ -1402,29 +1940,51 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1414,29 +1952,51 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -1310,7 +1322,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_light *op = data;
|
||||
struct wined3d_light_info *light_info;
|
||||
@@ -1438,7 +1998,11 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1450,7 +2010,11 @@ 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");
|
||||
@ -1322,7 +1334,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
hash_idx = LIGHTMAP_HASHFUNC(light_idx);
|
||||
@@ -1459,20 +2023,35 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1471,20 +2035,35 @@ 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;
|
||||
@ -1358,7 +1370,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_light_enable *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -1482,7 +2061,11 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1494,7 +2073,11 @@ 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");
|
||||
@ -1370,7 +1382,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
prev_idx = light_info->glIndex;
|
||||
@@ -1492,21 +2075,36 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1504,21 +2087,36 @@ 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));
|
||||
}
|
||||
@ -1407,7 +1419,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
|
||||
@@ -1514,12 +2112,17 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1526,12 +2124,17 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
memset(&cs->state, 0, sizeof(cs->state));
|
||||
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
@ -1425,7 +1437,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@@ -1527,17 +2130,34 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1539,17 +2142,34 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_callback(struct wined3d_cs *cs, const void *data)
|
||||
@ -1460,7 +1472,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_CALLBACK;
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
@@ -1555,40 +2175,103 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
@@ -1567,40 +2187,103 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
wined3d_cs_emit_callback(cs, callback, object);
|
||||
}
|
||||
|
||||
@ -1564,7 +1576,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1597,20 +2280,32 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1609,20 +2292,32 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -1597,7 +1609,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1619,13 +2314,21 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1631,13 +2326,21 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -1619,7 +1631,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -1634,7 +2337,11 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1646,7 +2349,11 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
struct wined3d_cs_map *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -1631,7 +1643,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_MAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1643,17 +2350,29 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1655,17 +2362,29 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
op->flags = flags;
|
||||
op->hr = &hr;
|
||||
|
||||
@ -1661,7 +1673,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
@@ -1661,18 +2380,30 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1673,18 +2392,30 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
struct wined3d_cs_unmap *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -1692,7 +1704,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_blt_sub_resource *op = data;
|
||||
|
||||
@@ -1711,6 +2442,10 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
||||
@@ -1723,6 +2454,10 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
||||
if (op->src_resource)
|
||||
wined3d_resource_release(op->src_resource);
|
||||
wined3d_resource_release(op->dst_resource);
|
||||
@ -1703,7 +1715,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource,
|
||||
@@ -1720,7 +2455,11 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1732,7 +2467,11 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
{
|
||||
struct wined3d_cs_blt_sub_resource *op;
|
||||
|
||||
@ -1715,7 +1727,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_BLT_SUB_RESOURCE;
|
||||
op->dst_resource = dst_resource;
|
||||
op->dst_sub_resource_idx = dst_sub_resource_idx;
|
||||
@@ -1740,7 +2479,11 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1752,7 +2491,11 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -1727,7 +1739,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_update_sub_resource *op = data;
|
||||
const struct wined3d_box *box = &op->box;
|
||||
@@ -1790,6 +2533,9 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
@@ -1802,6 +2545,9 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
|
||||
done:
|
||||
wined3d_resource_release(op->resource);
|
||||
@ -1737,7 +1749,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1797,9 +2543,60 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -1809,9 +2555,60 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
unsigned int slice_pitch)
|
||||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
@ -1798,7 +1810,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
op->box = *box;
|
||||
@@ -1809,11 +2606,210 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -1821,11 +2618,210 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
@ -2009,7 +2021,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch,
|
||||
@@ -1847,15 +2843,29 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1859,15 +2855,29 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
/* WINED3D_CS_OP_CALLBACK */ wined3d_cs_exec_callback,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@ -2039,7 +2051,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
if (size > (cs->data_size - cs->end))
|
||||
{
|
||||
@@ -1899,6 +2909,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
@@ -1911,6 +2921,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
}
|
||||
|
||||
@ -2047,7 +2059,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants)
|
||||
{
|
||||
@@ -1939,15 +2950,271 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus
|
||||
@@ -1951,15 +2962,271 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus
|
||||
for (i = 0, context_count = device->context_count; i < context_count; ++i)
|
||||
{
|
||||
device->contexts[i]->constant_update_mask |= push_constant_info[p].mask;
|
||||
@ -2319,7 +2331,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
@@ -1978,12 +3245,57 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1990,12 +3257,57 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2380,7 +2392,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1037,6 +1037,9 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||
@@ -1023,6 +1023,9 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||
static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_cs_destroy_object(device->cs, wined3d_device_delete_opengl_contexts_cs, device);
|
||||
@ -2390,7 +2402,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1072,6 +1075,9 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1058,6 +1061,9 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
static HRESULT wined3d_device_create_primary_opengl_context(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_cs_init_object(device->cs, wined3d_device_create_primary_opengl_context_cs, device);
|
||||
@ -2400,7 +2412,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (!device->swapchains[0]->num_contexts)
|
||||
return E_FAIL;
|
||||
|
||||
@@ -1216,6 +1222,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1202,6 +1208,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (!device->d3d_initialized)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -2411,7 +2423,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (device->logo_texture)
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
if (device->cursor_texture)
|
||||
@@ -1225,6 +1235,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1211,6 +1221,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
|
||||
@ -2421,7 +2433,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
if (device->fb.depth_stencil)
|
||||
@@ -1314,7 +1327,11 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@@ -1300,7 +1313,11 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
|
||||
/* We can not acquire the context unless there is a swapchain. */
|
||||
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
|
||||
@ -2433,7 +2445,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
GLint vram_free_kb;
|
||||
UINT64 vram_free;
|
||||
@@ -2382,7 +2399,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2368,7 +2385,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2445,7 +2457,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2431,7 +2452,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@@ -2417,7 +2438,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2457,7 +2469,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2476,7 +2501,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2462,7 +2487,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
@ -2469,7 +2481,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2597,7 +2626,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2583,7 +2612,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2481,7 +2493,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2646,7 +2679,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
@@ -2632,7 +2665,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2493,7 +2505,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2692,7 +2729,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2678,7 +2715,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
@ -2505,7 +2517,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -3510,8 +3551,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
|
||||
@@ -3496,8 +3537,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
|
||||
|
||||
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
{
|
||||
@ -2516,7 +2528,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
if (!device->inScene)
|
||||
@@ -3520,6 +3563,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3506,6 +3549,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -2524,7 +2536,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
context = context_acquire(device, NULL, 0);
|
||||
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
context->gl_info->gl_ops.gl.p_glFlush();
|
||||
@@ -3527,6 +3571,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3513,6 +3557,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
* fails. */
|
||||
context_release(context);
|
||||
|
||||
@ -2532,7 +2544,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->inScene = FALSE;
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -3674,11 +3719,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3660,11 +3705,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
start_idx, index_count, start_instance, instance_count, TRUE);
|
||||
}
|
||||
|
||||
@ -2550,7 +2562,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_map_desc src;
|
||||
HRESULT hr = WINED3D_OK;
|
||||
@@ -3702,6 +3753,13 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3688,6 +3739,13 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
}
|
||||
|
||||
context = context_acquire(device, NULL, 0);
|
||||
@ -2564,7 +2576,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Only a prepare, since we're uploading entire volumes. */
|
||||
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
|
||||
@@ -3709,15 +3767,22 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3695,15 +3753,22 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@ -2587,7 +2599,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i)))
|
||||
goto done;
|
||||
}
|
||||
@@ -3725,16 +3790,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3711,16 +3776,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
done:
|
||||
context_release(context);
|
||||
return hr;
|
||||
@ -2677,7 +2689,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
|
||||
@@ -3771,6 +3909,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3757,6 +3895,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -2685,7 +2697,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
level_count = min(wined3d_texture_get_level_count(src_texture),
|
||||
wined3d_texture_get_level_count(dst_texture));
|
||||
|
||||
@@ -3793,9 +3932,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3779,9 +3918,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
context_release(context);
|
||||
|
||||
/* Update every surface level of the texture. */
|
||||
@ -2707,7 +2719,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
unsigned int src_levels = src_texture->level_count;
|
||||
unsigned int dst_levels = dst_texture->level_count;
|
||||
@@ -3828,6 +3979,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3814,6 +3965,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
FIXME("Unsupported texture type %#x.\n", type);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@ -2746,7 +2758,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
@@ -4160,6 +4343,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4146,6 +4329,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -2754,7 +2766,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
|
||||
{
|
||||
WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
|
||||
@@ -4170,6 +4354,18 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4156,6 +4340,18 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
{
|
||||
WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
@ -2773,7 +2785,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (!src_box)
|
||||
@@ -4326,10 +4522,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4322,10 +4518,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -2789,7 +2801,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
@@ -4899,7 +5100,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4897,7 +5098,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
{
|
||||
if (reset_state)
|
||||
hr = wined3d_device_create_primary_opengl_context(device);
|
||||
@ -2801,7 +2813,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
@@ -5214,3 +5419,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5212,3 +5417,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -2964,89 +2976,7 @@ diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -548,8 +548,12 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
struct wined3d_resource *resource = &surface->container->resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
const struct wined3d_blitter_ops *blitter;
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_rendertarget_view *view;
|
||||
struct wined3d_view_desc view_desc;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_rendertarget_view view;
|
||||
+#endif /* STAGING_CSMT */
|
||||
HRESULT hr;
|
||||
|
||||
if (!(blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info,
|
||||
@@ -559,6 +563,7 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
view_desc.format_id = resource->format->id;
|
||||
view_desc.flags = 0;
|
||||
view_desc.u.texture.level_idx = surface->texture_level;
|
||||
@@ -574,6 +579,19 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
|
||||
hr = blitter->depth_fill(device, view, rect, WINED3DCLEAR_ZBUFFER, depth, 0);
|
||||
wined3d_rendertarget_view_decref(view);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ view.resource = resource;
|
||||
+ view.parent = NULL;
|
||||
+ view.parent_ops = &wined3d_null_parent_ops;
|
||||
+ view.format = resource->format;
|
||||
+ view.buffer_offset = 0;
|
||||
+ view.width = wined3d_texture_get_level_width(surface->container, surface->texture_level);
|
||||
+ view.height = wined3d_texture_get_level_height(surface->container, surface->texture_level);;
|
||||
+ view.depth = 1;
|
||||
+ view.sub_resource_idx = surface->texture_layer * surface->container->level_count + surface->texture_level;
|
||||
+
|
||||
+ hr = blitter->depth_fill(device, &view, rect, WINED3DCLEAR_ZBUFFER, depth, 0);
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -2259,8 +2277,12 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
struct wined3d_resource *resource = &s->container->resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
const struct wined3d_blitter_ops *blitter;
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_rendertarget_view *view;
|
||||
struct wined3d_view_desc view_desc;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_rendertarget_view view;
|
||||
+#endif /* STAGING_CSMT */
|
||||
HRESULT hr;
|
||||
|
||||
if (!(blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info,
|
||||
@@ -2270,6 +2292,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
view_desc.format_id = resource->format->id;
|
||||
view_desc.flags = 0;
|
||||
view_desc.u.texture.level_idx = s->texture_level;
|
||||
@@ -2285,6 +2308,19 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
|
||||
hr = blitter->color_fill(device, view, rect, color);
|
||||
wined3d_rendertarget_view_decref(view);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ view.resource = resource;
|
||||
+ view.parent = NULL;
|
||||
+ view.parent_ops = &wined3d_null_parent_ops;
|
||||
+ view.format = resource->format;
|
||||
+ view.buffer_offset = 0;
|
||||
+ view.width = wined3d_texture_get_level_width(s->container, s->texture_level);
|
||||
+ view.height = wined3d_texture_get_level_height(s->container, s->texture_level);;
|
||||
+ view.depth = 1;
|
||||
+ view.sub_resource_idx = s->texture_layer * s->container->level_count + s->texture_level;
|
||||
+
|
||||
+ hr = blitter->color_fill(device, &view, rect, color);
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -2611,7 +2647,11 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -2464,7 +2464,11 @@ static BOOL 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. */
|
||||
@ -3084,7 +3014,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
swapchain_cleanup(swapchain);
|
||||
swapchain->parent_ops->wined3d_object_destroyed(swapchain->parent);
|
||||
HeapFree(GetProcessHeap(), 0, swapchain);
|
||||
@@ -525,7 +534,11 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
|
||||
@@ -487,7 +496,11 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
|
||||
swapchain_blit(swapchain, context, src_rect, dst_rect);
|
||||
}
|
||||
|
||||
@ -3096,7 +3026,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
|
||||
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
|
||||
@@ -905,6 +918,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
@@ -867,6 +880,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
}
|
||||
|
||||
wined3d_cs_init_object(device->cs, wined3d_swapchain_cs_init, swapchain);
|
||||
@ -3106,7 +3036,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
if (!swapchain->context[0])
|
||||
{
|
||||
@@ -1045,6 +1061,10 @@ static struct wined3d_context *swapchain_create_context(struct wined3d_swapchain
|
||||
@@ -1007,6 +1023,10 @@ static struct wined3d_context *swapchain_create_context(struct wined3d_swapchain
|
||||
|
||||
TRACE("Creating a new context for swapchain %p, thread %u.\n", swapchain, GetCurrentThreadId());
|
||||
|
||||
@ -3117,7 +3047,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
if (!(ctx = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format)))
|
||||
{
|
||||
ERR("Failed to create a new context for the swapchain\n");
|
||||
@@ -1231,6 +1251,9 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha
|
||||
@@ -1193,6 +1213,9 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha
|
||||
enum wined3d_multisample_type multisample_type, unsigned int multisample_quality)
|
||||
{
|
||||
BOOL update_desc = FALSE;
|
||||
@ -3127,7 +3057,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
TRACE("swapchain %p, buffer_count %u, width %u, height %u, format %s, "
|
||||
"multisample_type %#x, multisample_quality %#x.\n",
|
||||
@@ -1242,6 +1265,10 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha
|
||||
@@ -1204,6 +1227,10 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha
|
||||
if (buffer_count && buffer_count != swapchain->desc.backbuffer_count)
|
||||
FIXME("Cannot change the back buffer count yet.\n");
|
||||
|
||||
@ -3410,9 +3340,9 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -3299,8 +3398,18 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
@@ -3296,8 +3395,18 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
|| (src_texture && src_texture->sub_resources[src_sub_resource_idx].map_count))
|
||||
|| src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
|
||||
@ -3428,8 +3358,8 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
if ((dst_format_flags & WINED3DFMT_FLAG_BLOCKS) && (flags & WINED3D_BLT_COLOR_FILL))
|
||||
@@ -3649,7 +3758,14 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
if ((src_format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
@@ -3639,7 +3748,14 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
if (!surface->dc)
|
||||
@ -3444,7 +3374,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (!surface->dc)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@@ -3693,7 +3809,14 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -3683,7 +3799,14 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
}
|
||||
|
||||
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
@ -3551,7 +3481,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -1572,6 +1575,10 @@ struct wined3d_query
|
||||
@@ -1575,6 +1578,10 @@ struct wined3d_query
|
||||
const void *data;
|
||||
DWORD data_size;
|
||||
const struct wined3d_query_ops *query_ops;
|
||||
@ -3562,7 +3492,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -1613,6 +1620,9 @@ struct wined3d_occlusion_query
|
||||
@@ -1616,6 +1623,9 @@ struct wined3d_occlusion_query
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
UINT64 samples;
|
||||
@ -3572,7 +3502,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -2597,6 +2607,16 @@ struct wined3d_state
|
||||
@@ -2604,6 +2614,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -3589,7 +3519,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2709,6 +2729,14 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2716,6 +2736,14 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@ -3604,7 +3534,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2784,11 +2812,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2791,11 +2819,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@ -3618,7 +3548,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
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,
|
||||
@@ -2899,7 +2929,11 @@ struct wined3d_texture
|
||||
@@ -2906,7 +2936,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -3630,7 +3560,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -3202,6 +3236,7 @@ enum wined3d_push_constants
|
||||
@@ -3207,6 +3241,7 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@ -3638,7 +3568,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3209,6 +3244,33 @@ struct wined3d_cs_ops
|
||||
@@ -3214,6 +3249,33 @@ struct wined3d_cs_ops
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@ -3672,7 +3602,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_cs
|
||||
{
|
||||
@@ -3219,8 +3281,31 @@ struct wined3d_cs
|
||||
@@ -3224,8 +3286,31 @@ struct wined3d_cs
|
||||
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
@ -3704,7 +3634,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
|
||||
@@ -3231,15 +3316,30 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -3236,15 +3321,30 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
@ -3735,7 +3665,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
@@ -3287,10 +3387,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3292,10 +3392,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
@ -3756,7 +3686,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_init_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -3298,12 +3408,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3303,12 +3413,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user