You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
113 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cfe44f6d5d | ||
|
88a18586d3 | ||
|
85d7293a41 | ||
|
a71e4cdf85 | ||
|
5378adafaa | ||
|
be3928a809 | ||
|
f308782dad | ||
|
e3ec587726 | ||
|
b595359adf | ||
|
ab2f8734d9 | ||
|
f7a08f5969 | ||
|
f867740029 | ||
|
667cea7592 | ||
|
dbdde3ad10 | ||
|
e2875bb754 | ||
|
180ba8c931 | ||
|
0df3e892fb | ||
|
234a9fe775 | ||
|
7f18df4633 | ||
|
8e5c8cc63b | ||
|
7c888e7fee | ||
|
0f00e37c68 | ||
|
8c06be6529 | ||
|
50d26744b0 | ||
|
046b1ab22c | ||
|
1ebf4bd23f | ||
|
b113f99f07 | ||
|
813bfa288e | ||
|
c814617e2c | ||
|
cb7a9792d7 | ||
|
96a8cc2920 | ||
|
a1a2d65488 | ||
|
7d496bf02c | ||
|
4d8896cc35 | ||
|
977e5237da | ||
|
708e63e63f | ||
|
921d247b6b | ||
|
a918fa9a1c | ||
|
592b9480ef | ||
|
552dc36846 | ||
|
deed76f394 | ||
|
20e795b107 | ||
|
ac30cf5d62 | ||
|
99759f003a | ||
|
7eb07f1d50 | ||
|
68f87944cf | ||
|
0c8991562d | ||
|
27fae2dc15 | ||
|
39f66ddd9f | ||
|
33d85bda8a | ||
|
ba9a7a6a74 | ||
|
85fbfed5eb | ||
|
20303a53ec | ||
|
30c9d5a0f8 | ||
|
425f75f839 | ||
|
d805441f46 | ||
|
2211b6664e | ||
|
a886228fbc | ||
|
e353590528 | ||
|
b582d2d018 | ||
|
00aab80494 | ||
|
86424f3ac1 | ||
|
661df7b889 | ||
|
64ea26c0cb | ||
|
9319c38de2 | ||
|
03f7334e65 | ||
|
eb40bf85d6 | ||
|
d1169e15ee | ||
|
0c295023f1 | ||
|
733a420dd7 | ||
|
545073aafa | ||
|
4e2dc89043 | ||
|
2929606a6a | ||
|
d90a798a26 | ||
|
2e42e7d996 | ||
|
34ba08404f | ||
|
7b199110bb | ||
|
3d3cbfce86 | ||
|
0547bb4578 | ||
|
f20c33fa04 | ||
|
a644c49d6d | ||
|
d2102728fe | ||
|
a93d3b6369 | ||
|
09fdb3b5c9 | ||
|
5897bc1d27 | ||
|
f8b6fde40c | ||
|
34d5c3568f | ||
|
44af049de7 | ||
|
c747e46d75 | ||
|
1f89c15143 | ||
|
7ec998e17a | ||
|
186c17f454 | ||
|
4a427fa757 | ||
|
5bcba4ef5a | ||
|
acc0de4def | ||
|
3790a70510 | ||
|
e7c08665ab | ||
|
a11594e19e | ||
|
bbebe570f3 | ||
|
89c049ee68 | ||
|
f4cb879b3d | ||
|
cb2a6e06e1 | ||
|
3a33c70a9a | ||
|
64efb6f0d3 | ||
|
404b698d44 | ||
|
a2ca43d98b | ||
|
0b1ffe4b94 | ||
|
5d8901ac21 | ||
|
6b24c39d32 | ||
|
15f4220e49 | ||
|
b0ddfb4172 | ||
|
0fb17feeaa | ||
|
ba02aa0e4d |
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
#patreon: # Replace with a single Patreon username
|
||||
#open_collective: # Replace with a single Open Collective username
|
||||
#ko_fi: # Replace with a single Ko-fi username
|
||||
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
#liberapay: # Replace with a single Liberapay username
|
||||
#issuehunt: # Replace with a single IssueHunt username
|
||||
#otechie: # Replace with a single Otechie username
|
||||
|
||||
patreon: winestaging
|
129
.github/workflows/macOS.yml
vendored
Normal file
129
.github/workflows/macOS.yml
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
name: MacOS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
wine-staging:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --cask xquartz
|
||||
brew install bison \
|
||||
faudio \
|
||||
gphoto2 \
|
||||
gst-plugins-base \
|
||||
jxrlib \
|
||||
little-cms2 \
|
||||
mingw-w64 \
|
||||
molten-vk \
|
||||
mpg123
|
||||
|
||||
- name: Add bison & krb5 to $PATH
|
||||
run: |
|
||||
set -eu
|
||||
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
|
||||
echo "$(brew --prefix krb5)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Get upstream-commit
|
||||
run: |
|
||||
mkdir $GITHUB_WORKSPACE/wine
|
||||
cd wine
|
||||
git init
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit)
|
||||
|
||||
- name: Run patchinstall.sh --all
|
||||
run: |
|
||||
$GITHUB_WORKSPACE/patches/patchinstall.sh DESTDIR=$GITHUB_WORKSPACE/wine --all
|
||||
|
||||
- name: Configure wine64
|
||||
env:
|
||||
LDFLAGS: "-Wl,-rpath,/opt/X11/lib"
|
||||
# Avoid weird linker errors with Xcode 10 and later
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.14"
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
./configure --enable-win64 \
|
||||
--without-alsa \
|
||||
--without-capi \
|
||||
--without-dbus \
|
||||
--without-inotify \
|
||||
--without-oss \
|
||||
--without-pulse \
|
||||
--without-udev \
|
||||
--without-v4l2 \
|
||||
--x-include=/opt/X11/include \
|
||||
--x-lib=/opt/X11/lib
|
||||
|
||||
- name: Build wine64
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
make -j$(sysctl -n hw.ncpu 2>/dev/null)
|
||||
|
||||
wine-devel:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --cask xquartz
|
||||
brew install bison \
|
||||
faudio \
|
||||
gphoto2 \
|
||||
gst-plugins-base \
|
||||
jxrlib \
|
||||
little-cms2 \
|
||||
mingw-w64 \
|
||||
molten-vk \
|
||||
mpg123
|
||||
|
||||
- name: Add bison & krb5 to $PATH
|
||||
run: |
|
||||
set -eu
|
||||
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
|
||||
echo "$(brew --prefix krb5)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Get upstream-commit
|
||||
run: |
|
||||
mkdir $GITHUB_WORKSPACE/wine
|
||||
cd wine
|
||||
git init
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit)
|
||||
|
||||
- name: Configure wine64
|
||||
env:
|
||||
LDFLAGS: "-Wl,-rpath,/opt/X11/lib"
|
||||
# Avoid weird linker errors with Xcode 10 and later
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.14"
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
./configure --enable-win64 \
|
||||
--without-alsa \
|
||||
--without-capi \
|
||||
--without-dbus \
|
||||
--without-inotify \
|
||||
--without-oss \
|
||||
--without-pulse \
|
||||
--without-udev \
|
||||
--without-v4l2 \
|
||||
--x-include=/opt/X11/include \
|
||||
--x-lib=/opt/X11/lib
|
||||
|
||||
- name: Build wine64
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
make -j$(sysctl -n hw.ncpu 2>/dev/null)
|
@@ -1,15 +1,15 @@
|
||||
From 0cf6433af95363c5fbba2af482b2ba50b863dfb7 Mon Sep 17 00:00:00 2001
|
||||
From e51b05c3a9d03e4dd84a107a30841d95f8a519c3 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
branch name and version.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
dlls/ntdll/loader.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 20bc3f977d1..c2187a19397 100644
|
||||
index ee453700e51..c2d4b3c2f86 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -20,15 +20,15 @@ index 20bc3f977d1..c2187a19397 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3456,6 +3457,7 @@ static void process_breakpoint(void)
|
||||
__ENDTRY
|
||||
@@ -3307,6 +3308,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
+extern const char * CDECL wine_get_version(void);
|
||||
|
||||
/******************************************************************
|
||||
* LdrInitializeThunk (NTDLL.@)
|
||||
@@ -3465,6 +3467,9 @@ static void process_breakpoint(void)
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -3673,6 +3675,9 @@ static void init_wow64(void)
|
||||
*/
|
||||
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
|
||||
{
|
||||
@@ -38,9 +38,9 @@ index 20bc3f977d1..c2187a19397 100644
|
||||
static int attach_done;
|
||||
int i;
|
||||
NTSTATUS status;
|
||||
@@ -3483,6 +3488,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
entry = (void **)&context->u.s.X0;
|
||||
#endif
|
||||
@@ -3753,6 +3758,17 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
}
|
||||
else wm = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
|
||||
|
||||
+ RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" );
|
||||
+ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL );
|
||||
@@ -52,9 +52,10 @@ index 20bc3f977d1..c2187a19397 100644
|
||||
+ else
|
||||
+ WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+
|
||||
if (process_detaching) NtTerminateThread( GetCurrentThread(), 0 );
|
||||
|
||||
RtlEnterCriticalSection( &loader_section );
|
||||
+
|
||||
RtlAcquirePebLock();
|
||||
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
|
||||
RtlReleasePebLock();
|
||||
--
|
||||
2.28.0
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,15 +1,14 @@
|
||||
From ce5e1fc75139e4de9d92dfe27b4a513a96da013c Mon Sep 17 00:00:00 2001
|
||||
From cfcc687562d4fa68b507cbf2c29722ef523d26aa Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:53:46 +0200
|
||||
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
|
||||
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
dlls/ntdll/Makefile.in | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 307a95b3b1a..61019fed949 100644
|
||||
index b52495f741f..d5a8cad20da 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -116,7 +116,7 @@ install-manpages:: manpages
|
||||
@@ -21,15 +20,6 @@ index 307a95b3b1a..61019fed949 100644
|
||||
|
||||
programs/winetest/build.rc: dummy
|
||||
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index f39ffb42c6f..67847bb9392 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -79,3 +79,4 @@ unix_loader_EXTRADEFS = \
|
||||
-DBINDIR=\"${bindir}\" \
|
||||
-DDLL_TO_BINDIR=\"`${MAKEDEP} -R ${dlldir} ${bindir}`\" \
|
||||
-DBIN_TO_DATADIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine`\"
|
||||
+
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
#Depends: ntdll-NtAlertThreadByThreadId
|
@@ -1,34 +0,0 @@
|
||||
From 1941137bff72a2297812bbd05fb6f6a1578426b0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 5 Mar 2017 23:05:54 +0100
|
||||
Subject: advapi32: Use TRACE for LsaOpenPolicy/LsaClose.
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index e5e3b1649c0..0f2167d19ab 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -136,7 +136,7 @@ NTSTATUS WINAPI LsaAddAccountRights(
|
||||
*/
|
||||
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
|
||||
{
|
||||
- FIXME("(%p) stub\n", ObjectHandle);
|
||||
+ TRACE("(%p) semi-stub\n", ObjectHandle);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -687,7 +687,7 @@ NTSTATUS WINAPI LsaOpenPolicy(
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN OUT PLSA_HANDLE PolicyHandle)
|
||||
{
|
||||
- FIXME("(%s,%p,0x%08x,%p) stub\n",
|
||||
+ TRACE("(%s,%p,0x%08x,%p) semi-stub\n",
|
||||
SystemName?debugstr_w(SystemName->Buffer):"(null)",
|
||||
ObjectAttributes, DesiredAccess, PolicyHandle);
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,100 +0,0 @@
|
||||
From 452c42b4855e2f6338fa9b8746377ff9fe9ee706 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Wed, 23 Apr 2014 04:16:53 +0800
|
||||
Subject: [PATCH] atl: Implement AtlAxDialogBox[A,W]
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=32749
|
||||
---
|
||||
dlls/atl/atl_ax.c | 60 +++++++++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 50 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
|
||||
index 8121278..92fcb84 100644
|
||||
--- a/dlls/atl/atl_ax.c
|
||||
+++ b/dlls/atl/atl_ax.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/heap.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "ole2.h"
|
||||
@@ -1407,25 +1408,64 @@ HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * AtlAxDialogBoxW [atl100.35]
|
||||
+ * AtlAxDialogBoxA [atl100.@]
|
||||
*
|
||||
*/
|
||||
-INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc,
|
||||
- LPARAM dwInitParam)
|
||||
+INT_PTR WINAPI AtlAxDialogBoxA(HINSTANCE hInst, LPCSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
|
||||
{
|
||||
- FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_w(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
|
||||
- return 0;
|
||||
+ INT_PTR res = 0;
|
||||
+ int length;
|
||||
+ WCHAR *nameW;
|
||||
+
|
||||
+ if (IS_INTRESOURCE(name))
|
||||
+ return AtlAxDialogBoxW( hInst, (LPCWSTR) name, owner, dlgProc, param );
|
||||
+
|
||||
+ length = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
|
||||
+ nameW = heap_alloc( length * sizeof(WCHAR) );
|
||||
+ if (nameW)
|
||||
+ {
|
||||
+ MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, length );
|
||||
+ res = AtlAxDialogBoxW( hInst, nameW, owner, dlgProc, param );
|
||||
+ heap_free( nameW );
|
||||
+ }
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * AtlAxDialogBoxA [atl100.36]
|
||||
+ * AtlAxDialogBoxW [atl100.@]
|
||||
*
|
||||
*/
|
||||
-INT_PTR WINAPI AtlAxDialogBoxA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc,
|
||||
- LPARAM dwInitParam)
|
||||
+INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
|
||||
{
|
||||
- FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_a(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
|
||||
- return 0;
|
||||
+ HRSRC hrsrc;
|
||||
+ HGLOBAL hgl;
|
||||
+ LPCDLGTEMPLATEW ptr;
|
||||
+ LPDLGTEMPLATEW newptr;
|
||||
+ INT_PTR res;
|
||||
+
|
||||
+ TRACE("(%p %s %p %p %lx)\n", hInst, debugstr_w(name), owner, dlgProc, param);
|
||||
+
|
||||
+ hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG );
|
||||
+ if ( !hrsrc )
|
||||
+ return 0;
|
||||
+ hgl = LoadResource (hInst, hrsrc);
|
||||
+ if ( !hgl )
|
||||
+ return 0;
|
||||
+ ptr = LockResource ( hgl );
|
||||
+ if (!ptr)
|
||||
+ {
|
||||
+ FreeResource( hgl );
|
||||
+ return 0;
|
||||
+ }
|
||||
+ newptr = AX_ConvertDialogTemplate( ptr );
|
||||
+ if ( newptr )
|
||||
+ {
|
||||
+ res = DialogBoxIndirectParamW( hInst, newptr, owner, dlgProc, param );
|
||||
+ heap_free( newptr );
|
||||
+ } else
|
||||
+ res = 0;
|
||||
+ FreeResource ( hrsrc );
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [32749] atl: Implemented AtlAxDialogBox[A,W]
|
@@ -1,4 +1,4 @@
|
||||
From 3478a4e41c07a66e7e913c54bcf5ad52e16a8fee Mon Sep 17 00:00:00 2001
|
||||
From 6d925cb20409888ada3e469a2a09b1bfc726fa79 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 2 Oct 2020 11:29:24 -0500
|
||||
Subject: [PATCH] bcrypt: Allow multiple backends to coexist.
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
create mode 100644 dlls/bcrypt/unixlib.c
|
||||
|
||||
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
|
||||
index 24803fb2d7cb..46a20d473dd7 100644
|
||||
index 24803fb2d7c..46a20d473dd 100644
|
||||
--- a/dlls/bcrypt/Makefile.in
|
||||
+++ b/dlls/bcrypt/Makefile.in
|
||||
@@ -11,6 +11,7 @@ C_SRCS = \
|
||||
@@ -27,7 +27,7 @@ index 24803fb2d7cb..46a20d473dd7 100644
|
||||
|
||||
RC_SRCS = version.rc
|
||||
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
|
||||
index eb1361115093..3c7110d05f84 100644
|
||||
index eb136111509..3c7110d05f8 100644
|
||||
--- a/dlls/bcrypt/bcrypt_internal.h
|
||||
+++ b/dlls/bcrypt/bcrypt_internal.h
|
||||
@@ -218,4 +218,7 @@ struct key_funcs
|
||||
@@ -39,10 +39,10 @@ index eb1361115093..3c7110d05f84 100644
|
||||
+
|
||||
#endif /* __BCRYPT_INTERNAL_H */
|
||||
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
|
||||
index c065ac31fba3..9490ea8612a8 100644
|
||||
index 2f0c62bc6da..4a9dcf9de8a 100644
|
||||
--- a/dlls/bcrypt/gnutls.c
|
||||
+++ b/dlls/bcrypt/gnutls.c
|
||||
@@ -371,9 +371,12 @@ fail:
|
||||
@@ -372,9 +372,12 @@ fail:
|
||||
|
||||
static void gnutls_uninitialize(void)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ index c065ac31fba3..9490ea8612a8 100644
|
||||
}
|
||||
|
||||
struct buffer
|
||||
@@ -1949,19 +1952,28 @@ static const struct key_funcs key_funcs =
|
||||
@@ -1899,19 +1902,28 @@ static const struct key_funcs key_funcs =
|
||||
key_import_rsa
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ index c065ac31fba3..9490ea8612a8 100644
|
||||
+ if (!gnutls_initialize()) return NULL;
|
||||
+ return &key_funcs;
|
||||
case DLL_PROCESS_DETACH:
|
||||
gnutls_uninitialize();
|
||||
if (libgnutls_handle) gnutls_uninitialize();
|
||||
- break;
|
||||
}
|
||||
- return STATUS_SUCCESS;
|
||||
@@ -95,7 +95,7 @@ index c065ac31fba3..9490ea8612a8 100644
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
|
||||
index 44906519cef0..2a88aec8362c 100644
|
||||
index 44906519cef..2a88aec8362 100644
|
||||
--- a/dlls/bcrypt/macos.c
|
||||
+++ b/dlls/bcrypt/macos.c
|
||||
@@ -302,11 +302,21 @@ static const struct key_funcs key_funcs =
|
||||
@@ -126,7 +126,7 @@ index 44906519cef0..2a88aec8362c 100644
|
||||
#endif
|
||||
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
|
||||
new file mode 100644
|
||||
index 000000000000..9cbb25f5740c
|
||||
index 00000000000..9cbb25f5740
|
||||
--- /dev/null
|
||||
+++ b/dlls/bcrypt/unixlib.c
|
||||
@@ -0,0 +1,211 @@
|
||||
@@ -342,5 +342,5 @@ index 000000000000..9cbb25f5740c
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.29.2
|
||||
2.30.2
|
||||
|
||||
|
@@ -2,4 +2,3 @@ Fixes: [47699] Multiple games fail to connect to online services (missing BCrypt
|
||||
# Needs to be moved to the unix lib, but that's a nontrivial amount of work, and
|
||||
# using gcrypt is the wrong way forward (we should expose the missing APIs from
|
||||
# gnutls instead).
|
||||
#Disabled: true
|
||||
|
@@ -1,54 +0,0 @@
|
||||
From 3497a2faa4ebab67b65bcf99d4ed56baa70ddf96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 12 Jul 2014 23:58:19 +0200
|
||||
Subject: [PATCH] comctl32: Preserve custom colors between subitems. (v2)
|
||||
|
||||
---
|
||||
dlls/comctl32/listview.c | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
|
||||
index dba16d13a4c..35cab333b7b 100644
|
||||
--- a/dlls/comctl32/listview.c
|
||||
+++ b/dlls/comctl32/listview.c
|
||||
@@ -1063,7 +1063,7 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, const NMLVCUS
|
||||
textcolor = cd->clrText;
|
||||
|
||||
/* apparently, for selected items, we have to override the returned values */
|
||||
- if (!SubItem)
|
||||
+ if (!SubItem || (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
|
||||
{
|
||||
if (cd->nmcd.uItemState & CDIS_SELECTED)
|
||||
{
|
||||
@@ -4786,6 +4786,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||
while (iterator_next(subitems))
|
||||
{
|
||||
DWORD subitemstage = CDRF_DODEFAULT;
|
||||
+ NMLVCUSTOMDRAW temp_nmlvcd;
|
||||
|
||||
/* We need to query for each subitem, item's data (subitem == 0) is already here at this point */
|
||||
if (subitems->nItem)
|
||||
@@ -4813,13 +4814,15 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||
if (cdsubitemmode & CDRF_NOTIFYSUBITEMDRAW)
|
||||
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd);
|
||||
|
||||
- if (subitems->nItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW))
|
||||
- prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
|
||||
- else if (!(infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
|
||||
- prepaint_setup(infoPtr, hdc, &nmlvcd, TRUE);
|
||||
+ /*
|
||||
+ * A selection should neither affect the colors in the post paint notification nor
|
||||
+ * affect the colors of the next drawn subitem. Copy the structure to prevent this.
|
||||
+ */
|
||||
+ temp_nmlvcd = nmlvcd;
|
||||
+ prepaint_setup(infoPtr, hdc, &temp_nmlvcd, subitems->nItem);
|
||||
|
||||
if (!(subitemstage & CDRF_SKIPDEFAULT))
|
||||
- LISTVIEW_DrawItemPart(infoPtr, &lvItem, &nmlvcd, &pos);
|
||||
+ LISTVIEW_DrawItemPart(infoPtr, &lvItem, &temp_nmlvcd, &pos);
|
||||
|
||||
if (subitemstage & CDRF_NOTIFYPOSTPAINT)
|
||||
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPOSTPAINT, &nmlvcd);
|
||||
--
|
||||
2.27.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [38941] Preserve custom colors between subitems for listview control
|
@@ -1,4 +1,4 @@
|
||||
From 4a511591eb74436feb8aa12e33f6caac544ba54a Mon Sep 17 00:00:00 2001
|
||||
From 50bd67fb1fd718eaaf9f5600fba7ab86e4b71a76 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
@@ -8,19 +8,19 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
dlls/cryptext/Makefile.in | 3 +-
|
||||
dlls/cryptext/cryptext.spec | 4 +-
|
||||
dlls/cryptext/cryptext_main.c | 80 +++++++++++++++++++++++++++++++++
|
||||
dlls/cryptext/tests/Makefile.in | 4 ++
|
||||
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++
|
||||
7 files changed, 151 insertions(+), 3 deletions(-)
|
||||
dlls/cryptext/cryptext.spec | 4 +--
|
||||
dlls/cryptext/cryptext_main.c | 64 +++++++++++++++++++++++++++++++++
|
||||
dlls/cryptext/tests/Makefile.in | 4 +++
|
||||
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++++++++
|
||||
7 files changed, 135 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/cryptext/tests/Makefile.in
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 08936ff0ec1..79c966d23b1 100755
|
||||
index 2b20133cd65..f3ef3aef3a9 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20347,6 +20347,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
@@ -20350,6 +20350,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
@@ -29,10 +29,10 @@ index 08936ff0ec1..79c966d23b1 100755
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptsp enable_cryptsp
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fea6fe89c83..1a10f687682 100644
|
||||
index 24f5c8847d6..f71fb6f401d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3095,6 +3095,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
@@ -3083,6 +3083,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
@@ -67,10 +67,10 @@ index 0dba38e3934..911ab2f4ba4 100644
|
||||
@ stub CryptExtOpenCRLW
|
||||
@ stub CryptExtOpenCTL
|
||||
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
|
||||
index 537ba66cd3b..2a381782d68 100644
|
||||
index 537ba66cd3b..f9e34d1f8c5 100644
|
||||
--- a/dlls/cryptext/cryptext_main.c
|
||||
+++ b/dlls/cryptext/cryptext_main.c
|
||||
@@ -22,10 +22,45 @@
|
||||
@@ -22,10 +22,29 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
@@ -96,27 +96,11 @@ index 537ba66cd3b..2a381782d68 100644
|
||||
+ MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
+{
|
||||
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
|
||||
+
|
||||
+ switch (reason)
|
||||
+ {
|
||||
+ case DLL_WINE_PREATTACH:
|
||||
+ return FALSE; /* prefer native version */
|
||||
+ case DLL_PROCESS_ATTACH:
|
||||
+ DisableThreadLibraryCalls(instance);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* CryptExtAddPFX (CRYPTEXT.@)
|
||||
*/
|
||||
@@ -43,3 +78,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
|
||||
@@ -43,3 +62,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
|
||||
FIXME("stub: %s\n", debugstr_w(filename));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -243,5 +227,5 @@ index 00000000000..cc62a772b59
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.30.0
|
||||
2.20.1
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
From 29866a3cb6dc799b060565d94608c7b25bd26509 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 21 May 2021 23:44:39 -0500
|
||||
Subject: [PATCH] d3d11/tests: Add a couple of extra tests for SRV/RTV
|
||||
conflict.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 47c6613d904..5ab08632367 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -32364,6 +32364,15 @@ static void test_deferred_context_state(void)
|
||||
ID3D11DeviceContext_PSGetShaderResources(deferred, 0, 1, &ret_srv);
|
||||
ok(!ret_srv, "Got unexpected SRV %p.\n", ret_srv);
|
||||
|
||||
+ ID3D11DeviceContext_PSSetShaderResources(deferred, 0, 1, &srv);
|
||||
+ ID3D11DeviceContext_PSGetShaderResources(deferred, 0, 1, &ret_srv);
|
||||
+ ok(!ret_srv, "Got unexpected SRV %p.\n", ret_srv);
|
||||
+
|
||||
+ ID3D11DeviceContext_PSSetShaderResources(immediate, 0, 1, &srv);
|
||||
+ ID3D11DeviceContext_PSGetShaderResources(immediate, 0, 1, &ret_srv);
|
||||
+ ok(ret_srv == srv, "Got unexpected SRV %p.\n", ret_srv);
|
||||
+ ID3D11ShaderResourceView_Release(ret_srv);
|
||||
+
|
||||
ID3D11ShaderResourceView_Release(srv);
|
||||
ID3D11RenderTargetView_Release(rtv);
|
||||
ID3D11Texture2D_Release(texture);
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1,174 +0,0 @@
|
||||
From 881e39d338d1b8faed36440376460d498262c532 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:54:42 +0100
|
||||
Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
|
||||
|
||||
---
|
||||
dlls/wined3d/buffer.c | 19 +++++++++++++++++++
|
||||
dlls/wined3d/resource.c | 8 ++++++++
|
||||
dlls/wined3d/texture.c | 31 +++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/wined3d.spec | 1 +
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
include/wine/wined3d.h | 9 +++++++++
|
||||
6 files changed, 70 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 89dab8ebfdd..5ef9a48eeb7 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1121,6 +1121,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT buffer_resource_sub_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ struct wined3d_map_info *info, DWORD flags)
|
||||
+{
|
||||
+ struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
+
|
||||
+ if (sub_resource_idx)
|
||||
+ {
|
||||
+ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
+ return E_INVALIDARG;
|
||||
+ }
|
||||
+
|
||||
+ info->row_pitch = resource->size;
|
||||
+ info->slice_pitch = resource->size;
|
||||
+ info->size = buffer->resource.size;
|
||||
+
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
@@ -1279,6 +1297,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_resource_preload,
|
||||
buffer_resource_unload,
|
||||
buffer_resource_sub_resource_map,
|
||||
+ buffer_resource_sub_resource_map_info,
|
||||
buffer_resource_sub_resource_unmap,
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index bba940f42cb..ff31c004b06 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -383,6 +383,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
|
||||
return wined3d_cs_map(resource->device->cs, resource, sub_resource_idx, map_desc, box, flags);
|
||||
}
|
||||
|
||||
+HRESULT CDECL wined3d_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ struct wined3d_map_info *info, DWORD flags)
|
||||
+{
|
||||
+ TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
+
|
||||
+ return resource->resource_ops->resource_map_info(resource, sub_resource_idx, info, flags);
|
||||
+}
|
||||
+
|
||||
HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 7c9c8298519..73e79ff25b5 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3155,6 +3155,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT texture_resource_sub_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ struct wined3d_map_info *info, DWORD flags)
|
||||
+{
|
||||
+ const struct wined3d_format *format = resource->format;
|
||||
+ struct wined3d_texture_sub_resource *sub_resource;
|
||||
+ unsigned int fmt_flags = resource->format_flags;
|
||||
+ struct wined3d_texture *texture;
|
||||
+ unsigned int texture_level;
|
||||
+
|
||||
+ texture = texture_from_resource(resource);
|
||||
+ if (!(sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx)))
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ texture_level = sub_resource_idx % texture->level_count;
|
||||
+
|
||||
+ if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
+ {
|
||||
+ info->row_pitch = wined3d_texture_get_level_width(texture, texture_level) * format->byte_count;
|
||||
+ info->slice_pitch = wined3d_texture_get_level_height(texture, texture_level) * info->row_pitch;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wined3d_texture_get_pitch(texture, texture_level, &info->row_pitch, &info->slice_pitch);
|
||||
+ }
|
||||
+
|
||||
+ info->size = info->slice_pitch * wined3d_texture_get_level_depth(texture, texture_level);
|
||||
+
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
@@ -3207,6 +3237,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
|
||||
texture_resource_preload,
|
||||
texture_resource_unload,
|
||||
texture_resource_sub_resource_map,
|
||||
+ texture_resource_sub_resource_map_info,
|
||||
texture_resource_sub_resource_unmap,
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index e03c57055b7..f68f8199f7e 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -218,6 +218,7 @@
|
||||
@ cdecl wined3d_resource_get_parent(ptr)
|
||||
@ cdecl wined3d_resource_get_priority(ptr)
|
||||
@ cdecl wined3d_resource_map(ptr long ptr ptr long)
|
||||
+@ cdecl wined3d_resource_map_info(ptr long ptr long)
|
||||
@ cdecl wined3d_resource_preload(ptr)
|
||||
@ cdecl wined3d_resource_set_parent(ptr ptr)
|
||||
@ cdecl wined3d_resource_set_priority(ptr long)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8f9ad1ce856..c7f75d1983c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3368,6 +3368,8 @@ struct wined3d_resource_ops
|
||||
void (*resource_unload)(struct wined3d_resource *resource);
|
||||
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
+ HRESULT (*resource_map_info)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ struct wined3d_map_info *info, DWORD flags);
|
||||
HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
};
|
||||
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index bafab04d3d3..ea50fb7c8d4 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1851,6 +1851,13 @@ struct wined3d_map_desc
|
||||
void *data;
|
||||
};
|
||||
|
||||
+struct wined3d_map_info
|
||||
+{
|
||||
+ UINT row_pitch;
|
||||
+ UINT slice_pitch;
|
||||
+ UINT size;
|
||||
+};
|
||||
+
|
||||
struct wined3d_sub_resource_data
|
||||
{
|
||||
const void *data;
|
||||
@@ -2663,6 +2670,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
|
||||
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
|
||||
HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
+HRESULT __cdecl wined3d_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ struct wined3d_map_info *info, DWORD flags);
|
||||
void __cdecl wined3d_resource_preload(struct wined3d_resource *resource);
|
||||
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
|
||||
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
|
||||
--
|
||||
2.24.0
|
||||
|
@@ -0,0 +1,286 @@
|
||||
From bca2466f49202f638339644f9c92b3573b719822 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sat, 22 May 2021 00:27:53 -0500
|
||||
Subject: [PATCH] wined3d: Check for SRV/RTV binding conflicts per
|
||||
wined3d_state.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/wined3d/context.c | 19 ++++-
|
||||
dlls/wined3d/device.c | 23 ++++--
|
||||
dlls/wined3d/resource.c | 1 -
|
||||
dlls/wined3d/wined3d_private.h | 125 +++++++--------------------------
|
||||
4 files changed, 61 insertions(+), 107 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 2debf50de7f..7f50126204b 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -335,6 +335,23 @@ void context_update_stream_info(struct wined3d_context *context, const struct wi
|
||||
}
|
||||
}
|
||||
|
||||
+static bool is_resource_rtv_bound(const struct wined3d_state *state,
|
||||
+ const struct wined3d_resource *resource)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ if (!resource->rtv_bind_count_device)
|
||||
+ return false;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i)
|
||||
+ {
|
||||
+ if (state->fb.render_targets[i] && state->fb.render_targets[i]->resource == resource)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
/* Context activation is done by the caller. */
|
||||
static void context_preload_texture(struct wined3d_context *context,
|
||||
const struct wined3d_state *state, unsigned int idx)
|
||||
@@ -344,7 +361,7 @@ static void context_preload_texture(struct wined3d_context *context,
|
||||
if (!(texture = state->textures[idx]))
|
||||
return;
|
||||
|
||||
- if ((texture->resource.rtv_full_bind_count_device + texture->resource.rtv_partial_bind_count_device)
|
||||
+ if (is_resource_rtv_bound(state, &texture->resource)
|
||||
|| (state->fb.depth_stencil && state->fb.depth_stencil->resource == &texture->resource))
|
||||
context->uses_fbo_attached_resources = 1;
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index dbb5dcf2672..2c8ebba8844 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1985,7 +1985,7 @@ void CDECL wined3d_device_context_set_shader_resource_view(struct wined3d_device
|
||||
if (view == prev)
|
||||
return;
|
||||
|
||||
- if (view && (wined3d_is_srv_rtv_bound(view)
|
||||
+ if (view && (wined3d_is_srv_rtv_bound(state, view)
|
||||
|| ((dsv = state->fb.depth_stencil)
|
||||
&& dsv->resource == view->resource && wined3d_dsv_srv_conflict(dsv, view->format))))
|
||||
{
|
||||
@@ -2064,22 +2064,31 @@ void CDECL wined3d_device_context_set_unordered_access_view(struct wined3d_devic
|
||||
static void wined3d_device_context_unbind_srv_for_rtv(struct wined3d_device_context *context,
|
||||
const struct wined3d_rendertarget_view *view, BOOL dsv)
|
||||
{
|
||||
- struct wined3d_state *state = context->state;
|
||||
+ const struct wined3d_state *state = context->state;
|
||||
+ const struct wined3d_resource *resource;
|
||||
|
||||
- if (view && wined3d_is_rtv_srv_bound(view))
|
||||
+ if (!view)
|
||||
+ return;
|
||||
+ resource = view->resource;
|
||||
+
|
||||
+ if (resource->srv_bind_count_device)
|
||||
{
|
||||
- const struct wined3d_resource *resource = view->resource;
|
||||
const struct wined3d_shader_resource_view *srv;
|
||||
unsigned int i, j;
|
||||
|
||||
- WARN("Application sets bound resource as render target.\n");
|
||||
-
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
+ {
|
||||
for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j)
|
||||
+ {
|
||||
if ((srv = state->shader_resource_view[i][j]) && srv->resource == resource
|
||||
- && ((!dsv && wined3d_is_srv_rtv_bound(srv))
|
||||
+ && ((!dsv && wined3d_is_srv_rtv_bound(state, srv))
|
||||
|| (dsv && wined3d_dsv_srv_conflict(view, srv->format))))
|
||||
+ {
|
||||
+ WARN("Application sets bound resource as render target.\n");
|
||||
wined3d_device_context_set_shader_resource_view(context, i, j, NULL);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 6e34605f547..58e3e5c77fd 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -235,7 +235,6 @@ static void wined3d_resource_destroy_object(void *object)
|
||||
|
||||
TRACE("resource %p.\n", resource);
|
||||
|
||||
- heap_free(resource->sub_resource_bind_counts_device);
|
||||
wined3d_resource_free_sysmem(resource);
|
||||
context_resource_released(resource->device, resource);
|
||||
wined3d_resource_release(resource);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4c308d2ac05..fadad706af4 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -4084,16 +4084,8 @@ struct wined3d_resource
|
||||
|
||||
struct list resource_list_entry;
|
||||
|
||||
- struct
|
||||
- {
|
||||
- uint32_t srv;
|
||||
- uint32_t rtv;
|
||||
- }
|
||||
- *sub_resource_bind_counts_device;
|
||||
- uint32_t srv_full_bind_count_device;
|
||||
- uint32_t rtv_full_bind_count_device;
|
||||
- uint32_t srv_partial_bind_count_device;
|
||||
- uint32_t rtv_partial_bind_count_device;
|
||||
+ uint32_t srv_bind_count_device;
|
||||
+ uint32_t rtv_bind_count_device;
|
||||
};
|
||||
|
||||
static inline ULONG wined3d_resource_incref(struct wined3d_resource *resource)
|
||||
@@ -6214,120 +6206,57 @@ static inline bool wined3d_rtv_all_subresources(const struct wined3d_rendertarge
|
||||
return texture->level_count == 1 && rtv->layer_count == wined3d_bind_layer_count(texture);
|
||||
}
|
||||
|
||||
-static inline void wined3d_srv_bind_count_add(struct wined3d_shader_resource_view *srv, int value)
|
||||
-{
|
||||
- struct wined3d_resource *resource = srv->resource;
|
||||
- struct wined3d_texture *texture;
|
||||
- unsigned int level, layer;
|
||||
-
|
||||
- if (wined3d_srv_all_subresources(srv))
|
||||
- {
|
||||
- resource->srv_full_bind_count_device += value;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- resource->srv_partial_bind_count_device += value;
|
||||
-
|
||||
- texture = texture_from_resource(resource);
|
||||
-
|
||||
- if (!resource->sub_resource_bind_counts_device
|
||||
- && !(resource->sub_resource_bind_counts_device = heap_alloc_zero(texture->level_count
|
||||
- * wined3d_bind_layer_count(texture) * sizeof(*resource->sub_resource_bind_counts_device))))
|
||||
- return;
|
||||
-
|
||||
- for (layer = 0; layer < srv->desc.u.texture.layer_count; ++layer)
|
||||
- for (level = 0; level < srv->desc.u.texture.level_count; ++level)
|
||||
- resource->sub_resource_bind_counts_device[(layer + srv->desc.u.texture.layer_idx)
|
||||
- * texture->level_count + srv->desc.u.texture.level_idx + level].srv += value;
|
||||
-}
|
||||
-
|
||||
static inline void wined3d_srv_bind_count_inc(struct wined3d_shader_resource_view *srv)
|
||||
{
|
||||
- wined3d_srv_bind_count_add(srv, 1);
|
||||
+ ++srv->resource->srv_bind_count_device;
|
||||
}
|
||||
|
||||
static inline void wined3d_srv_bind_count_dec(struct wined3d_shader_resource_view *srv)
|
||||
{
|
||||
- wined3d_srv_bind_count_add(srv, -1);
|
||||
-}
|
||||
-
|
||||
-static inline void wined3d_rtv_bind_count_add(struct wined3d_rendertarget_view *rtv, int value)
|
||||
-{
|
||||
- struct wined3d_resource *resource = rtv->resource;
|
||||
- struct wined3d_texture *texture;
|
||||
- unsigned int layer;
|
||||
-
|
||||
- if (wined3d_rtv_all_subresources(rtv))
|
||||
- {
|
||||
- resource->rtv_full_bind_count_device += value;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- resource->rtv_partial_bind_count_device += value;
|
||||
-
|
||||
- texture = texture_from_resource(resource);
|
||||
-
|
||||
- if (!resource->sub_resource_bind_counts_device
|
||||
- && !(resource->sub_resource_bind_counts_device = heap_alloc_zero(texture->level_count
|
||||
- * wined3d_bind_layer_count(texture) * sizeof(*resource->sub_resource_bind_counts_device))))
|
||||
- return;
|
||||
-
|
||||
- for (layer = 0; layer < rtv->layer_count; ++layer)
|
||||
- resource->sub_resource_bind_counts_device[rtv->sub_resource_idx + layer * texture->level_count].rtv += value;
|
||||
+ --srv->resource->srv_bind_count_device;
|
||||
}
|
||||
|
||||
static inline void wined3d_rtv_bind_count_inc(struct wined3d_rendertarget_view *rtv)
|
||||
{
|
||||
- wined3d_rtv_bind_count_add(rtv, 1);
|
||||
+ ++rtv->resource->rtv_bind_count_device;
|
||||
}
|
||||
|
||||
static inline void wined3d_rtv_bind_count_dec(struct wined3d_rendertarget_view *rtv)
|
||||
{
|
||||
- wined3d_rtv_bind_count_add(rtv, -1);
|
||||
+ --rtv->resource->rtv_bind_count_device;
|
||||
}
|
||||
|
||||
-static inline bool wined3d_is_srv_rtv_bound(const struct wined3d_shader_resource_view *srv)
|
||||
+static inline bool wined3d_rtv_overlaps_srv(const struct wined3d_rendertarget_view *rtv,
|
||||
+ const struct wined3d_shader_resource_view *srv)
|
||||
{
|
||||
- struct wined3d_resource *resource = srv->resource;
|
||||
- struct wined3d_texture *texture;
|
||||
- unsigned int level, layer;
|
||||
+ if (rtv->resource != srv->resource)
|
||||
+ return false;
|
||||
|
||||
- if (!(resource->rtv_full_bind_count_device + resource->rtv_partial_bind_count_device))
|
||||
- return FALSE;
|
||||
+ if (wined3d_srv_all_subresources(srv) || wined3d_rtv_all_subresources(rtv))
|
||||
+ return true;
|
||||
|
||||
- if (resource->rtv_full_bind_count_device || wined3d_srv_all_subresources(srv))
|
||||
- return TRUE;
|
||||
-
|
||||
- texture = texture_from_resource(resource);
|
||||
-
|
||||
- for (layer = 0; layer < srv->desc.u.texture.layer_count; ++layer)
|
||||
- for (level = 0; level < srv->desc.u.texture.level_count; ++level)
|
||||
- if (resource->sub_resource_bind_counts_device[(layer + srv->desc.u.texture.layer_idx)
|
||||
- * texture->level_count + srv->desc.u.texture.level_idx + level].rtv)
|
||||
- return TRUE;
|
||||
-
|
||||
- return FALSE;
|
||||
+ return rtv->sub_resource_idx >= srv->desc.u.texture.level_idx
|
||||
+ && rtv->sub_resource_idx < srv->desc.u.texture.level_idx + srv->desc.u.texture.level_count
|
||||
+ && rtv->layer_count >= srv->desc.u.texture.layer_idx;
|
||||
}
|
||||
|
||||
-static inline bool wined3d_is_rtv_srv_bound(const struct wined3d_rendertarget_view *rtv)
|
||||
+static inline bool wined3d_is_srv_rtv_bound(const struct wined3d_state *state,
|
||||
+ const struct wined3d_shader_resource_view *srv)
|
||||
{
|
||||
- struct wined3d_resource *resource = rtv->resource;
|
||||
- struct wined3d_texture *texture;
|
||||
- unsigned int layer;
|
||||
+ unsigned int i;
|
||||
|
||||
- if (!(resource->srv_full_bind_count_device + resource->srv_partial_bind_count_device))
|
||||
- return FALSE;
|
||||
+ if (!srv->resource->rtv_bind_count_device)
|
||||
+ return false;
|
||||
|
||||
- if (resource->srv_full_bind_count_device || wined3d_rtv_all_subresources(rtv))
|
||||
- return TRUE;
|
||||
+ for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i)
|
||||
+ {
|
||||
+ const struct wined3d_rendertarget_view *rtv;
|
||||
|
||||
- texture = texture_from_resource(resource);
|
||||
+ if ((rtv = state->fb.render_targets[i]) && wined3d_rtv_overlaps_srv(rtv, srv))
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
- for (layer = 0; layer < rtv->layer_count; ++layer)
|
||||
- if (resource->sub_resource_bind_counts_device[rtv->sub_resource_idx + layer * texture->level_count].srv)
|
||||
- return TRUE;
|
||||
-
|
||||
- return FALSE;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static inline void wined3d_viewport_get_z_range(const struct wined3d_viewport *vp, float *min_z, float *max_z)
|
||||
--
|
||||
2.30.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,270 @@
|
||||
From d591728c209f7fd9e438eebfb3977692d13bbd6b Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Tue, 18 May 2021 21:42:01 -0500
|
||||
Subject: [PATCH] d3d11/tests: Add some tests for Map() on deferred contexts.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 239 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 239 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 5ab08632367..e5d46f445a4 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -32706,6 +32706,244 @@ static void test_deferred_context_rendering(void)
|
||||
release_test_context(&test_context);
|
||||
}
|
||||
|
||||
+static void test_deferred_context_map(void)
|
||||
+{
|
||||
+ ID3D11DeviceContext *immediate, *deferred;
|
||||
+ struct d3d11_test_context test_context;
|
||||
+ D3D11_SUBRESOURCE_DATA resource_data;
|
||||
+ D3D11_BUFFER_DESC buffer_desc = {0};
|
||||
+ D3D11_MAPPED_SUBRESOURCE map_desc;
|
||||
+ ID3D11Buffer *buffer, *buffer2;
|
||||
+ struct resource_readback rb;
|
||||
+ ID3D11CommandList *list;
|
||||
+ float data[16], value;
|
||||
+ ID3D11Device *device;
|
||||
+ float *map_data;
|
||||
+ unsigned int i;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (!init_test_context(&test_context, NULL))
|
||||
+ return;
|
||||
+
|
||||
+ device = test_context.device;
|
||||
+ immediate = test_context.immediate_context;
|
||||
+
|
||||
+ hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred);
|
||||
+ todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
|
||||
+ if (hr != S_OK)
|
||||
+ {
|
||||
+ release_test_context(&test_context);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ data[i] = i;
|
||||
+ resource_data.pSysMem = data;
|
||||
+ resource_data.SysMemPitch = 0;
|
||||
+ resource_data.SysMemSlicePitch = 0;
|
||||
+
|
||||
+ buffer_desc.ByteWidth = sizeof(data);
|
||||
+ buffer_desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
+ buffer_desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
|
||||
+ buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer);
|
||||
+ ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr);
|
||||
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer2);
|
||||
+ ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ, 0, &map_desc);
|
||||
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ_WRITE, 0, &map_desc);
|
||||
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE, 0, &map_desc);
|
||||
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
|
||||
+ ok(hr == D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ /* The previous contents of map_data are undefined and may in practice be
|
||||
+ * uninitialized garbage. */
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = 2 * i;
|
||||
+
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = 2 * i;
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
|
||||
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
|
||||
+
|
||||
+ get_buffer_readback(buffer, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
|
||||
+
|
||||
+ get_buffer_readback(buffer, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == 2 * i, "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ ID3D11CommandList_Release(list);
|
||||
+
|
||||
+ /* Test WRITE_NO_OVERWRITE. */
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = i;
|
||||
+ ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
|
||||
+ ok(hr == D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = 2 * i;
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ, 0, &map_desc);
|
||||
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ_WRITE, 0, &map_desc);
|
||||
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE, 0, &map_desc);
|
||||
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ ok(map_data[i] == 2 * i, "Got unexpected value %.8e at %u.\n", map_data[i], i);
|
||||
+ if (i % 2)
|
||||
+ map_data[i] = 3 * i;
|
||||
+ }
|
||||
+ memcpy(data, map_data, sizeof(data));
|
||||
+
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ ok(map_data[i] == data[i], "Got unexpected value %.8e at %u.\n", map_data[i], i);
|
||||
+ if (i % 3)
|
||||
+ map_data[i] = 4 * i;
|
||||
+ }
|
||||
+ memcpy(data, map_data, sizeof(data));
|
||||
+
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
|
||||
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
|
||||
+
|
||||
+ get_buffer_readback(buffer, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
|
||||
+
|
||||
+ get_buffer_readback(buffer, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == data[i], "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ ID3D11CommandList_Release(list);
|
||||
+
|
||||
+ /* Do something with the mapped data from within the deferred context. */
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = i;
|
||||
+ ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = 2 * i;
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ ID3D11DeviceContext_CopyResource(deferred, (ID3D11Resource *)buffer2, (ID3D11Resource *)buffer);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ map_data = map_desc.pData;
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ map_data[i] = 3 * i;
|
||||
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
|
||||
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
|
||||
+
|
||||
+ get_buffer_readback(buffer, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
|
||||
+
|
||||
+ get_buffer_readback(buffer2, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == 2 * i, "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ get_buffer_readback(buffer, &rb);
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
|
||||
+ {
|
||||
+ value = get_readback_float(&rb, i, 0);
|
||||
+ ok(value == 3 * i, "Got unexpected value %.8e at %u.\n", value, i);
|
||||
+ }
|
||||
+ release_resource_readback(&rb);
|
||||
+
|
||||
+ ID3D11CommandList_Release(list);
|
||||
+
|
||||
+ ID3D11Buffer_Release(buffer2);
|
||||
+ ID3D11Buffer_Release(buffer);
|
||||
+ ID3D11DeviceContext_Release(deferred);
|
||||
+ release_test_context(&test_context);
|
||||
+}
|
||||
+
|
||||
START_TEST(d3d11)
|
||||
{
|
||||
unsigned int argc, i;
|
||||
@@ -32876,6 +33114,7 @@ START_TEST(d3d11)
|
||||
queue_test(test_deferred_context_state);
|
||||
queue_test(test_deferred_context_swap_state);
|
||||
queue_test(test_deferred_context_rendering);
|
||||
+ queue_test(test_deferred_context_map);
|
||||
queue_test(test_unbound_streams);
|
||||
|
||||
run_queued_tests();
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1,81 +0,0 @@
|
||||
From fc3937794343611ef4bedefc4829ed06ceee8f64 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 04:10:12 +0100
|
||||
Subject: [PATCH] d3d11: Implement CSSetShader for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 29 ++++++++++++++++++++++++++++-
|
||||
1 file changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 2f13e85..e54ccaf 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -40,6 +40,7 @@ enum deferred_cmd
|
||||
DEFERRED_OMSETBLENDSTATE, /* blend_state_info */
|
||||
DEFERRED_OMSETRENDERTARGETS, /* render_target_info */
|
||||
|
||||
+ DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
DEFERRED_HSSETSHADER, /* hs_info */
|
||||
DEFERRED_PSSETSHADER, /* ps_info */
|
||||
@@ -120,6 +121,11 @@ struct deferred_call
|
||||
} render_target_info;
|
||||
struct
|
||||
{
|
||||
+ ID3D11ComputeShader *shader;
|
||||
+ /* FIXME: add class instances */
|
||||
+ } cs_info;
|
||||
+ struct
|
||||
+ {
|
||||
ID3D11DomainShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
} ds_info;
|
||||
@@ -349,6 +355,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11DepthStencilView_Release(call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETSHADER:
|
||||
+ {
|
||||
+ if (call->cs_info.shader)
|
||||
+ ID3D11ComputeShader_Release(call->cs_info.shader);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DSSETSHADER:
|
||||
{
|
||||
if (call->ds_info.shader)
|
||||
@@ -491,6 +503,11 @@ static void exec_deferred_calls(ID3D11DeviceContext1 *iface, struct list *comman
|
||||
call->render_target_info.render_targets, call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETSHADER:
|
||||
+ {
|
||||
+ ID3D11DeviceContext1_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext1_DSSetShader(iface, call->ds_info.shader, NULL, 0);
|
||||
@@ -4410,8 +4427,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetUnorderedAccessViews(I
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
- FIXME("iface %p, shader %p, class_instances %p, class_instance_count %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
|
||||
iface, shader, class_instances, class_instance_count);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CSSETSHADER;
|
||||
+ if (shader) ID3D11ComputeShader_AddRef(shader);
|
||||
+ call->cs_info.shader = shader;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetSamplers(ID3D11DeviceContext *iface,
|
||||
--
|
||||
1.9.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user