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
223 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
dc3b4e6589 | ||
|
75367a75f2 | ||
|
b2ca294530 | ||
|
dd067c0b0d | ||
|
aa9b8391c0 | ||
|
ef52b15ad6 | ||
|
ff18b9b26e | ||
|
40467ae481 | ||
|
2ec2518486 | ||
|
0525ea8268 | ||
|
5058934ac1 | ||
|
be51ecf5c2 | ||
|
bd28d7c328 | ||
|
c11c25e285 | ||
|
ddfbad3af6 | ||
|
71f018ba21 | ||
|
53c687fd47 | ||
|
9c85f8e97a | ||
|
a15917a85e | ||
|
06139e25fa | ||
|
e175b3e173 | ||
|
1c14122a2d | ||
|
92aa3c6389 | ||
|
72730e4340 | ||
|
065d60e3d7 | ||
|
fbae1b5a2c | ||
|
4be0e7f2c6 | ||
|
e04949b586 | ||
|
a878cd75dd | ||
|
78b6fcffa8 | ||
|
0419fcc658 | ||
|
8928bbdbff | ||
|
034a07418d | ||
|
e045af48e8 | ||
|
19c6bb12cc | ||
|
cab93f47b8 | ||
|
871a9455bb | ||
|
15b6373d23 | ||
|
f445af0deb | ||
|
3ee2f0e80c | ||
|
b471290a81 | ||
|
2e49ce0e85 | ||
|
c26e42e521 | ||
|
4f14df2caa | ||
|
8a76fd6c73 | ||
|
2f3062bc92 | ||
|
ddfaf18da9 | ||
|
40c8ba4a5b | ||
|
836fa152e2 | ||
|
92b36477fa | ||
|
75f626ecc8 | ||
|
2600edffb6 | ||
|
a0ba29447f | ||
|
5c20f9daef | ||
|
e7da8d2e49 | ||
|
6a68d558cd | ||
|
06d1eb5825 | ||
|
8984896a4d | ||
|
713c9cba97 | ||
|
2c4143bc13 | ||
|
74a39ff539 | ||
|
0d3b1342bb | ||
|
10db6d3f1f | ||
|
a59492214b | ||
|
c55ec69939 | ||
|
33d3ba124f | ||
|
3f29e4a76e | ||
|
63aff53684 | ||
|
e9a9a6e87f | ||
|
66c86503bd | ||
|
6702ce8bcc | ||
|
ebab7bc29e | ||
|
ecb88d82a3 | ||
|
a0ada8ef9f | ||
|
614cfc4589 | ||
|
97a1486fb9 | ||
|
301f1b35fc | ||
|
0054ae2116 | ||
|
e546e2f1e3 | ||
|
234289ffd8 | ||
|
52219e1eef | ||
|
d5bf5c5e7d | ||
|
d1eba8eddd | ||
|
8717caf994 | ||
|
6278681370 | ||
|
a101f89071 | ||
|
e278be7a45 | ||
|
f32f8c62ac | ||
|
284d054923 | ||
|
88c8c3688e | ||
|
e26a92bace | ||
|
0c217b7048 | ||
|
c02c8b8c25 | ||
|
9150a8751e | ||
|
aeddc191a7 | ||
|
753c2c9012 | ||
|
28a14dc978 | ||
|
c6e61e267a | ||
|
519fde9b1a | ||
|
e9a4c9a06f | ||
|
28180a60fd | ||
|
9486ca2543 | ||
|
7d2672183d | ||
|
3dcd383186 | ||
|
a562590978 | ||
|
428a6cdcd0 | ||
|
9497ddf2fe | ||
|
5967c68f85 | ||
|
5d9b555b72 | ||
|
f8231c23e7 | ||
|
72534ddaea | ||
|
f75a04e4aa | ||
|
7ab0b0f5f5 | ||
|
953c54145c | ||
|
a777ae6b81 | ||
|
a01941da19 | ||
|
2827fd6727 | ||
|
c55fa81f35 | ||
|
46ac00b4a4 | ||
|
3aed8374fa | ||
|
8b016d206e | ||
|
2e55aa06c2 | ||
|
1f62a67dcc | ||
|
82924e9a17 | ||
|
b7b4fbcd32 | ||
|
83504ec21a | ||
|
0860bc1c5e | ||
|
8bfcd6ad7d | ||
|
d2cf83298d | ||
|
6e8855e1a0 | ||
|
a7511fa5da | ||
|
b3e9ea1058 | ||
|
c4da0a8993 | ||
|
53515d7e75 | ||
|
2736fc8378 | ||
|
594626def2 | ||
|
920fd825cf | ||
|
87c5a4c7a0 | ||
|
b829697078 | ||
|
102992bb70 | ||
|
0d02a7aa99 | ||
|
ea03a5cda2 | ||
|
7f7f0fc98d | ||
|
9763d6e295 | ||
|
5361c0277d | ||
|
05319e0efd | ||
|
cfd8b7de65 | ||
|
cdcdde3d46 | ||
|
520ac85b6f | ||
|
142c3eb080 | ||
|
10a0e0b89e | ||
|
fac630367d | ||
|
da76250fad | ||
|
9d9c5c700a | ||
|
0b96046f15 | ||
|
cc31308c32 | ||
|
559b29238c | ||
|
e2d51dfc4b | ||
|
d3de5eadd9 | ||
|
4fa70d510c | ||
|
505a83ad9e | ||
|
a1e634bca9 | ||
|
13a418812a | ||
|
965789d221 | ||
|
2a2c8b5228 | ||
|
c210ef9f59 | ||
|
dab36ebe1e | ||
|
1ca1b3b602 | ||
|
2b16926188 | ||
|
bbbe9cbbc7 | ||
|
1142823d53 | ||
|
390b1f4127 | ||
|
1942fb8bc1 | ||
|
52f252eeb6 | ||
|
8493f61af5 | ||
|
6b7e43830c | ||
|
4482bd3493 | ||
|
b285e35fca | ||
|
a88d536fba | ||
|
e5cf862a14 | ||
|
df9ad11eef | ||
|
94caef272e | ||
|
d745d08cd7 | ||
|
a6448966cf | ||
|
01fbf6d356 | ||
|
e57244a59e | ||
|
fe6a869e0b | ||
|
a45cfa1ee2 | ||
|
abbfbb8e15 | ||
|
6882ba5e7b | ||
|
b97718a0a9 | ||
|
1fe536ee75 | ||
|
2d8c5f88c3 | ||
|
ef85449de2 | ||
|
d94c192f10 | ||
|
fcff74d6c6 | ||
|
22ba0ef2a3 | ||
|
95679a2f40 | ||
|
a7a75d0d06 | ||
|
e930be3974 | ||
|
d7080ec990 | ||
|
22d9eec489 | ||
|
eb5a19f4fd | ||
|
db6b479557 | ||
|
f14d68c258 | ||
|
117d2b2107 | ||
|
8273be2218 | ||
|
adda594159 | ||
|
710e29cc68 | ||
|
6c167535e3 | ||
|
e9b0c33d65 | ||
|
d44a516142 | ||
|
453c5cda07 | ||
|
d3d87f1a2c | ||
|
42e2a72d37 | ||
|
d7bbcc7ad9 | ||
|
4625289771 | ||
|
cda4a1e125 | ||
|
1039d808e2 | ||
|
6173bd8b0d | ||
|
ba6e2398d7 | ||
|
2dcacd0dbf | ||
|
1039396c8e |
@@ -1,4 +1,4 @@
|
||||
From 3dd0480317fe0ed3951daf1cf5757204d11a1ae5 Mon Sep 17 00:00:00 2001
|
||||
From bd5dfbb4768404c53ad623a2c0b3c3b9d635b562 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:55:12 +0100
|
||||
Subject: [PATCH] d3d9: Avoid implicit cast of interface pointer.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] d3d9: Avoid implicit cast of interface pointer.
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c
|
||||
index d3662f8..ebc3413 100644
|
||||
index 4de7d2eb99e..9a4ab3601e3 100644
|
||||
--- a/dlls/d3d9/texture.c
|
||||
+++ b/dlls/d3d9/texture.c
|
||||
@@ -25,17 +25,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
@@ -77,17 +77,17 @@ static void d3d9_texture_preload(struct d3d9_texture *texture)
|
||||
|
||||
static inline struct d3d9_texture *impl_from_IDirect3DTexture9(IDirect3DTexture9 *iface)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ index d3662f8..ebc3413 100644
|
||||
+ return CONTAINING_RECORD((IDirect3DBaseTexture9 *)iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE srv_wined3d_object_destroyed(void *parent)
|
||||
/* wined3d critical section must be taken by the caller. */
|
||||
--
|
||||
1.9.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From eb21fcc668da85977bc86b6105f3830cb26c93e6 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 8 Jun 2021 08:56:40 +1000
|
||||
Subject: [PATCH] bcrypt: Stop compile error when HAVE_GNUTLS_CIPHER_INIT not
|
||||
defined
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In file included from dlls/bcrypt/gnutls.c:1916:
|
||||
include/windef.h:112:24: error: unknown type name ‘va_list’
|
||||
112 | # define __ms_va_list va_list
|
||||
| ^~~~~~~
|
||||
include/winbase.h:2076:84: note: in expansion of macro ‘__ms_va_list’
|
||||
2076 | WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,__ms_va_list*);
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/bcrypt/gnutls.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
|
||||
index d7b4499c692..11596d5f7ac 100644
|
||||
--- a/dlls/bcrypt/gnutls.c
|
||||
+++ b/dlls/bcrypt/gnutls.c
|
||||
@@ -24,9 +24,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
#ifdef HAVE_GNUTLS_CIPHER_INIT
|
||||
|
||||
-#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
--
|
||||
2.33.0
|
||||
|
@@ -1,38 +1,17 @@
|
||||
From 81a36b530261731d6020e09770237ae5bf58166d Mon Sep 17 00:00:00 2001
|
||||
From ebe00ceb4f2d24f2611dbec87486d6597a3466a9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 2 May 2014 20:46:19 +0200
|
||||
Subject: [PATCH] user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
|
||||
|
||||
---
|
||||
dlls/user32/tests/msg.c | 2 ++
|
||||
dlls/win32u/message.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
dlls/win32u/message.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
|
||||
index 4519da6962d..304a3b87f46 100644
|
||||
--- a/dlls/user32/tests/msg.c
|
||||
+++ b/dlls/user32/tests/msg.c
|
||||
@@ -10709,6 +10709,7 @@ static void test_timers(void)
|
||||
start = GetTickCount();
|
||||
while (GetTickCount()-start < 1001 && GetMessageA(&msg, info.hWnd, 0, 0))
|
||||
DispatchMessageA(&msg);
|
||||
+todo_wine
|
||||
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|
||||
|| broken(abs(count-64) <= TIMER_COUNT_TOLERANCE) /* most common */
|
||||
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w2k3, win8 */,
|
||||
@@ -10779,6 +10780,7 @@ static void test_timers_no_wnd(void)
|
||||
start = GetTickCount();
|
||||
while (GetTickCount()-start < 1001 && GetMessageA(&msg, NULL, 0, 0))
|
||||
DispatchMessageA(&msg);
|
||||
+todo_wine
|
||||
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|
||||
|| broken(abs(count-64) <= TIMER_COUNT_TOLERANCE) /* most common */
|
||||
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w1064v1809 */,
|
||||
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
|
||||
index d00178e6aa4..513150a3d61 100644
|
||||
index d2909339983..337d4a2cc1d 100644
|
||||
--- a/dlls/win32u/message.c
|
||||
+++ b/dlls/win32u/message.c
|
||||
@@ -170,7 +170,7 @@ UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIME
|
||||
@@ -3975,7 +3975,7 @@ UINT_PTR WINAPI NtUserSetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC
|
||||
|
||||
if (proc) winproc = alloc_winproc( (WNDPROC)proc, TRUE );
|
||||
|
||||
@@ -42,5 +21,5 @@ index d00178e6aa4..513150a3d61 100644
|
||||
SERVER_START_REQ( set_win_timer )
|
||||
{
|
||||
--
|
||||
2.35.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 36b4dbb687232d783cc3203da1dee4a797606ba7 Mon Sep 17 00:00:00 2001
|
||||
From f48fa2ff628c3262245593301a141dee31118fd4 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
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 255d5afef79..00add6728cc 100644
|
||||
index 021f7941969..68cb4b25d85 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -42,6 +42,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(snoop);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(loaddll);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(imports);
|
||||
@@ -20,7 +20,7 @@ index 255d5afef79..00add6728cc 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3536,6 +3537,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
@@ -3822,6 +3823,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@ index 255d5afef79..00add6728cc 100644
|
||||
|
||||
/******************************************************************
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -3955,6 +3957,9 @@ static void release_address_space(void)
|
||||
@@ -4244,6 +4246,9 @@ static void release_address_space(void)
|
||||
*/
|
||||
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
|
||||
void loader_init( CONTEXT *context, void **entry )
|
||||
{
|
||||
+ OBJECT_ATTRIBUTES staging_event_attr;
|
||||
+ UNICODE_STRING staging_event_string;
|
||||
+ HANDLE staging_event;
|
||||
static int attach_done;
|
||||
NTSTATUS status;
|
||||
ULONG_PTR cookie;
|
||||
@@ -4041,6 +4046,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
ULONG_PTR cookie, port = 0;
|
||||
@@ -4317,6 +4322,16 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
|
||||
#endif
|
||||
|
||||
@@ -56,5 +56,5 @@ index 255d5afef79..00add6728cc 100644
|
||||
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
|
||||
RtlReleasePebLock();
|
||||
--
|
||||
2.33.0
|
||||
2.43.0
|
||||
|
@@ -45,7 +45,7 @@ index 5c00298d41e..d04f5645345 100644
|
||||
+
|
||||
+ status = LsaOpenPolicy( &machine, &object_attributes, POLICY_LOOKUP_NAMES, &handle);
|
||||
+ ok(status == RPC_NT_SERVER_UNAVAILABLE,
|
||||
+ "LsaOpenPolicy(POLICY_LOOKUP_NAMES) for invalid machine returned 0x%08x\n", status);
|
||||
+ "LsaOpenPolicy(POLICY_LOOKUP_NAMES) for invalid machine returned 0x%08lx\n", status);
|
||||
+
|
||||
status = LsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle);
|
||||
ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
|
||||
|
@@ -1,312 +0,0 @@
|
||||
From 1768ecfc4a7181600df254069f02655fe4e5fa0b 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.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/bcrypt/Makefile.in | 3 +-
|
||||
dlls/bcrypt/bcrypt_internal.h | 3 +
|
||||
dlls/bcrypt/gnutls.c | 32 ++++--
|
||||
dlls/bcrypt/unixlib.c | 208 ++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 235 insertions(+), 11 deletions(-)
|
||||
create mode 100644 dlls/bcrypt/unixlib.c
|
||||
|
||||
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
|
||||
index 63a731fa9d9..6dd3066d4a5 100644
|
||||
--- a/dlls/bcrypt/Makefile.in
|
||||
+++ b/dlls/bcrypt/Makefile.in
|
||||
@@ -8,6 +8,7 @@ C_SRCS = \
|
||||
gnutls.c \
|
||||
md2.c \
|
||||
sha256.c \
|
||||
- sha512.c
|
||||
+ sha512.c \
|
||||
+ unixlib.c
|
||||
|
||||
RC_SRCS = version.rc
|
||||
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
|
||||
index 61c367cae9d..d0697ed807e 100644
|
||||
--- a/dlls/bcrypt/bcrypt_internal.h
|
||||
+++ b/dlls/bcrypt/bcrypt_internal.h
|
||||
@@ -219,4 +219,7 @@ struct key_funcs
|
||||
NTSTATUS (CDECL *key_import_rsa)( struct key *, UCHAR *, ULONG );
|
||||
};
|
||||
|
||||
+struct key_funcs *gnutls_lib_init(DWORD reason);
|
||||
+struct key_funcs *macos_lib_init(DWORD reason);
|
||||
+
|
||||
#endif /* __BCRYPT_INTERNAL_H */
|
||||
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
|
||||
index 7b1bceda889..66845ffc8cf 100644
|
||||
--- a/dlls/bcrypt/gnutls.c
|
||||
+++ b/dlls/bcrypt/gnutls.c
|
||||
@@ -373,9 +373,12 @@ fail:
|
||||
|
||||
static void gnutls_uninitialize(void)
|
||||
{
|
||||
- pgnutls_global_deinit();
|
||||
- dlclose( libgnutls_handle );
|
||||
- libgnutls_handle = NULL;
|
||||
+ if (libgnutls_handle)
|
||||
+ {
|
||||
+ pgnutls_global_deinit();
|
||||
+ dlclose( libgnutls_handle );
|
||||
+ libgnutls_handle = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
struct buffer
|
||||
@@ -1894,19 +1897,28 @@ static const struct key_funcs key_funcs =
|
||||
key_import_rsa
|
||||
};
|
||||
|
||||
-NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
|
||||
+struct key_funcs * gnutls_lib_init( DWORD reason )
|
||||
{
|
||||
switch (reason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
- if (!gnutls_initialize()) return STATUS_DLL_NOT_FOUND;
|
||||
- *(const struct key_funcs **)ptr_out = &key_funcs;
|
||||
- break;
|
||||
+ if (!gnutls_initialize()) return NULL;
|
||||
+ return &key_funcs;
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (libgnutls_handle) gnutls_uninitialize();
|
||||
- break;
|
||||
}
|
||||
- return STATUS_SUCCESS;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
-#endif /* HAVE_GNUTLS_CIPHER_INIT */
|
||||
+#else /* HAVE_GNUTLS_CIPHER_INIT */
|
||||
+#include "ntstatus.h"
|
||||
+#define WIN32_NO_STATUS
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "winternl.h"
|
||||
+
|
||||
+struct key_funcs * gnutls_lib_init( DWORD reason )
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
|
||||
new file mode 100644
|
||||
index 00000000000..1937a8172a4
|
||||
--- /dev/null
|
||||
+++ b/dlls/bcrypt/unixlib.c
|
||||
@@ -0,0 +1,208 @@
|
||||
+#if 0
|
||||
+#pragma makedep unix
|
||||
+#endif
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+#include "ntstatus.h"
|
||||
+#define WIN32_NO_STATUS
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "ntsecapi.h"
|
||||
+#include "bcrypt.h"
|
||||
+
|
||||
+#include "bcrypt_internal.h"
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+#include "wine/unicode.h"
|
||||
+
|
||||
+#if defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 || defined(HAVE_GNUTLS_CIPHER_INIT)
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
|
||||
+
|
||||
+static NTSTATUS CDECL key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULONG size, ULONG flags )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_symmetric_init( struct key *key )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static void CDECL key_symmetric_vector_reset( struct key *key )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_symmetric_set_auth_data( struct key *key, UCHAR *auth_data, ULONG len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_symmetric_encrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output, ULONG output_len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_symmetric_decrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output, ULONG output_len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_symmetric_get_tag( struct key *key, UCHAR *tag, ULONG len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static void CDECL key_symmetric_destroy( struct key *key )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_asymmetric_init( struct key *key )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_asymmetric_sign( struct key *key, void *padding, UCHAR *input, ULONG input_len, UCHAR *output,
|
||||
+ ULONG output_len, ULONG *ret_len, ULONG flags )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULONG hash_len,
|
||||
+ UCHAR *signature, ULONG signature_len, DWORD flags )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_export_dsa_capi( struct key *key, UCHAR *buf, ULONG len, ULONG *ret_len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_export_ecc( struct key *key, UCHAR *output, ULONG len, ULONG *ret_len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_import_dsa_capi( struct key *key, UCHAR *buf, ULONG len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_import_ecc( struct key *key, UCHAR *input, ULONG len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_asymmetric_generate( struct key *key )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_asymmetric_duplicate( struct key *key_orig, struct key *key_copy )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static void CDECL key_asymmetric_destroy( struct key *key )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_asymmetric_decrypt( struct key *key, UCHAR *input, ULONG input_len,
|
||||
+ UCHAR *output, ULONG output_len, ULONG *ret)
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS CDECL key_import_rsa( struct key *key, UCHAR *input, ULONG input_len )
|
||||
+{
|
||||
+ FIXME( "not implemented\n" );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+static struct key_funcs key_funcs =
|
||||
+{
|
||||
+ key_set_property,
|
||||
+ key_symmetric_init,
|
||||
+ key_symmetric_vector_reset,
|
||||
+ key_symmetric_set_auth_data,
|
||||
+ key_symmetric_encrypt,
|
||||
+ key_symmetric_decrypt,
|
||||
+ key_symmetric_get_tag,
|
||||
+ key_symmetric_destroy,
|
||||
+ key_asymmetric_init,
|
||||
+ key_asymmetric_generate,
|
||||
+ key_asymmetric_decrypt,
|
||||
+ key_asymmetric_duplicate,
|
||||
+ key_asymmetric_sign,
|
||||
+ key_asymmetric_verify,
|
||||
+ key_asymmetric_destroy,
|
||||
+ key_export_dsa_capi,
|
||||
+ key_export_ecc,
|
||||
+ key_import_dsa_capi,
|
||||
+ key_import_ecc,
|
||||
+ key_import_rsa,
|
||||
+};
|
||||
+
|
||||
+NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
|
||||
+{
|
||||
+ struct key_funcs *gnutls_funcs = gnutls_lib_init(reason);
|
||||
+
|
||||
+ if (reason == DLL_PROCESS_ATTACH)
|
||||
+ {
|
||||
+#define RESOLVE_FUNC(name) \
|
||||
+ if (gnutls_funcs && gnutls_funcs->key_##name) \
|
||||
+ key_funcs.key_##name = gnutls_funcs->key_##name;
|
||||
+
|
||||
+ RESOLVE_FUNC(set_property)
|
||||
+ RESOLVE_FUNC(symmetric_init)
|
||||
+ RESOLVE_FUNC(symmetric_vector_reset)
|
||||
+ RESOLVE_FUNC(symmetric_set_auth_data)
|
||||
+ RESOLVE_FUNC(symmetric_encrypt)
|
||||
+ RESOLVE_FUNC(symmetric_decrypt)
|
||||
+ RESOLVE_FUNC(symmetric_get_tag)
|
||||
+ RESOLVE_FUNC(symmetric_destroy)
|
||||
+ RESOLVE_FUNC(asymmetric_init)
|
||||
+ RESOLVE_FUNC(asymmetric_generate)
|
||||
+ RESOLVE_FUNC(asymmetric_decrypt)
|
||||
+ RESOLVE_FUNC(asymmetric_duplicate)
|
||||
+ RESOLVE_FUNC(asymmetric_sign)
|
||||
+ RESOLVE_FUNC(asymmetric_verify)
|
||||
+ RESOLVE_FUNC(asymmetric_destroy)
|
||||
+ RESOLVE_FUNC(export_dsa_capi)
|
||||
+ RESOLVE_FUNC(export_ecc)
|
||||
+ RESOLVE_FUNC(import_dsa_capi)
|
||||
+ RESOLVE_FUNC(import_ecc)
|
||||
+ RESOLVE_FUNC(import_rsa)
|
||||
+
|
||||
+#undef RESOLVE_FUNC
|
||||
+
|
||||
+ *(struct key_funcs **)ptr_out = &key_funcs;
|
||||
+ }
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.33.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,155 +0,0 @@
|
||||
From 305131e59c071ca84e4447ab053b04bf4023fee8 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 7 Jan 2020 14:22:49 -0600
|
||||
Subject: [PATCH] bcrypt: Implement BCRYPT_KDF_HASH.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47699
|
||||
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
|
||||
---
|
||||
dlls/bcrypt/bcrypt_main.c | 108 ++++++++++++++++++++++++++++++++++++-
|
||||
dlls/bcrypt/tests/bcrypt.c | 3 +-
|
||||
2 files changed, 108 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 0655c5dcfe81..70e914bd41f1 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1993,7 +1993,113 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
|
||||
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
|
||||
if (!kdf) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
- if (!(lstrcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
|
||||
+ if (flags) FIXME("flags ignored: %08x\n", flags);
|
||||
+
|
||||
+ if (!(lstrcmpW( kdf, BCRYPT_KDF_HASH )))
|
||||
+ {
|
||||
+ unsigned int i;
|
||||
+ BCryptBuffer *hash_algorithm = NULL;
|
||||
+ BCryptBuffer *secret_prepend = NULL;
|
||||
+ BCryptBuffer *secret_append = NULL;
|
||||
+ enum alg_id hash_alg_id;
|
||||
+ ULONG hash_length;
|
||||
+ struct hash_impl hash;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ if (parameter)
|
||||
+ {
|
||||
+ for (i = 0; i < parameter->cBuffers; i++)
|
||||
+ {
|
||||
+ BCryptBuffer *cur_buffer = ¶meter->pBuffers[i];
|
||||
+ switch(cur_buffer->BufferType)
|
||||
+ {
|
||||
+ case KDF_HASH_ALGORITHM:
|
||||
+ if (hash_algorithm)
|
||||
+ FIXME("Duplicate KDF_HASH_ALGORITHM, untested\n");
|
||||
+ hash_algorithm = cur_buffer;
|
||||
+ break;
|
||||
+ case KDF_SECRET_PREPEND:
|
||||
+ if (secret_prepend)
|
||||
+ FIXME("Multiple prefixes unsupported\n");
|
||||
+ secret_prepend = cur_buffer;
|
||||
+ break;
|
||||
+ case KDF_SECRET_APPEND:
|
||||
+ if (secret_append)
|
||||
+ FIXME("Multiple suffixes unsupported\n");
|
||||
+ secret_append = cur_buffer;
|
||||
+ break;
|
||||
+ default:
|
||||
+ FIXME("Unsupported BCRYPT_KDF_HASH parameter type %x\n", cur_buffer->BufferType);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!(hash_algorithm))
|
||||
+ hash_alg_id = ALG_ID_SHA1;
|
||||
+ else
|
||||
+ {
|
||||
+ for (i = 0; i < ARRAY_SIZE( builtin_algorithms ); i++)
|
||||
+ {
|
||||
+ if (!lstrcmpW( hash_algorithm->pvBuffer, builtin_algorithms[i].name))
|
||||
+ {
|
||||
+ hash_alg_id = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (i == ARRAY_SIZE(builtin_algorithms))
|
||||
+ {
|
||||
+ WARN("Algorithm %s not found\n", debugstr_w(hash_algorithm->pvBuffer));
|
||||
+ return STATUS_NOT_SUPPORTED;
|
||||
+ }
|
||||
+ if (builtin_algorithms[hash_alg_id].class != BCRYPT_HASH_INTERFACE)
|
||||
+ {
|
||||
+ return STATUS_NOT_SUPPORTED;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ hash_length = builtin_algorithms[hash_alg_id].hash_length;
|
||||
+
|
||||
+ if (!derived)
|
||||
+ {
|
||||
+ *result = hash_length;
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+
|
||||
+ if ((status = hash_init(&hash, hash_alg_id)))
|
||||
+ {
|
||||
+ return status;
|
||||
+ }
|
||||
+
|
||||
+ if (secret_prepend)
|
||||
+ {
|
||||
+ hash_update(&hash, hash_alg_id, secret_prepend->pvBuffer, secret_prepend->cbBuffer);
|
||||
+ }
|
||||
+
|
||||
+ hash_update(&hash, hash_alg_id, secret->data, secret->len);
|
||||
+
|
||||
+ if (secret_append)
|
||||
+ {
|
||||
+ hash_update(&hash, hash_alg_id, secret_append->pvBuffer, secret_append->cbBuffer);
|
||||
+ }
|
||||
+
|
||||
+ if (derived_size >= hash_length)
|
||||
+ {
|
||||
+ hash_finish(&hash, hash_alg_id, derived, derived_size);
|
||||
+ *result = hash_length;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ UCHAR *output = heap_alloc(hash_length);
|
||||
+ hash_finish(&hash, hash_alg_id, output, hash_length);
|
||||
+ memcpy(derived, output, derived_size);
|
||||
+ heap_free(output);
|
||||
+ *result = derived_size;
|
||||
+ }
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+ else if (!(lstrcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
|
||||
{
|
||||
ULONG n;
|
||||
ULONG secret_length = secret->len;
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 6be406dee21f..b13432523d15 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -2180,7 +2180,7 @@ static void test_ECDH(void)
|
||||
raw_secret_end:
|
||||
|
||||
status = pBCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
|
||||
- todo_wine ok (status == STATUS_SUCCESS, "got %08x\n", status);
|
||||
+ ok (status == STATUS_SUCCESS, "got %08x\n", status);
|
||||
|
||||
if (status != STATUS_SUCCESS)
|
||||
{
|
||||
@@ -2716,7 +2716,6 @@ static void test_SecretAgreement(void)
|
||||
ok(status == STATUS_INVALID_PARAMETER, "got %08x\n", status);
|
||||
|
||||
status = pBCryptDeriveKey(secret, L"HASH", NULL, NULL, 0, &size, 0);
|
||||
- todo_wine
|
||||
ok(status == STATUS_SUCCESS, "got %08x\n", status);
|
||||
|
||||
status = pBCryptDestroyHash(secret);
|
||||
--
|
||||
2.29.2
|
||||
|
@@ -1,6 +0,0 @@
|
||||
Fixes: [47699] Multiple games fail to connect to online services (missing BCryptSecretAgreement / BCryptDeriveKey implementation)
|
||||
# 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).
|
||||
# Temporarily disabled pending a rebase from author.
|
||||
Disabled: true
|
@@ -1,4 +1,4 @@
|
||||
From 7362e037e8160046fffcf062a663ea8e7ac45290 Mon Sep 17 00:00:00 2001
|
||||
From f9f5002e4ce6417dd196d53b50c51a3b224015d3 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 12 Nov 2019 18:13:20 +0800
|
||||
Subject: [PATCH] comctl32: Bump version to 6.0.
|
||||
@@ -14,12 +14,12 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
|
||||
index 7dfdf089eb1..17ec7eeab40 100644
|
||||
index 51f4337add2..3fe8905abea 100644
|
||||
--- a/dlls/comctl32/comctl32.h
|
||||
+++ b/dlls/comctl32/comctl32.h
|
||||
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT) DECLSPEC_HIDDEN;
|
||||
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
|
||||
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
|
||||
|
||||
-#define COMCTL32_VERSION_MINOR 81
|
||||
+#define COMCTL32_VERSION_MINOR 0
|
||||
@@ -53,5 +53,5 @@ index a54de13d8b2..e0b0e22d4dc 100644
|
||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||
--
|
||||
2.35.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From eddc40dbf4048ceea1fda7f842adad340865723b Mon Sep 17 00:00:00 2001
|
||||
From e6c1c1fe3fe2f4fe7d3e421b94d925c40063af22 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.
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6425e4da5f8..c97671cdfc6 100755
|
||||
index ca6e87d4740..7033499399f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21346,6 +21346,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
@@ -21660,6 +21660,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 6425e4da5f8..c97671cdfc6 100755
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptowinrt enable_cryptowinrt
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b5a3b0069fb..73b1b1c8c2b 100644
|
||||
index cba55126869..57064a05fe5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2450,6 +2450,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
@@ -2477,6 +2477,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
@@ -41,7 +41,7 @@ index b5a3b0069fb..73b1b1c8c2b 100644
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptowinrt)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 0ec2b8a2045..76accca43eb 100644
|
||||
index 5598bfb78e0..acda4e4ac6d 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
+++ b/dlls/cryptext/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -151,13 +151,13 @@ index 537ba66cd3b..a4314518eac 100644
|
||||
+}
|
||||
diff --git a/dlls/cryptext/tests/Makefile.in b/dlls/cryptext/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..522fc60a4af
|
||||
index 00000000000..c3f4551fc00
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+TESTDLL = cryptext.dll
|
||||
+
|
||||
+C_SRCS = \
|
||||
+SOURCES = \
|
||||
+ cryptext.c
|
||||
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
|
||||
new file mode 100644
|
||||
@@ -227,5 +227,5 @@ index 00000000000..ab1007dbd82
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.35.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ea3579b5b3d701647f5c7f16de658f1cd7fe876d Mon Sep 17 00:00:00 2001
|
||||
From 0fbce9fe4b69f27b7df82c6517c364aab57de63b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 30 Jul 2021 15:57:29 +1000
|
||||
Subject: [PATCH] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
|
||||
Subject: [PATCH 1/2] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50210
|
||||
|
||||
@@ -10,8 +10,8 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
dlls/d3dx11_42/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/main.c | 9 --
|
||||
dlls/d3dx11_43/texture.c | 176 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 178 insertions(+), 9 deletions(-)
|
||||
dlls/d3dx11_43/texture.c | 167 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 169 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
|
||||
index 7fcce18a8e1..78ca5f707a7 100644
|
||||
@@ -55,10 +55,10 @@ index 5dad027864f..00c1db35e42 100644
|
||||
- return E_NOTIMPL;
|
||||
-}
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 81ac8ee6db7..6881eec107d 100644
|
||||
index 81ac8ee6db7..bbf937cdab0 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -15,14 +15,190 @@
|
||||
@@ -15,14 +15,181 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
@@ -145,13 +145,11 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
+ D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
+{
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
+ IWICImagingFactory *factory = NULL;
|
||||
+ IWICDdsDecoder *dds_decoder = NULL;
|
||||
+ IWICBitmapDecoder *decoder = NULL;
|
||||
+ WICDdsParameters dds_params;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ unsigned int frame_count;
|
||||
+ GUID container_format;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
@@ -186,16 +184,6 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
+ if (FAILED(hr) || !frame_count)
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_DDS)
|
||||
+ {
|
||||
+ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
|
||||
@@ -204,6 +192,8 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+ hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->Width = dds_params.Width;
|
||||
+ img_info->Height = dds_params.Height;
|
||||
+ img_info->ArraySize = dds_params.ArraySize;
|
||||
+ img_info->Depth = dds_params.Depth;
|
||||
+ img_info->MipLevels = dds_params.MipLevels;
|
||||
@@ -218,6 +208,9 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
|
||||
+ img_info->Width = 1;
|
||||
+ img_info->Height = 1;
|
||||
+ img_info->ArraySize = 1;
|
||||
+ img_info->Depth = 1;
|
||||
+ img_info->MipLevels = 1;
|
||||
@@ -229,8 +222,6 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+end:
|
||||
+ if (dds_decoder)
|
||||
+ IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
@@ -250,5 +241,5 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11ShaderResourceView **view, HRESULT *hresult)
|
||||
--
|
||||
2.34.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 5be34c9e347d4379179eeba742b25986152d4e4f Mon Sep 17 00:00:00 2001
|
||||
From 7285c2c90f43cd46d873a2ddb65e9c6c9d63f750 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 3 Aug 2021 11:13:18 +1000
|
||||
Subject: [PATCH] d3dx11_42: Implement D3DX11CreateTextureFromMemory
|
||||
Subject: [PATCH 2/2] d3dx11_42: Implement D3DX11CreateTextureFromMemory
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 347 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 342 insertions(+), 5 deletions(-)
|
||||
dlls/d3dx11_43/texture.c | 359 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 354 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 6881eec107d..b91bd8d881a 100644
|
||||
index bbf937cdab0..10dedf30c0f 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -22,6 +22,7 @@
|
||||
@@ -20,7 +20,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
@@ -43,6 +44,32 @@ file_formats[] =
|
||||
@@ -43,6 +44,33 @@ file_formats[] =
|
||||
{ &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
};
|
||||
|
||||
@@ -42,6 +42,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
+ { &GUID_WICPixelFormat32bppBGR, DXGI_FORMAT_B8G8R8X8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppBGRA, DXGI_FORMAT_B8G8R8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102, DXGI_FORMAT_R10G10B10A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102XR, DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat64bppRGBA, DXGI_FORMAT_R16G16B16A16_UNORM },
|
||||
@@ -53,7 +54,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -95,6 +122,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
@@ -95,6 +123,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
return format;
|
||||
}
|
||||
|
||||
@@ -229,7 +230,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
{
|
||||
@@ -229,14 +425,155 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
|
||||
@@ -220,14 +417,166 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -264,17 +265,28 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
+
|
||||
+ if (!src_data || !src_data_size || !texture)
|
||||
+ return E_FAIL;
|
||||
+ if (load_info)
|
||||
+ FIXME("load_info is ignored.\n");
|
||||
+ if (pump)
|
||||
+ FIXME("Thread pump is not supported yet.\n");
|
||||
+
|
||||
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
|
||||
+ return E_FAIL;
|
||||
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
+ if (load_info)
|
||||
+ {
|
||||
+ FIXME("Cube map is not supported.\n");
|
||||
+ return E_FAIL;
|
||||
+ img_info.Width = load_info->Width;
|
||||
+ img_info.Height = load_info->Height;
|
||||
+ img_info.Depth = load_info->Depth;
|
||||
+ img_info.ArraySize = 1;
|
||||
+ img_info.MipLevels = load_info->MipLevels;
|
||||
+ img_info.MiscFlags = load_info->MiscFlags;
|
||||
+ img_info.Format = load_info->Format;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
|
||||
+ return E_FAIL;
|
||||
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
+ {
|
||||
+ FIXME("Cube map is not supported.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory)))
|
||||
@@ -391,5 +403,5 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
|
||||
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
|
||||
--
|
||||
2.34.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -0,0 +1,56 @@
|
||||
From 30d677139afe2af3f72c68ba11f1bbaead6f1c11 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 2 Aug 2023 08:24:11 +1000
|
||||
Subject: [PATCH] d3dx11_43: D3DX11GetImageInfoFromMemory - Only use frame for
|
||||
non DDS images
|
||||
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 10dedf30c0f..f3f7d350131 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -295,6 +295,7 @@ static const GUID *dxgi_format_to_wic_guid(DXGI_FORMAT format)
|
||||
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
{
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
IWICImagingFactory *factory = NULL;
|
||||
IWICDdsDecoder *dds_decoder = NULL;
|
||||
IWICBitmapDecoder *decoder = NULL;
|
||||
@@ -358,9 +359,18 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
|
||||
}
|
||||
else
|
||||
{
|
||||
- FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
|
||||
- img_info->Width = 1;
|
||||
- img_info->Height = 1;
|
||||
+ unsigned int frame_count;
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
+ if (FAILED(hr) || !frame_count)
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
img_info->ArraySize = 1;
|
||||
img_info->Depth = 1;
|
||||
img_info->MipLevels = 1;
|
||||
@@ -372,6 +382,8 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
|
||||
end:
|
||||
if (dds_decoder)
|
||||
IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
if (decoder)
|
||||
IWICBitmapDecoder_Release(decoder);
|
||||
if (stream)
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -0,0 +1,127 @@
|
||||
From cf47173eec41f4427248796a781e3aa4463a79db Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mu=C5=BCy=C5=82o?= <galtgendo@o2.pl>
|
||||
Date: Wed, 7 Jun 2023 08:17:59 +1000
|
||||
Subject: [PATCH] d3dx9: Improve handling of Sprite render states
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/sprite.c | 76 +++++++++++++++++++++++-------------------
|
||||
1 file changed, 41 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c
|
||||
index 1a072e52cda..0ce2ab977f3 100644
|
||||
--- a/dlls/d3dx9_36/sprite.c
|
||||
+++ b/dlls/d3dx9_36/sprite.c
|
||||
@@ -193,7 +193,7 @@ static HRESULT WINAPI d3dx9_sprite_SetWorldViewLH(ID3DXSprite *iface,
|
||||
}
|
||||
|
||||
/* Helper function */
|
||||
-static void set_states(struct d3dx9_sprite *object)
|
||||
+static void set_states(struct d3dx9_sprite *object, DWORD flags)
|
||||
{
|
||||
D3DXMATRIX mat;
|
||||
D3DVIEWPORT9 vp;
|
||||
@@ -204,32 +204,35 @@ static void set_states(struct d3dx9_sprite *object)
|
||||
IDirect3DDevice9_SetNPatchMode(object->device, 0.0f);
|
||||
|
||||
/* Render states */
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAFUNC, D3DCMP_GREATER);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAREF, 0x00);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHATESTENABLE, object->alphacmp_caps);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_BLENDOP, D3DBLENDOP_ADD);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPING, TRUE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPLANEENABLE, 0);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE |
|
||||
- D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_FOGENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_LIGHTING, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_RANGEFOGENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SPECULARENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRGBWRITEENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_STENCILENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_VERTEXBLEND, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_WRAP0, 0);
|
||||
+ if (!(flags & D3DXSPRITE_DONOTMODIFY_RENDERSTATE))
|
||||
+ {
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAFUNC, D3DCMP_GREATER);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAREF, 0x00);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHATESTENABLE, object->alphacmp_caps);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_BLENDOP, D3DBLENDOP_ADD);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPING, TRUE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPLANEENABLE, 0);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE |
|
||||
+ D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_FOGENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_LIGHTING, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_RANGEFOGENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SPECULARENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRGBWRITEENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_STENCILENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_VERTEXBLEND, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_WRAP0, 0);
|
||||
+ }
|
||||
|
||||
/* Texture stage states */
|
||||
IDirect3DDevice9_SetTextureStageState(object->device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||
@@ -266,12 +269,15 @@ static void set_states(struct d3dx9_sprite *object)
|
||||
IDirect3DDevice9_SetSamplerState(object->device, 0, D3DSAMP_SRGBTEXTURE, 0);
|
||||
|
||||
/* Matrices */
|
||||
- D3DXMatrixIdentity(&mat);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view);
|
||||
- IDirect3DDevice9_GetViewport(object->device, &vp);
|
||||
- D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat);
|
||||
+ if (!(flags & D3DXSPRITE_OBJECTSPACE))
|
||||
+ {
|
||||
+ D3DXMatrixIdentity(&mat);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view);
|
||||
+ IDirect3DDevice9_GetViewport(object->device, &vp);
|
||||
+ D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_sprite_Begin(ID3DXSprite *iface, DWORD flags)
|
||||
@@ -317,7 +323,7 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
|
||||
hr=IDirect3DDevice9_BeginStateBlock(This->device);
|
||||
if(hr!=D3D_OK) return hr;
|
||||
|
||||
- set_states(This);
|
||||
+ set_states(This, flags);
|
||||
|
||||
IDirect3DDevice9_SetVertexDeclaration(This->device, This->vdecl);
|
||||
IDirect3DDevice9_SetStreamSource(This->device, 0, NULL, 0, sizeof(struct sprite_vertex));
|
||||
@@ -330,7 +336,7 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
|
||||
}
|
||||
|
||||
/* Apply device state */
|
||||
- set_states(This);
|
||||
+ set_states(This, flags);
|
||||
|
||||
This->flags=flags;
|
||||
This->ready=TRUE;
|
||||
--
|
||||
2.40.1
|
||||
|
1
patches/d3dx9-sprite-state/definition
Normal file
1
patches/d3dx9-sprite-state/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [54034] d3dx9: Improve sprite rendering state handling.
|
@@ -1,375 +0,0 @@
|
||||
From 0ba05ea85f8f2de3c802083340eb3a9ee8df209e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:29:37 +0100
|
||||
Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
|
||||
Changes in v2 (by Christian Costa):
|
||||
* More generic code for D3DXDisassembleShader.
|
||||
---
|
||||
dlls/d3dx9_36/shader.c | 335 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 329 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index 1aa75d64dc5..d98345e2288 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright 2008 Luis Busquets
|
||||
* Copyright 2009 Matteo Bruni
|
||||
+ * Copyright 2010, 2013, 2016 Christian Costa
|
||||
* Copyright 2011 Travis Athougies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -19,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "d3dx9_private.h"
|
||||
#include "d3dcommon.h"
|
||||
@@ -2347,13 +2349,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
-HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
- ID3DXBuffer **buffer)
|
||||
-{
|
||||
- TRACE("shader %p, colorcode %d, comments %s, buffer %p.\n", shader, colorcode, debugstr_a(comments), buffer);
|
||||
+static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord",
|
||||
+ "tangent", "binormal", "tessfactor", "positiont", "color" };
|
||||
|
||||
- return D3DDisassemble(shader, D3DXGetShaderSize(shader), colorcode ? D3D_DISASM_ENABLE_COLOR_CODE : 0,
|
||||
- comments, (ID3DBlob **)buffer);
|
||||
+static const char *tex_type[] = { "", "1d", "2d", "cube", "volume" };
|
||||
+
|
||||
+static int add_modifier(char *buffer, DWORD param)
|
||||
+{
|
||||
+ char *buf = buffer;
|
||||
+ DWORD dst_mod = param & D3DSP_DSTMOD_MASK;
|
||||
+
|
||||
+ if (dst_mod & D3DSPDM_SATURATE)
|
||||
+ buf += sprintf(buf, "_sat");
|
||||
+ if (dst_mod & D3DSPDM_PARTIALPRECISION)
|
||||
+ buf += sprintf(buf, "_pp");
|
||||
+ if (dst_mod & D3DSPDM_MSAMPCENTROID)
|
||||
+ buf += sprintf(buf, "_centroid");
|
||||
+
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+static int add_register(char *buffer, DWORD param, BOOL dst, BOOL ps)
|
||||
+{
|
||||
+ char *buf = buffer;
|
||||
+ DWORD reg_type = ((param & D3DSP_REGTYPE_MASK2) >> D3DSP_REGTYPE_SHIFT2)
|
||||
+ | ((param & D3DSP_REGTYPE_MASK) >> D3DSP_REGTYPE_SHIFT);
|
||||
+ DWORD reg_num = param & D3DSP_REGNUM_MASK;
|
||||
+
|
||||
+ if (reg_type == D3DSPR_INPUT)
|
||||
+ buf += sprintf(buf, "v%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_CONST)
|
||||
+ buf += sprintf(buf, "c%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_TEMP)
|
||||
+ buf += sprintf(buf, "r%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_ADDR)
|
||||
+ buf += sprintf(buf, "%s%d", ps ? "t" : "a", reg_num);
|
||||
+ else if (reg_type == D3DSPR_SAMPLER)
|
||||
+ buf += sprintf(buf, "s%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_RASTOUT)
|
||||
+ buf += sprintf(buf, "oPos");
|
||||
+ else if (reg_type == D3DSPR_COLOROUT)
|
||||
+ buf += sprintf(buf, "oC%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_TEXCRDOUT)
|
||||
+ buf += sprintf(buf, "oT%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_ATTROUT)
|
||||
+ buf += sprintf(buf, "oD%d", reg_num);
|
||||
+ else
|
||||
+ buf += sprintf(buf, "? (%d)", reg_type);
|
||||
+
|
||||
+ if (dst)
|
||||
+ {
|
||||
+ if ((param & D3DSP_WRITEMASK_ALL) != D3DSP_WRITEMASK_ALL)
|
||||
+ {
|
||||
+ buf += sprintf(buf, ".%s%s%s%s", param & D3DSP_WRITEMASK_0 ? "x" : "",
|
||||
+ param & D3DSP_WRITEMASK_1 ? "y" : "",
|
||||
+ param & D3DSP_WRITEMASK_2 ? "z" : "",
|
||||
+ param & D3DSP_WRITEMASK_3 ? "w" : "");
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if ((param & D3DVS_SWIZZLE_MASK) != D3DVS_NOSWIZZLE)
|
||||
+ {
|
||||
+ if ( ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_X | D3DVS_Y_X | D3DVS_Z_X | D3DVS_W_X)) ||
|
||||
+ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Y | D3DVS_Y_Y | D3DVS_Z_Y | D3DVS_W_Y)) ||
|
||||
+ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Z | D3DVS_Y_Z | D3DVS_Z_Z | D3DVS_W_Z)) ||
|
||||
+ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_W | D3DVS_Y_W | D3DVS_Z_W | D3DVS_W_W)) )
|
||||
+ buf += sprintf(buf, ".%c", 'w' + (((param >> D3DVS_SWIZZLE_SHIFT) + 1) & 0x3));
|
||||
+ else
|
||||
+ buf += sprintf(buf, ".%c%c%c%c", 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+0)) + 1) & 0x3),
|
||||
+ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+2)) + 1) & 0x3),
|
||||
+ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+4)) + 1) & 0x3),
|
||||
+ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+6)) + 1) & 0x3));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+struct instr_info
|
||||
+{
|
||||
+ DWORD opcode;
|
||||
+ const char *name;
|
||||
+ int length;
|
||||
+ int (*function)(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps);
|
||||
+ WORD min_version;
|
||||
+ WORD max_version;
|
||||
+};
|
||||
+
|
||||
+static int instr_comment(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ *ptr += 1 + ((**ptr & D3DSI_COMMENTSIZE_MASK) >> D3DSI_COMMENTSIZE_SHIFT);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int instr_def(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ int len = sprintf(buffer, " def c%d, %g, %g, %g, %g\n", *(*ptr+1) & D3DSP_REGNUM_MASK,
|
||||
+ (double)*(float*)(*ptr+2), (double)*(float*)(*ptr+3),
|
||||
+ (double)*(float*)(*ptr+4), (double)*(float*)(*ptr+5));
|
||||
+ *ptr += 6;
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+static int instr_dcl(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ DWORD param1 = *++*ptr;
|
||||
+ DWORD param2 = *++*ptr;
|
||||
+ DWORD usage = (param1 & D3DSP_DCL_USAGE_MASK) >> D3DSP_DCL_USAGE_SHIFT;
|
||||
+ DWORD usage_index = (param1 & D3DSP_DCL_USAGEINDEX_MASK) >> D3DSP_DCL_USAGEINDEX_SHIFT;
|
||||
+ char *buf = buffer;
|
||||
+
|
||||
+ buf += sprintf(buf, " dcl");
|
||||
+ if (ps)
|
||||
+ {
|
||||
+ if (param1 & D3DSP_TEXTURETYPE_MASK)
|
||||
+ buf += sprintf(buf, "_%s", (usage <= D3DSTT_VOLUME) ?
|
||||
+ tex_type[(param1 & D3DSP_TEXTURETYPE_MASK) >> D3DSP_TEXTURETYPE_SHIFT] : "???");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ buf += sprintf(buf, "_%s", (usage <= D3DDECLUSAGE_COLOR) ? decl_usage[usage] : "???");
|
||||
+ if (usage_index)
|
||||
+ buf += sprintf(buf, "%d", usage_index);
|
||||
+ }
|
||||
+
|
||||
+ buf += add_modifier(buf, param2);
|
||||
+ buf += sprintf(buf, " ");
|
||||
+ buf += add_register(buf, param2, TRUE, TRUE);
|
||||
+ buf += sprintf(buf, "\n");
|
||||
+ (*ptr)++;
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+static int instr_generic(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ char *buf = buffer;
|
||||
+ int j;
|
||||
+
|
||||
+ buf += sprintf(buf, " %s", info->name);
|
||||
+ (*ptr)++;
|
||||
+
|
||||
+ if (info->length)
|
||||
+ {
|
||||
+ buf += add_modifier(buf, **ptr);
|
||||
+
|
||||
+ for (j = 0; j < info->length; j++)
|
||||
+ {
|
||||
+ buf += sprintf(buf, "%s ", j ? "," : "");
|
||||
+
|
||||
+ if ((j != 0) && ((**ptr & D3DSP_SRCMOD_MASK) != D3DSPSM_NONE))
|
||||
+ {
|
||||
+ if ((**ptr & D3DSP_SRCMOD_MASK) == D3DSPSM_NEG)
|
||||
+ buf += sprintf(buf, "-");
|
||||
+ else
|
||||
+ buf += sprintf(buf, "*");
|
||||
+ }
|
||||
+
|
||||
+ buf += add_register(buf, **ptr, j == 0, ps);
|
||||
+
|
||||
+ if (*(*ptr)++ & D3DVS_ADDRESSMODE_MASK)
|
||||
+ {
|
||||
+ buf += sprintf(buf, "[");
|
||||
+ buf += add_register(buf, **ptr, FALSE, FALSE);
|
||||
+ buf += sprintf(buf, "]");
|
||||
+ (*ptr)++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ buf += sprintf(buf, "\n");
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+const struct instr_info instructions[] =
|
||||
+{
|
||||
+ { D3DSIO_NOP, "nop", 0, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_MOV, "mov", 2, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_ADD, "add", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_SUB, "sub", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_MAD, "mad", 4, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_MUL, "mul", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_RCP, "rcp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_RSQ, "rsq", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_DP3, "dp3", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_DP4, "dp4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 1.2 for PS */
|
||||
+ { D3DSIO_MIN, "min", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_MAX, "max", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_SLT, "slt", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_SGE, "sge", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_EXP, "exp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_LOG, "log", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_LIT, "lit", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_DST, "dst", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_LRP, "lrp", 4, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for VS */
|
||||
+ { D3DSIO_FRC, "frc", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M4x4, "m4x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M4x3, "m4x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M3x4, "m3x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M3x3, "m3x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M3x2, "m3x2", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_CALL, "call", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_CALLNZ, "callnz", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_LOOP, "loop", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */
|
||||
+ { D3DSIO_RET, "ret", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_ENDLOOP, "endloop", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */
|
||||
+ { D3DSIO_LABEL, "label", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_DCL, "dcl", 1, instr_dcl, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_POW, "pow", 3, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_CRS, "crs", 3, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_SGN, "sgn", 4, instr_generic, 0x0200, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_ABS, "abs", 2, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_NRM, "nrm", 2, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_SINCOS, "sincos", 4, instr_generic, 0x0200, 0x02FF },
|
||||
+ { D3DSIO_SINCOS, "sincos", 2, instr_generic, 0x0300, 0xFFFF },
|
||||
+ { D3DSIO_REP, "rep", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_ENDREP, "endrep", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_IF, "if", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_IFC, "if_comp", 2, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_ELSE, "else", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_ENDIF, "endif", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_BREAK, "break", 0, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_BREAKC, "break_comp", 2, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_MOVA, "mova", 2, instr_generic, 0x0200, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_DEFB, "defb", 2, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_DEFI, "defi", 2, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_TEXCOORD, "texcoord", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXCOORD, "texcrd", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_TEXKILL, "texkill", 1, instr_generic, 0x0100, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_TEX, "tex", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEX, "texld", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_TEX, "texld", 3, instr_generic, 0x0200, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_TEXBEM, "texbem", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXBEML, "texbeml", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXREG2AR, "texreg2ar", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXREG2GB, "texreg2gb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x2PAD, "texm3x2pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x2TEX, "texm3x2tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3PAD, "texm3x3pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3TEX, "texm3x3tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3DIFF, "texm3x3diff", 2, instr_generic, 0x0100, 0xFFFF }, /* PS only - Not documented */
|
||||
+ { D3DSIO_TEXM3x3SPEC, "texm3x3spec", 3, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3VSPEC, "texm3x3vspec", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_EXPP, "expp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_LOGP, "logp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_CND, "cnd", 4, instr_generic, 0x0100, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_DEF, "def", 5, instr_def, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_TEXREG2RGB, "texreg2rgb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXDP3TEX, "texdp3tex", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x2DEPTH, "texm3x2depth", 2, instr_generic, 0x0103, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXDP3, "texdp3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3, "texm3x3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXDEPTH, "texdepth", 1, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_CMP, "cmp", 4, instr_generic, 0x0102, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_BEM, "bem", 3, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_DP2ADD, "dp2add", 4, instr_generic, 0x0200, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_DSX, "dsx", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_DSY, "dsy", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_TEXLDD, "texldd", 5, instr_generic, 0x0201, 0xFFFF }, /* PS only - not existing for 2.b */
|
||||
+ { D3DSIO_SETP, "setp_comp", 3, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_TEXLDL, "texldl", 3, instr_generic, 0x0300, 0xFFFF },
|
||||
+ { D3DSIO_BREAKP, "breakp", 1, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_PHASE, "phase", 0, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF }
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
+ ID3DXBuffer **disassembly)
|
||||
+{
|
||||
+ DWORD *ptr = (DWORD *)shader;
|
||||
+ char *buffer, *buf;
|
||||
+ UINT capacity = 4096;
|
||||
+ BOOL ps;
|
||||
+ WORD version;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("%p %d %s %p\n", shader, colorcode, debugstr_a(comments), disassembly);
|
||||
+
|
||||
+ if (!shader || !disassembly)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ buf = buffer = HeapAlloc(GetProcessHeap(), 0, capacity);
|
||||
+ if (!buffer)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ ps = (*ptr >> 16) & 1;
|
||||
+ version = *ptr & 0xFFFF;
|
||||
+ buf += sprintf(buf, " %s_%d_%d\n", ps ? "ps" : "vs", D3DSHADER_VERSION_MAJOR(*ptr), D3DSHADER_VERSION_MINOR(*ptr));
|
||||
+ ptr++;
|
||||
+
|
||||
+ while (*ptr != D3DSIO_END)
|
||||
+ {
|
||||
+ DWORD index;
|
||||
+
|
||||
+ if ((buf - buffer + 128) > capacity)
|
||||
+ {
|
||||
+ UINT count = buf - buffer;
|
||||
+ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2);
|
||||
+ if (!new_buffer)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ capacity *= 2;
|
||||
+ buffer = new_buffer;
|
||||
+ buf = buffer + count;
|
||||
+ }
|
||||
+
|
||||
+ for (index = 0; index < sizeof(instructions)/sizeof(instructions[0]); index++)
|
||||
+ if (((*ptr & D3DSI_OPCODE_MASK) == instructions[index].opcode) &&
|
||||
+ (version >= instructions[index].min_version) && (version <= instructions[index].max_version))
|
||||
+ break;
|
||||
+
|
||||
+ if (index != sizeof(instructions)/sizeof(instructions[0]))
|
||||
+ {
|
||||
+ buf += instructions[index].function(&(instructions[index]), &ptr, buf, ps);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ buf += sprintf(buf, " ??? (Unknown opcode %x)\n", *ptr);
|
||||
+ while (*++ptr & (1u << 31));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ hr = D3DXCreateBuffer(buf - buffer + 1 , disassembly);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ strcpy(ID3DXBuffer_GetBufferPointer(*disassembly), buffer);
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.39.0
|
||||
|
@@ -1,74 +0,0 @@
|
||||
From 63a4b93d73acaa55a2246a1b0d825e7950af042b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 15 Feb 2016 08:25:58 +0100
|
||||
Subject: [PATCH] d3dx9_36/tests: Add initial tests for D3DXDisassembleShader.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/shader.c | 46 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
|
||||
index e2925faad6..5edac61ae8 100644
|
||||
--- a/dlls/d3dx9_36/tests/shader.c
|
||||
+++ b/dlls/d3dx9_36/tests/shader.c
|
||||
@@ -6623,6 +6623,51 @@ static void test_fragment_linker(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_disassemble_shader(void)
|
||||
+{
|
||||
+ static const char disasm_vs[] = " vs_1_1\n"
|
||||
+ " dcl_position v0\n"
|
||||
+ " dp4 oPos.x, v0, c0\n"
|
||||
+ " dp4 oPos.y, v0, c1\n"
|
||||
+ " dp4 oPos.z, v0, c2\n"
|
||||
+ " dp4 oPos.w, v0, c3\n";
|
||||
+ static const char disasm_ps[] = " ps_1_1\n"
|
||||
+ " def c1, 1, 0, 0, 0\n"
|
||||
+ " tex t0\n"
|
||||
+ " dp3 r0, c1, c0\n"
|
||||
+ " mul r0, v0, r0\n"
|
||||
+ " mul r0, t0, r0\n";
|
||||
+ ID3DXBuffer *disassembly;
|
||||
+ HRESULT ret;
|
||||
+ char *ptr;
|
||||
+
|
||||
+ /* Check wrong parameters */
|
||||
+ ret = D3DXDisassembleShader(NULL, FALSE, NULL, NULL);
|
||||
+ ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
|
||||
+ ret = D3DXDisassembleShader(NULL, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
|
||||
+ ret = D3DXDisassembleShader(simple_vs, FALSE, NULL, NULL);
|
||||
+ ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
|
||||
+
|
||||
+ /* Test with vertex shader */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(simple_vs, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_vs, sizeof(disasm_vs) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_vs);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test with pixel shader */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(simple_ps, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps, sizeof(disasm_ps) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+}
|
||||
+
|
||||
START_TEST(shader)
|
||||
{
|
||||
test_get_shader_size();
|
||||
@@ -6638,4 +6683,5 @@ START_TEST(shader)
|
||||
test_registerset_defaults();
|
||||
test_shader_semantics();
|
||||
test_fragment_linker();
|
||||
+ test_disassemble_shader();
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
@@ -1,200 +0,0 @@
|
||||
From ce7f2989a9fc4d4d6a307131f08f6ed5570de680 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Tue, 16 Feb 2016 12:11:45 +0100
|
||||
Subject: [PATCH] d3dx9_36/tests: Add additional tests for special cases.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/shader.c | 163 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 163 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
|
||||
index 5edac61ae8..0ae8f27b03 100644
|
||||
--- a/dlls/d3dx9_36/tests/shader.c
|
||||
+++ b/dlls/d3dx9_36/tests/shader.c
|
||||
@@ -6623,6 +6623,60 @@ static void test_fragment_linker(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static const DWORD ps_tex[] = {
|
||||
+ 0xffff0103, /* ps_1_3 */
|
||||
+ 0x00000042, 0xb00f0000, /* tex t0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texld_1_4[] = {
|
||||
+ 0xffff0104, /* ps_1_4 */
|
||||
+ 0x00000042, 0xb00f0000, 0xa0e40000, /* texld t0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texld_2_0[] = {
|
||||
+ 0xffff0200, /* ps_2_0 */
|
||||
+ 0x00000042, 0xb00f0000, 0xa0e40000, 0xa0e40001, /* texld t0, c0, c1 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texcoord[] = {
|
||||
+ 0xffff0103, /* ps_1_4 */
|
||||
+ 0x00000040, 0xb00f0000, /* texcoord t0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texcrd[] = {
|
||||
+ 0xffff0104, /* ps_2_0 */
|
||||
+ 0x00000040, 0xb00f0000, 0xa0e40000, /* texcrd t0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_sincos_2_0[] = {
|
||||
+ 0xffff0200, /* ps_2_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, 0xa0e40001, 0xa0e40002, /* sincos t0, c0, c1, c2 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_sincos_3_0[] = {
|
||||
+ 0xffff0300, /* ps_3_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, /* sincos t0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD vs_sincos_2_0[] = {
|
||||
+ 0xfffe0200, /* vs_2_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, 0xa0e40001, 0xa0e40002, /* sincos a0, c0, c1, c2 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD vs_sincos_3_0[] = {
|
||||
+ 0xfffe0300, /* vs_3_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, /* sincos a0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
static void test_disassemble_shader(void)
|
||||
{
|
||||
static const char disasm_vs[] = " vs_1_1\n"
|
||||
@@ -6637,6 +6691,33 @@ static void test_disassemble_shader(void)
|
||||
" dp3 r0, c1, c0\n"
|
||||
" mul r0, v0, r0\n"
|
||||
" mul r0, t0, r0\n";
|
||||
+ static const char disasm_ps_tex[] = " ps_1_3\n"
|
||||
+ " tex t0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texld_1_4[] = " ps_1_4\n"
|
||||
+ " texld t0, c0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texld_2_0[] = " ps_2_0\n"
|
||||
+ " texld t0, c0, c1\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texcoord[] = " ps_1_3\n"
|
||||
+ " texcoord t0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texcrd[] = " ps_1_4\n"
|
||||
+ " texcrd t0, c0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_sincos_2_0[] = " ps_2_0\n"
|
||||
+ " sincos t0, c0, c1, c2\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_sincos_3_0[] = " ps_3_0\n"
|
||||
+ " sincos t0, c0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_vs_sincos_2_0[] = " vs_2_0\n"
|
||||
+ " sincos a0, c0, c1, c2\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_vs_sincos_3_0[] = " vs_3_0\n"
|
||||
+ " sincos a0, c0\n"
|
||||
+ " nop\n";
|
||||
ID3DXBuffer *disassembly;
|
||||
HRESULT ret;
|
||||
char *ptr;
|
||||
@@ -6666,6 +6747,88 @@ static void test_disassemble_shader(void)
|
||||
ok(!memcmp(ptr, disasm_ps, sizeof(disasm_ps) - 1), /* compare beginning */
|
||||
"Returned '%s', expected '%s'\n", ptr, disasm_ps);
|
||||
ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test tex instruction with pixel shader 1.3 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_tex, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_tex, sizeof(disasm_ps_tex) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_tex);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texld instruction with pixel shader 1.4 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texld_1_4, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texld_1_4, sizeof(disasm_ps_texld_1_4) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texld_1_4);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texld instruction with pixel shader 2.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texld_2_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texld_2_0, sizeof(disasm_ps_texld_2_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texld_2_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texcoord instruction with pixel shader 1.3 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texcoord, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texcoord, sizeof(disasm_ps_texcoord) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texcoord);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texcrd instruction with pixel shader 1.4 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texcrd, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texcrd, sizeof(disasm_ps_texcrd) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texcrd);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction pixel shader 2.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_sincos_2_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_sincos_2_0, sizeof(disasm_ps_sincos_2_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_sincos_2_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction with pixel shader 3.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_sincos_3_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_sincos_3_0, sizeof(disasm_ps_sincos_3_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_sincos_3_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction with pixel shader 2.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(vs_sincos_2_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_vs_sincos_2_0, sizeof(disasm_vs_sincos_2_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_vs_sincos_2_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction with pixel shader 3.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(vs_sincos_3_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_vs_sincos_3_0, sizeof(disasm_vs_sincos_3_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_vs_sincos_3_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
}
|
||||
|
||||
START_TEST(shader)
|
||||
--
|
||||
2.23.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [46649] Multiple applications need D3DXDisassembleShader() implementation (Tom Clancy's Rainbow Six: Vegas 2, The Void)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user