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
61 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
20d1f21514 | ||
|
7ad2ee4c60 | ||
|
d00088e0fa | ||
|
633cceca94 | ||
|
46006c692a | ||
|
d56994dbfa | ||
|
5e70613512 | ||
|
6a14f80fdc | ||
|
5d38a0fed0 | ||
|
8748402001 | ||
|
171d05fffe | ||
|
975205155e | ||
|
d6c145fbf5 | ||
|
3207980517 | ||
|
1bbe50aae8 | ||
|
bb180d38cc | ||
|
c542f2432d | ||
|
a36a97233a | ||
|
f8e955a95a | ||
|
d966bece72 | ||
|
1447b56eeb | ||
|
afe018692b | ||
|
52b5c90303 | ||
|
4a4ebec642 | ||
|
35ea3890a7 | ||
|
26438ad74c | ||
|
31212d2845 | ||
|
a08b6b2b62 | ||
|
9985fe9035 | ||
|
3aa965e97f | ||
|
2e479e0954 | ||
|
9fe12a2175 | ||
|
d7c0a975ea | ||
|
eb4a245bbb | ||
|
5282f297be | ||
|
1446da2c50 | ||
|
2db34eca39 | ||
|
d80c4a83fd | ||
|
0c62a31ae7 | ||
|
6acc999e64 | ||
|
e0ec571af4 | ||
|
2c4db4ada1 | ||
|
46bcbf913f | ||
|
1d7d9cf626 | ||
|
4e8721c714 | ||
|
affad837a0 | ||
|
c00520d3f8 | ||
|
bf3ff21ed7 | ||
|
18b192b7bd | ||
|
d3c3d2ab96 | ||
|
229bb38973 | ||
|
af6b4ace35 | ||
|
e3e7950f4f | ||
|
b6c2991af1 | ||
|
447795d20e | ||
|
8fd38e80cd | ||
|
7492968519 | ||
|
c0304d7976 | ||
|
075da187c7 | ||
|
89777bdb23 | ||
|
bd070a400c |
@@ -1,287 +0,0 @@
|
||||
From 472184e5801de5d1fb92d275d9c0c7e840c9a0bf Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 11 Nov 2014 03:11:33 +0100
|
||||
Subject: ntdll: Implement emulation of SIDT instruction when using Exagear.
|
||||
|
||||
---
|
||||
configure.ac | 8 ++
|
||||
dlls/ntdll/signal_i386.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 231 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1e6bba3..43bf0db 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -32,6 +32,7 @@ AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 supp
|
||||
AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
|
||||
AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests]))
|
||||
AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules]))
|
||||
+AC_ARG_ENABLE(exagear-compat, AS_HELP_STRING([--enable-exagear-compat],[use workarounds for known problems in the Exagear emulator]))
|
||||
|
||||
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi])
|
||||
@@ -364,6 +365,13 @@ WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
|
||||
[gettext tools not found (or too old), translations won't be built.],
|
||||
[enable_po])
|
||||
|
||||
+dnl **** Enable Exagear workarounds ****
|
||||
+
|
||||
+if test "x$enable_exagear_compat" = "xyes"
|
||||
+then
|
||||
+ AC_DEFINE(EXAGEAR_COMPAT, 1, [Define if you want to enable Exagear emulator workarounds])
|
||||
+fi
|
||||
+
|
||||
dnl **** Check for some libraries ****
|
||||
|
||||
dnl Check for -li386 for NetBSD and OpenBSD
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index ee8855a..4269329 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -96,6 +96,14 @@ typedef struct
|
||||
BYTE Reserved4[96];
|
||||
} XMM_SAVE_AREA32;
|
||||
|
||||
+#include "pshpack1.h"
|
||||
+struct idtr
|
||||
+{
|
||||
+ WORD limit;
|
||||
+ BYTE *base;
|
||||
+};
|
||||
+#include "poppack.h"
|
||||
+
|
||||
/***********************************************************************
|
||||
* signal context platform-specific definitions
|
||||
*/
|
||||
@@ -1898,6 +1906,213 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
|
||||
}
|
||||
|
||||
|
||||
+#ifdef EXAGEAR_COMPAT
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * INSTR_GetOperandAddr
|
||||
+ *
|
||||
+ * Return the address of an instruction operand (from the mod/rm byte).
|
||||
+ */
|
||||
+static BYTE *INSTR_GetOperandAddr( CONTEXT *context, const BYTE *instr,
|
||||
+ int long_addr, int segprefix, int *len )
|
||||
+{
|
||||
+ int mod, rm, base = 0, index = 0, ss = 0, off;
|
||||
+
|
||||
+#define GET_VAL(val,type) \
|
||||
+ { *val = *(type *)instr; instr += sizeof(type); *len += sizeof(type); }
|
||||
+
|
||||
+ *len = 0;
|
||||
+ GET_VAL( &mod, BYTE );
|
||||
+ rm = mod & 7;
|
||||
+ mod >>= 6;
|
||||
+
|
||||
+ if (mod == 3)
|
||||
+ {
|
||||
+ switch(rm)
|
||||
+ {
|
||||
+ case 0: return (BYTE *)&context->Eax;
|
||||
+ case 1: return (BYTE *)&context->Ecx;
|
||||
+ case 2: return (BYTE *)&context->Edx;
|
||||
+ case 3: return (BYTE *)&context->Ebx;
|
||||
+ case 4: return (BYTE *)&context->Esp;
|
||||
+ case 5: return (BYTE *)&context->Ebp;
|
||||
+ case 6: return (BYTE *)&context->Esi;
|
||||
+ case 7: return (BYTE *)&context->Edi;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (long_addr)
|
||||
+ {
|
||||
+ if (rm == 4)
|
||||
+ {
|
||||
+ BYTE sib;
|
||||
+ GET_VAL( &sib, BYTE );
|
||||
+ rm = sib & 7;
|
||||
+ ss = sib >> 6;
|
||||
+ switch((sib >> 3) & 7)
|
||||
+ {
|
||||
+ case 0: index = context->Eax; break;
|
||||
+ case 1: index = context->Ecx; break;
|
||||
+ case 2: index = context->Edx; break;
|
||||
+ case 3: index = context->Ebx; break;
|
||||
+ case 4: index = 0; break;
|
||||
+ case 5: index = context->Ebp; break;
|
||||
+ case 6: index = context->Esi; break;
|
||||
+ case 7: index = context->Edi; break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ switch(rm)
|
||||
+ {
|
||||
+ case 0: base = context->Eax; break;
|
||||
+ case 1: base = context->Ecx; break;
|
||||
+ case 2: base = context->Edx; break;
|
||||
+ case 3: base = context->Ebx; break;
|
||||
+ case 4: base = context->Esp; break;
|
||||
+ case 5: base = context->Ebp; break;
|
||||
+ case 6: base = context->Esi; break;
|
||||
+ case 7: base = context->Edi; break;
|
||||
+ }
|
||||
+ switch (mod)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ if (rm == 5) /* special case: ds:(disp32) */
|
||||
+ {
|
||||
+ GET_VAL( &base, DWORD );
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case 1: /* 8-bit disp */
|
||||
+ GET_VAL( &off, BYTE );
|
||||
+ base += (signed char)off;
|
||||
+ break;
|
||||
+
|
||||
+ case 2: /* 32-bit disp */
|
||||
+ GET_VAL( &off, DWORD );
|
||||
+ base += (signed long)off;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ else /* short address */
|
||||
+ {
|
||||
+ switch(rm)
|
||||
+ {
|
||||
+ case 0: /* ds:(bx,si) */
|
||||
+ base = LOWORD(context->Ebx) + LOWORD(context->Esi);
|
||||
+ break;
|
||||
+ case 1: /* ds:(bx,di) */
|
||||
+ base = LOWORD(context->Ebx) + LOWORD(context->Edi);
|
||||
+ break;
|
||||
+ case 2: /* ss:(bp,si) */
|
||||
+ base = LOWORD(context->Ebp) + LOWORD(context->Esi);
|
||||
+ break;
|
||||
+ case 3: /* ss:(bp,di) */
|
||||
+ base = LOWORD(context->Ebp) + LOWORD(context->Edi);
|
||||
+ break;
|
||||
+ case 4: /* ds:(si) */
|
||||
+ base = LOWORD(context->Esi);
|
||||
+ break;
|
||||
+ case 5: /* ds:(di) */
|
||||
+ base = LOWORD(context->Edi);
|
||||
+ break;
|
||||
+ case 6: /* ss:(bp) */
|
||||
+ base = LOWORD(context->Ebp);
|
||||
+ break;
|
||||
+ case 7: /* ds:(bx) */
|
||||
+ base = LOWORD(context->Ebx);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ switch(mod)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ if (rm == 6) /* special case: ds:(disp16) */
|
||||
+ {
|
||||
+ GET_VAL( &base, WORD );
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case 1: /* 8-bit disp */
|
||||
+ GET_VAL( &off, BYTE );
|
||||
+ base += (signed char)off;
|
||||
+ break;
|
||||
+
|
||||
+ case 2: /* 16-bit disp */
|
||||
+ GET_VAL( &off, WORD );
|
||||
+ base += (signed short)off;
|
||||
+ break;
|
||||
+ }
|
||||
+ base &= 0xffff;
|
||||
+ }
|
||||
+ /* FIXME: we assume that all segments have a base of 0 */
|
||||
+ return (BYTE *)(base + (index << ss));
|
||||
+#undef GET_VAL
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * check_invalid_instr
|
||||
+ *
|
||||
+ * Support for instructions not implemented by Exagear.
|
||||
+ */
|
||||
+static inline BOOL check_invalid_instr( CONTEXT *context )
|
||||
+{
|
||||
+ const BYTE *instr;
|
||||
+ unsigned int prefix_count = 0;
|
||||
+ int len, long_addr = 1;
|
||||
+
|
||||
+ if (!wine_ldt_is_system( context->SegCs )) return FALSE;
|
||||
+ instr = (BYTE *)context->Eip;
|
||||
+
|
||||
+ for (;;) switch (*instr)
|
||||
+ {
|
||||
+ /* instruction prefixes */
|
||||
+ case 0x2e: /* %cs: */
|
||||
+ case 0x36: /* %ss: */
|
||||
+ case 0x3e: /* %ds: */
|
||||
+ case 0x26: /* %es: */
|
||||
+ case 0x64: /* %fs: */
|
||||
+ case 0x65: /* %gs: */
|
||||
+ case 0x66: /* opcode size */
|
||||
+ case 0x67: /* addr size */
|
||||
+ case 0xf0: /* lock */
|
||||
+ case 0xf2: /* repne */
|
||||
+ case 0xf3: /* repe */
|
||||
+ if (++prefix_count >= 15) return FALSE;
|
||||
+ if (*instr == 0x67) long_addr = !long_addr; /* addr size */
|
||||
+ instr++;
|
||||
+ continue;
|
||||
+ case 0x0f: /* extended instruction */
|
||||
+ switch (instr[1])
|
||||
+ {
|
||||
+ case 0x01:
|
||||
+ if (((instr[2] >> 3) & 7) == 1) /* sidt m */
|
||||
+ {
|
||||
+ struct idtr ret;
|
||||
+ BYTE *addr;
|
||||
+
|
||||
+ if ((instr[2] >> 6) == 3) return FALSE; /* loading to register not allowed */
|
||||
+ addr = INSTR_GetOperandAddr( context, instr + 2, long_addr, 0, &len );
|
||||
+
|
||||
+ /* fake IDT structure */
|
||||
+ ret.limit = 0xfff;
|
||||
+ ret.base = (void *)0xff000000;
|
||||
+ memcpy(addr, &ret, sizeof(ret));
|
||||
+
|
||||
+ context->Eip += prefix_count + len + 2;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+ default:
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#endif /* EXAGEAR_COMPAT */
|
||||
+
|
||||
+
|
||||
/**********************************************************************
|
||||
* raise_segv_exception
|
||||
*/
|
||||
@@ -1907,6 +2122,14 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
|
||||
|
||||
switch(rec->ExceptionCode)
|
||||
{
|
||||
+#ifdef EXAGEAR_COMPAT
|
||||
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
|
||||
+ {
|
||||
+ if (check_invalid_instr( context ))
|
||||
+ goto done;
|
||||
+ }
|
||||
+ break;
|
||||
+#endif
|
||||
case EXCEPTION_ACCESS_VIOLATION:
|
||||
if (rec->NumberParameters == 2)
|
||||
{
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1,51 +0,0 @@
|
||||
From 5a4827d5c16aefd82029583710b9032a2356917b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 22 Nov 2014 05:49:30 +0100
|
||||
Subject: ntdll: Fix issues with write watches when using Exagear.
|
||||
|
||||
---
|
||||
dlls/ntdll/virtual.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index f7aae0b..3fa2027 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -1558,6 +1558,26 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack )
|
||||
{
|
||||
void *page = ROUND_ADDR( addr, page_mask );
|
||||
BYTE *vprot = &view->prot[((const char *)page - (const char *)view->base) >> page_shift];
|
||||
+#ifdef EXAGEAR_COMPAT
|
||||
+ /* Exagear doesn't correctly set err, so always check for write watches, and
|
||||
+ * retry after removing the VPROT_WRITEWATCH or VPROT_WRITECOPY flag. In
|
||||
+ * contrary to the general implementation below this is not completely race-
|
||||
+ * condition safe. When multiple threads trigger the write watch at the same
|
||||
+ * time only the first thread will properly continue the execution, the rest
|
||||
+ * will crash. */
|
||||
+ if ((view->protect & VPROT_WRITEWATCH) && (*vprot & VPROT_WRITEWATCH))
|
||||
+ {
|
||||
+ *vprot &= ~VPROT_WRITEWATCH;
|
||||
+ VIRTUAL_SetProt( view, page, page_size, *vprot );
|
||||
+ if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
|
||||
+ }
|
||||
+ if (*vprot & VPROT_WRITECOPY)
|
||||
+ {
|
||||
+ *vprot = (*vprot & ~VPROT_WRITECOPY) | VPROT_WRITE;
|
||||
+ VIRTUAL_SetProt( view, page, page_size, *vprot );
|
||||
+ if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
|
||||
+ }
|
||||
+#else
|
||||
if (err & EXCEPTION_WRITE_FAULT)
|
||||
{
|
||||
if ((view->protect & VPROT_WRITEWATCH) && (*vprot & VPROT_WRITEWATCH))
|
||||
@@ -1573,6 +1593,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack )
|
||||
/* ignore fault if page is writable now */
|
||||
if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
|
||||
}
|
||||
+#endif
|
||||
if (!on_signal_stack && (*vprot & VPROT_GUARD))
|
||||
{
|
||||
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
|
||||
--
|
||||
2.2.2
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From 67cc0e23b26d5d9abda7eb771dc2bec309cb8650 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 23 Nov 2014 22:33:51 +0100
|
||||
Subject: server: Don't attempt to use ptrace when running with Exagear.
|
||||
|
||||
---
|
||||
server/ptrace.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/ptrace.c b/server/ptrace.c
|
||||
index cb436b6..fb29b5a 100644
|
||||
--- a/server/ptrace.c
|
||||
+++ b/server/ptrace.c
|
||||
@@ -531,7 +531,7 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base,
|
||||
|
||||
|
||||
#if defined(linux) && (defined(HAVE_SYS_USER_H) || defined(HAVE_ASM_USER_H)) \
|
||||
- && (defined(__i386__) || defined(__x86_64__))
|
||||
+ && (defined(__i386__) || defined(__x86_64__)) && !defined(EXAGEAR_COMPAT)
|
||||
|
||||
#ifdef HAVE_SYS_USER_H
|
||||
#include <sys/user.h>
|
||||
--
|
||||
2.1.3
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Depends: ntdll-WRITECOPY
|
||||
Disabled: true
|
@@ -0,0 +1,268 @@
|
||||
From 994fe46f1b68d851d285a29cce904bd9f22540ea Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Wesie <awesie@gmail.com>
|
||||
Date: Tue, 2 May 2017 00:59:49 -0500
|
||||
Subject: advapi32: Implement BuildSecurityDescriptorW.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 218 +++++++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 164 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 24ec3099713..82bb6689d43 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -58,6 +58,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
|
||||
SECURITY_DESCRIPTOR_RELATIVE* SecurityDescriptor,
|
||||
LPDWORD cBytes);
|
||||
static DWORD ParseAclStringFlags(LPCWSTR* StringAcl);
|
||||
+static DWORD trustee_to_sid(DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee);
|
||||
|
||||
typedef struct _ACEFLAG
|
||||
{
|
||||
@@ -1264,16 +1265,122 @@ DWORD WINAPI BuildSecurityDescriptorW(
|
||||
IN ULONG cCountOfAccessEntries,
|
||||
IN PEXPLICIT_ACCESSW pListOfAccessEntries,
|
||||
IN ULONG cCountOfAuditEntries,
|
||||
- IN PEXPLICIT_ACCESSW pListofAuditEntries,
|
||||
+ IN PEXPLICIT_ACCESSW pListOfAuditEntries,
|
||||
IN PSECURITY_DESCRIPTOR pOldSD,
|
||||
IN OUT PULONG lpdwBufferLength,
|
||||
OUT PSECURITY_DESCRIPTOR* pNewSD)
|
||||
{
|
||||
- FIXME("(%p,%p,%d,%p,%d,%p,%p,%p,%p) stub!\n",pOwner,pGroup,
|
||||
- cCountOfAccessEntries,pListOfAccessEntries,cCountOfAuditEntries,
|
||||
- pListofAuditEntries,pOldSD,lpdwBufferLength,pNewSD);
|
||||
+ SECURITY_DESCRIPTOR desc;
|
||||
+ NTSTATUS status;
|
||||
+ DWORD ret = ERROR_SUCCESS;
|
||||
+
|
||||
+ TRACE("(%p,%p,%d,%p,%d,%p,%p,%p,%p)\n", pOwner, pGroup,
|
||||
+ cCountOfAccessEntries, pListOfAccessEntries, cCountOfAuditEntries,
|
||||
+ pListOfAuditEntries, pOldSD, lpdwBufferLength, pNewSD);
|
||||
|
||||
- return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
+ if (pOldSD)
|
||||
+ {
|
||||
+ SECURITY_DESCRIPTOR_CONTROL control;
|
||||
+ DWORD desc_size, dacl_size = 0, sacl_size = 0, owner_size = 0, group_size = 0;
|
||||
+ PACL dacl = NULL, sacl = NULL;
|
||||
+ PSID owner = NULL, group = NULL;
|
||||
+ DWORD revision;
|
||||
+
|
||||
+ if ((status = RtlGetControlSecurityDescriptor( pOldSD, &control, &revision )) != STATUS_SUCCESS)
|
||||
+ return RtlNtStatusToDosError( status );
|
||||
+ if (!(control & SE_SELF_RELATIVE))
|
||||
+ return ERROR_INVALID_SECURITY_DESCR;
|
||||
+
|
||||
+ desc_size = sizeof(desc);
|
||||
+ status = RtlSelfRelativeToAbsoluteSD( pOldSD, &desc, &desc_size, dacl, &dacl_size, sacl, &sacl_size,
|
||||
+ owner, &owner_size, group, &group_size );
|
||||
+ if (status == STATUS_BUFFER_TOO_SMALL)
|
||||
+ {
|
||||
+ if (dacl_size)
|
||||
+ dacl = LocalAlloc( LMEM_FIXED, dacl_size );
|
||||
+ if (sacl_size)
|
||||
+ sacl = LocalAlloc( LMEM_FIXED, sacl_size );
|
||||
+ if (owner_size)
|
||||
+ owner = LocalAlloc( LMEM_FIXED, owner_size );
|
||||
+ if (group_size)
|
||||
+ group = LocalAlloc( LMEM_FIXED, group_size );
|
||||
+
|
||||
+ desc_size = sizeof(desc);
|
||||
+ status = RtlSelfRelativeToAbsoluteSD( pOldSD, &desc, &desc_size, dacl, &dacl_size, sacl, &sacl_size,
|
||||
+ owner, &owner_size, group, &group_size );
|
||||
+ }
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ {
|
||||
+ LocalFree( dacl );
|
||||
+ LocalFree( sacl );
|
||||
+ LocalFree( owner );
|
||||
+ LocalFree( group );
|
||||
+ return RtlNtStatusToDosError( status );
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if ((status = RtlCreateSecurityDescriptor( &desc, SECURITY_DESCRIPTOR_REVISION )) != STATUS_SUCCESS)
|
||||
+ return RtlNtStatusToDosError( status );
|
||||
+ }
|
||||
+
|
||||
+ if (pOwner)
|
||||
+ {
|
||||
+ LocalFree( desc.Owner );
|
||||
+ desc.Owner = LocalAlloc( LMEM_FIXED, sizeof(MAX_SID) );
|
||||
+ if ((ret = trustee_to_sid( sizeof(MAX_SID), desc.Owner, pOwner )))
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ if (pGroup)
|
||||
+ {
|
||||
+ LocalFree( desc.Group );
|
||||
+ desc.Group = LocalAlloc( LMEM_FIXED, sizeof(MAX_SID) );
|
||||
+ if ((ret = trustee_to_sid( sizeof(MAX_SID), desc.Group, pGroup )))
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ if (pListOfAccessEntries)
|
||||
+ {
|
||||
+ PACL new_dacl;
|
||||
+
|
||||
+ if ((ret = SetEntriesInAclW( cCountOfAccessEntries, pListOfAccessEntries, desc.Dacl, &new_dacl )))
|
||||
+ goto done;
|
||||
+
|
||||
+ LocalFree( desc.Dacl );
|
||||
+ desc.Dacl = new_dacl;
|
||||
+ desc.Control |= SE_DACL_PRESENT;
|
||||
+ }
|
||||
+
|
||||
+ if (pListOfAuditEntries)
|
||||
+ {
|
||||
+ PACL new_sacl;
|
||||
+
|
||||
+ if ((ret = SetEntriesInAclW( cCountOfAuditEntries, pListOfAuditEntries, desc.Sacl, &new_sacl )))
|
||||
+ goto done;
|
||||
+
|
||||
+ LocalFree( desc.Sacl );
|
||||
+ desc.Sacl = new_sacl;
|
||||
+ desc.Control |= SE_SACL_PRESENT;
|
||||
+ }
|
||||
+
|
||||
+ *lpdwBufferLength = RtlLengthSecurityDescriptor( &desc );
|
||||
+ *pNewSD = LocalAlloc( LMEM_FIXED, *lpdwBufferLength );
|
||||
+
|
||||
+ if ((status = RtlMakeSelfRelativeSD( &desc, *pNewSD, lpdwBufferLength )) != STATUS_SUCCESS)
|
||||
+ {
|
||||
+ ret = RtlNtStatusToDosError( status );
|
||||
+ LocalFree( *pNewSD );
|
||||
+ *pNewSD = NULL;
|
||||
+ }
|
||||
+
|
||||
+done:
|
||||
+ /* free absolute descriptor */
|
||||
+ LocalFree( desc.Owner );
|
||||
+ LocalFree( desc.Group );
|
||||
+ LocalFree( desc.Sacl );
|
||||
+ LocalFree( desc.Dacl );
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -3766,6 +3873,56 @@ static void free_trustee_name(TRUSTEE_FORM form, WCHAR *trustee_nameW)
|
||||
}
|
||||
}
|
||||
|
||||
+static DWORD trustee_to_sid( DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee )
|
||||
+{
|
||||
+ if (pTrustee->MultipleTrusteeOperation == TRUSTEE_IS_IMPERSONATE)
|
||||
+ {
|
||||
+ WARN("bad multiple trustee operation %d\n", pTrustee->MultipleTrusteeOperation);
|
||||
+ return ERROR_INVALID_PARAMETER;
|
||||
+ }
|
||||
+
|
||||
+ switch (pTrustee->TrusteeForm)
|
||||
+ {
|
||||
+ case TRUSTEE_IS_SID:
|
||||
+ if (!CopySid(nDestinationSidLength, pDestinationSid, pTrustee->ptstrName))
|
||||
+ {
|
||||
+ WARN("bad sid %p\n", pTrustee->ptstrName);
|
||||
+ return ERROR_INVALID_PARAMETER;
|
||||
+ }
|
||||
+ break;
|
||||
+ case TRUSTEE_IS_NAME:
|
||||
+ {
|
||||
+ DWORD sid_size = nDestinationSidLength;
|
||||
+ DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
+ SID_NAME_USE use;
|
||||
+ if (!strcmpW( pTrustee->ptstrName, CURRENT_USER ))
|
||||
+ {
|
||||
+ if (!lookup_user_account_name( pDestinationSid, &sid_size, NULL, &domain_size, &use ))
|
||||
+ {
|
||||
+ return GetLastError();
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!LookupAccountNameW(NULL, pTrustee->ptstrName, pDestinationSid, &sid_size, NULL, &domain_size, &use))
|
||||
+ {
|
||||
+ WARN("bad user name %s\n", debugstr_w(pTrustee->ptstrName));
|
||||
+ return ERROR_INVALID_PARAMETER;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case TRUSTEE_IS_OBJECTS_AND_SID:
|
||||
+ FIXME("TRUSTEE_IS_OBJECTS_AND_SID unimplemented\n");
|
||||
+ break;
|
||||
+ case TRUSTEE_IS_OBJECTS_AND_NAME:
|
||||
+ FIXME("TRUSTEE_IS_OBJECTS_AND_NAME unimplemented\n");
|
||||
+ break;
|
||||
+ default:
|
||||
+ WARN("bad trustee form %d\n", pTrustee->TrusteeForm);
|
||||
+ return ERROR_INVALID_PARAMETER;
|
||||
+ }
|
||||
+
|
||||
+ return ERROR_SUCCESS;
|
||||
+}
|
||||
+
|
||||
/******************************************************************************
|
||||
* SetEntriesInAclA [ADVAPI32.@]
|
||||
*/
|
||||
@@ -3861,56 +4018,9 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
|
||||
pEntries[i].Trustee.TrusteeForm, pEntries[i].Trustee.TrusteeType,
|
||||
pEntries[i].Trustee.ptstrName);
|
||||
|
||||
- if (pEntries[i].Trustee.MultipleTrusteeOperation == TRUSTEE_IS_IMPERSONATE)
|
||||
- {
|
||||
- WARN("bad multiple trustee operation %d for trustee %d\n", pEntries[i].Trustee.MultipleTrusteeOperation, i);
|
||||
- ret = ERROR_INVALID_PARAMETER;
|
||||
- goto exit;
|
||||
- }
|
||||
-
|
||||
- switch (pEntries[i].Trustee.TrusteeForm)
|
||||
- {
|
||||
- case TRUSTEE_IS_SID:
|
||||
- if (!CopySid(FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]),
|
||||
- ppsid[i], pEntries[i].Trustee.ptstrName))
|
||||
- {
|
||||
- WARN("bad sid %p for trustee %d\n", pEntries[i].Trustee.ptstrName, i);
|
||||
- ret = ERROR_INVALID_PARAMETER;
|
||||
- goto exit;
|
||||
- }
|
||||
- break;
|
||||
- case TRUSTEE_IS_NAME:
|
||||
- {
|
||||
- DWORD sid_size = FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]);
|
||||
- DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
- SID_NAME_USE use;
|
||||
- if (!strcmpW( pEntries[i].Trustee.ptstrName, CURRENT_USER ))
|
||||
- {
|
||||
- if (!lookup_user_account_name( ppsid[i], &sid_size, NULL, &domain_size, &use ))
|
||||
- {
|
||||
- ret = GetLastError();
|
||||
- goto exit;
|
||||
- }
|
||||
- }
|
||||
- else if (!LookupAccountNameW(NULL, pEntries[i].Trustee.ptstrName, ppsid[i], &sid_size, NULL, &domain_size, &use))
|
||||
- {
|
||||
- WARN("bad user name %s for trustee %d\n", debugstr_w(pEntries[i].Trustee.ptstrName), i);
|
||||
- ret = ERROR_INVALID_PARAMETER;
|
||||
- goto exit;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- case TRUSTEE_IS_OBJECTS_AND_SID:
|
||||
- FIXME("TRUSTEE_IS_OBJECTS_AND_SID unimplemented\n");
|
||||
- break;
|
||||
- case TRUSTEE_IS_OBJECTS_AND_NAME:
|
||||
- FIXME("TRUSTEE_IS_OBJECTS_AND_NAME unimplemented\n");
|
||||
- break;
|
||||
- default:
|
||||
- WARN("bad trustee form %d for trustee %d\n", pEntries[i].Trustee.TrusteeForm, i);
|
||||
- ret = ERROR_INVALID_PARAMETER;
|
||||
+ ret = trustee_to_sid( FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]), ppsid[i], &pEntries[i].Trustee);
|
||||
+ if (ret)
|
||||
goto exit;
|
||||
- }
|
||||
|
||||
/* Note: we overestimate the ACL size here as a tradeoff between
|
||||
* instructions (simplicity) and memory */
|
||||
--
|
||||
2.12.2
|
||||
|
@@ -0,0 +1,69 @@
|
||||
From 63082c3863d8be466ed14f532653ddf35e40328a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 5 May 2017 00:18:50 +0200
|
||||
Subject: advapi32/tests: Add basic tests for BuildSecurityDescriptor.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index d6ea3a19fad..c591f7b6e5f 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7489,6 +7489,44 @@ static void test_child_token_sd(void)
|
||||
HeapFree(GetProcessHeap(), 0, sd);
|
||||
}
|
||||
|
||||
+static void test_BuildSecurityDescriptorW(void)
|
||||
+{
|
||||
+ SECURITY_DESCRIPTOR old_sd, *new_sd, *rel_sd;
|
||||
+ ULONG new_sd_size;
|
||||
+ DWORD buf_size;
|
||||
+ char buf[1024];
|
||||
+ BOOL success;
|
||||
+ DWORD ret;
|
||||
+
|
||||
+ InitializeSecurityDescriptor(&old_sd, SECURITY_DESCRIPTOR_REVISION);
|
||||
+
|
||||
+ buf_size = sizeof(buf);
|
||||
+ rel_sd = (SECURITY_DESCRIPTOR *)buf;
|
||||
+ success = MakeSelfRelativeSD(&old_sd, rel_sd, &buf_size);
|
||||
+ ok(success, "MakeSelfRelativeSD failed with %u\n", GetLastError());
|
||||
+
|
||||
+ new_sd = NULL;
|
||||
+ new_sd_size = 0;
|
||||
+ ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, NULL, &new_sd_size, (void **)&new_sd);
|
||||
+ ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret);
|
||||
+ ok(new_sd != NULL, "expected new_sd != NULL\n");
|
||||
+ ok(new_sd_size == sizeof(old_sd), "expected new_sd_size == sizeof(old_sd), got %u\n", new_sd_size);
|
||||
+ LocalFree(new_sd);
|
||||
+
|
||||
+ new_sd = (void *)0xdeadbeef;
|
||||
+ ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, &old_sd, &new_sd_size, (void **)&new_sd);
|
||||
+ ok(ret == ERROR_INVALID_SECURITY_DESCR, "expected ERROR_INVALID_SECURITY_DESCR, got %u\n", ret);
|
||||
+ ok(new_sd == (void *)0xdeadbeef, "expected new_sd == 0xdeadbeef, got %p\n", new_sd);
|
||||
+
|
||||
+ new_sd = NULL;
|
||||
+ new_sd_size = 0;
|
||||
+ ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, rel_sd, &new_sd_size, (void **)&new_sd);
|
||||
+ ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret);
|
||||
+ ok(new_sd != NULL, "expected new_sd != NULL\n");
|
||||
+ ok(new_sd_size == sizeof(old_sd), "expected new_sd_size == sizeof(old_sd), got %u\n", new_sd_size);
|
||||
+ LocalFree(new_sd);
|
||||
+}
|
||||
+
|
||||
START_TEST(security)
|
||||
{
|
||||
init();
|
||||
@@ -7542,6 +7580,7 @@ START_TEST(security)
|
||||
test_pseudo_tokens();
|
||||
test_maximum_allowed();
|
||||
test_GetExplicitEntriesFromAclW();
|
||||
+ test_BuildSecurityDescriptorW();
|
||||
|
||||
/* must be the last test, modifies process token */
|
||||
test_token_security_descriptor();
|
||||
--
|
||||
2.12.2
|
||||
|
2
patches/advapi32-BuildSecurityDescriptor/definition
Normal file
2
patches/advapi32-BuildSecurityDescriptor/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: Initial implementation of advapi32.BuildSecurityDescriptorW
|
||||
Depends: server-LABEL_SECURITY_INFORMATION
|
@@ -1,4 +1,4 @@
|
||||
From 08231829bbfa686e537a0c94f3aa4ede92a7817b Mon Sep 17 00:00:00 2001
|
||||
From 23e58d6cb2f258da259a1efce72fd2e1d58a530b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 17 Jan 2016 17:12:45 +0100
|
||||
Subject: ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub for
|
||||
@@ -15,20 +15,20 @@ Subject: ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub for
|
||||
create mode 100644 dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bdd390c..6264ede 100644
|
||||
index 1d1846dbb7..e9cf69d3fe 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3020,6 +3020,7 @@ WINE_CONFIG_DLL(esent)
|
||||
@@ -3045,6 +3045,7 @@ WINE_CONFIG_DLL(esent)
|
||||
WINE_CONFIG_DLL(evr)
|
||||
WINE_CONFIG_DLL(explorerframe,,[clean])
|
||||
WINE_CONFIG_TEST(dlls/explorerframe/tests)
|
||||
+WINE_CONFIG_DLL(ext-ms-win-appmodel-usercontext-l1-1-0)
|
||||
WINE_CONFIG_DLL(ext-ms-win-authz-context-l1-1-0)
|
||||
WINE_CONFIG_DLL(ext-ms-win-domainjoin-netjoin-l1-1-0)
|
||||
WINE_CONFIG_DLL(ext-ms-win-gdi-dc-create-l1-1-1)
|
||||
WINE_CONFIG_DLL(ext-ms-win-gdi-dc-l1-2-0)
|
||||
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000..16eee75
|
||||
index 0000000000..16eee7588f
|
||||
--- /dev/null
|
||||
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
@@ -38,7 +38,7 @@ index 0000000..16eee75
|
||||
+ main.c
|
||||
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec
|
||||
new file mode 100644
|
||||
index 0000000..7642d15
|
||||
index 0000000000..7642d156c9
|
||||
--- /dev/null
|
||||
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec
|
||||
@@ -0,0 +1,3 @@
|
||||
@@ -47,7 +47,7 @@ index 0000000..7642d15
|
||||
+@ stub UserContextExtSetToken
|
||||
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
|
||||
new file mode 100644
|
||||
index 0000000..7a9e75f
|
||||
index 0000000000..7a9e75f710
|
||||
--- /dev/null
|
||||
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
|
||||
@@ -0,0 +1,35 @@
|
||||
@@ -87,5 +87,5 @@ index 0000000..7a9e75f
|
||||
+ return S_OK;
|
||||
+}
|
||||
--
|
||||
2.9.0
|
||||
2.12.2
|
||||
|
||||
|
@@ -0,0 +1,63 @@
|
||||
From 9d4cfb266667d09430c5036ef127d30d5ac5ffbe Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Wesie <awesie@gmail.com>
|
||||
Date: Mon, 1 May 2017 22:57:43 -0500
|
||||
Subject: bcrypt: Fix BCryptEncrypt with AES_GCM and no input and no output.
|
||||
|
||||
Signed-off-by: Andrew Wesie <awesie@gmail.com>
|
||||
---
|
||||
dlls/bcrypt/bcrypt_main.c | 2 +-
|
||||
dlls/bcrypt/tests/bcrypt.c | 18 ++++++++++++++++++
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index c25f1d1e99..d269083eca 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1185,7 +1185,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
|
||||
|
||||
*ret_len = input_len;
|
||||
if (flags & BCRYPT_BLOCK_PADDING) return STATUS_INVALID_PARAMETER;
|
||||
- if (!output) return STATUS_SUCCESS;
|
||||
+ if (input && !output) return STATUS_SUCCESS;
|
||||
if (output_len < *ret_len) return STATUS_BUFFER_TOO_SMALL;
|
||||
|
||||
if (auth_info->pbAuthData && (status = key_set_auth_data( key, auth_info->pbAuthData, auth_info->cbAuthData )))
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 7f01529b3b..9f34a54978 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -913,6 +913,9 @@ static void test_BCryptEncrypt(void)
|
||||
{0x9a,0x92,0x32,0x2c,0x61,0x2a,0xae,0xef,0x66,0x2a,0xfb,0x55,0xe9,0x48,0xdf,0xbd};
|
||||
static UCHAR expected_tag3[] =
|
||||
{0x17,0x9d,0xc0,0x7a,0xf0,0xcf,0xaa,0xd5,0x1c,0x11,0xc4,0x4b,0xd6,0xa3,0x3e,0x77};
|
||||
+ static UCHAR expected_tag4[] =
|
||||
+ {0x4c,0x42,0x83,0x9e,0x8d,0x40,0xf1,0x19,0xd6,0x2b,0x1c,0x66,0x03,0x2b,0x39,0x63};
|
||||
+
|
||||
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO auth_info;
|
||||
UCHAR *buf, ciphertext[48], ivbuf[16], tag[16];
|
||||
BCRYPT_AUTH_TAG_LENGTHS_STRUCT tag_length;
|
||||
@@ -1104,6 +1107,21 @@ static void test_BCryptEncrypt(void)
|
||||
for (i = 0; i < 16; i++)
|
||||
ok(tag[i] == expected_tag3[i], "%u: %02x != %02x\n", i, tag[i], expected_tag3[i]);
|
||||
|
||||
+ memset(tag, 0xff, sizeof(tag));
|
||||
+ ret = pBCryptEncrypt(key, data2, 0, &auth_info, ivbuf, 16, NULL, 0, &size, 0);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+ ok(size == 0, "got %u\n", size);
|
||||
+ for (i = 0; i < 16; i++)
|
||||
+ ok(tag[i] == 0xff, "%u: %02x != %02x\n", i, tag[i], 0xff);
|
||||
+
|
||||
+ memset(tag, 0xff, sizeof(tag));
|
||||
+ ret = pBCryptEncrypt(key, NULL, 0, &auth_info, ivbuf, 16, NULL, 0, &size, 0);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+ ok(size == 0, "got %u\n", size);
|
||||
+ ok(!memcmp(tag, expected_tag4, sizeof(expected_tag4)), "wrong tag\n");
|
||||
+ for (i = 0; i < 16; i++)
|
||||
+ ok(tag[i] == expected_tag4[i], "%u: %02x != %02x\n", i, tag[i], expected_tag4[i]);
|
||||
+
|
||||
/* test with padding */
|
||||
memcpy(ivbuf, iv, sizeof(iv));
|
||||
memset(ciphertext, 0, sizeof(ciphertext));
|
||||
--
|
||||
2.12.2
|
||||
|
@@ -12,7 +12,7 @@ index ff74f8d..529c209 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -966,10 +966,10 @@ ${wine_binary}_LDFLAGS = $LDEXECFLAGS -lwine \$(PTHREAD_LIBS)
|
||||
[LDEXECFLAGS="-Wl,--export-dynamic"])
|
||||
[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
|
||||
|
||||
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
|
||||
- [LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
|
||||
|
@@ -1,61 +0,0 @@
|
||||
From 11e0603c3ec889f0b8b2f28f9a44d96a8183de31 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 16 Apr 2017 19:18:21 +0200
|
||||
Subject: configure: Support for recent OSMesa versions.
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
dlls/gdi32/dibdrv/opengl.c | 17 +++++++++--------
|
||||
2 files changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a5b0de0e3..f5b587c80a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1149,7 +1149,7 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
|
||||
|
||||
if test "x$with_osmesa" != "xno"
|
||||
then
|
||||
- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS -lm $X_EXTRA_LIBS])
|
||||
+ WINE_CHECK_SONAME(OSMesa,OSMesaGetProcAddress,,,[$X_LIBS -lm $X_EXTRA_LIBS])
|
||||
WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
|
||||
[libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
|
||||
fi
|
||||
diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c
|
||||
index 41331169c4..77d63201cf 100644
|
||||
--- a/dlls/gdi32/dibdrv/opengl.c
|
||||
+++ b/dlls/gdi32/dibdrv/opengl.c
|
||||
@@ -113,14 +113,6 @@ static BOOL init_opengl(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- for (i = 0; i < sizeof(opengl_func_names)/sizeof(opengl_func_names[0]); i++)
|
||||
- {
|
||||
- if (!(((void **)&opengl_funcs.gl)[i] = wine_dlsym( osmesa_handle, opengl_func_names[i], buffer, sizeof(buffer) )))
|
||||
- {
|
||||
- ERR( "%s not found in %s (%s), disabling.\n", opengl_func_names[i], SONAME_LIBOSMESA, buffer );
|
||||
- goto failed;
|
||||
- }
|
||||
- }
|
||||
#define LOAD_FUNCPTR(f) do if (!(p##f = wine_dlsym( osmesa_handle, #f, buffer, sizeof(buffer) ))) \
|
||||
{ \
|
||||
ERR( "%s not found in %s (%s), disabling.\n", #f, SONAME_LIBOSMESA, buffer ); \
|
||||
@@ -134,6 +126,15 @@ static BOOL init_opengl(void)
|
||||
LOAD_FUNCPTR(OSMesaPixelStore);
|
||||
#undef LOAD_FUNCPTR
|
||||
|
||||
+ for (i = 0; i < sizeof(opengl_func_names)/sizeof(opengl_func_names[0]); i++)
|
||||
+ {
|
||||
+ if (!(((void **)&opengl_funcs.gl)[i] = pOSMesaGetProcAddress( opengl_func_names[i] )))
|
||||
+ {
|
||||
+ ERR( "%s not found in %s, disabling.\n", opengl_func_names[i], SONAME_LIBOSMESA );
|
||||
+ goto failed;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return TRUE;
|
||||
|
||||
failed:
|
||||
--
|
||||
2.12.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: Support compilation with recent OSMesa versions
|
@@ -1,4 +1,4 @@
|
||||
From 6abf532ce00b767eb8c57593ffec8e69c46fd603 Mon Sep 17 00:00:00 2001
|
||||
From c7a3f1e20d97f61080df53a909c90707160ba45b Mon Sep 17 00:00:00 2001
|
||||
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
|
||||
Date: Sat, 24 Sep 2016 06:51:24 +0300
|
||||
Subject: d3d11: Add stub deferred rendering context.
|
||||
@@ -8,7 +8,7 @@ Subject: d3d11: Add stub deferred rendering context.
|
||||
1 file changed, 993 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 777146d717e..45467480905 100644
|
||||
index 259f189f8a..366f330bf0 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -25,6 +25,16 @@
|
||||
@@ -27,8 +27,8 @@ index 777146d717e..45467480905 100644
|
||||
+
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -2110,6 +2120,974 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -2417,6 +2427,974 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
}
|
||||
|
||||
@@ -1003,7 +1003,7 @@ index 777146d717e..45467480905 100644
|
||||
/* ID3D11Device methods */
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_QueryInterface(ID3D11Device *iface, REFIID riid, void **out)
|
||||
@@ -2735,9 +3713,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device *iface,
|
||||
@@ -3070,9 +4048,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device *iface, UINT flags,
|
||||
ID3D11DeviceContext **context)
|
||||
{
|
||||
@@ -1029,5 +1029,5 @@ index 777146d717e..45467480905 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device *iface, HANDLE resource, REFIID riid,
|
||||
--
|
||||
2.11.0
|
||||
2.12.2
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
From 498edc59046c38c028f6d9e2d91264ad08d93d57 Mon Sep 17 00:00:00 2001
|
||||
From 05ef8f7024651411d386a6e60e9353feba472cd9 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:56:56 +0100
|
||||
Subject: d3d11: Initial implementation for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 1075 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1043 insertions(+), 32 deletions(-)
|
||||
dlls/d3d11/device.c | 1071 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1040 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 45467480905..4ee9d500802 100644
|
||||
index 59b1bc864b..ec02ce6f20 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -19,12 +19,181 @@
|
||||
@@ -724,8 +724,8 @@ index 45467480905..4ee9d500802 100644
|
||||
+
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1139,7 +1830,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1133,7 +1824,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext *iface,
|
||||
ID3D11CommandList *command_list, BOOL restore_state)
|
||||
{
|
||||
@@ -747,16 +747,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -1953,7 +2657,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers(ID3D1
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
- FIXME("iface %p stub!\n", iface);
|
||||
+ TRACE("iface %p stub!\n", iface);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -2165,6 +2869,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
@@ -2693,6 +3397,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@@ -764,7 +755,7 @@ index 45467480905..4ee9d500802 100644
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
ID3D11Device_Release(context->device);
|
||||
HeapFree(GetProcessHeap(), 0, context);
|
||||
@@ -2216,43 +2921,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
@@ -2744,43 +3449,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -857,7 +848,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
@@ -2265,53 +3013,171 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
@@ -2793,53 +3541,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
|
||||
{
|
||||
@@ -979,17 +970,15 @@ index 45467480905..4ee9d500802 100644
|
||||
+ call->vbuffer_info.num_buffers = buffer_count;
|
||||
+
|
||||
+ call->vbuffer_info.buffers = (void *)(call + 1);
|
||||
+ call->vbuffer_info.strides = (void *)&call->vbuffer_info.buffers[buffer_count];
|
||||
+ call->vbuffer_info.offsets = (void *)&call->vbuffer_info.strides[buffer_count];
|
||||
+ for (i = 0; i < buffer_count; i++)
|
||||
+ {
|
||||
+ if (buffers[i]) ID3D11Buffer_AddRef(buffers[i]);
|
||||
+ call->vbuffer_info.buffers[i] = buffers[i];
|
||||
+ call->vbuffer_info.strides[i] = strides[i];
|
||||
+ call->vbuffer_info.offsets[i] = offsets[i];
|
||||
+ }
|
||||
+
|
||||
+ call->vbuffer_info.strides = (void *)((char *)call->vbuffer_info.buffers + buffer_count * sizeof(*buffers));
|
||||
+ memcpy(call->vbuffer_info.strides, strides, sizeof(UINT) * buffer_count);
|
||||
+
|
||||
+ call->vbuffer_info.offsets = (void *)((char *)call->vbuffer_info.strides + buffer_count * sizeof(UINT));
|
||||
+ memcpy(call->vbuffer_info.offsets, offsets, sizeof(UINT) * buffer_count);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11DeviceContext *iface,
|
||||
@@ -1038,7 +1027,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
@@ -2340,7 +3206,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
@@ -2868,7 +3732,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology)
|
||||
{
|
||||
@@ -1056,7 +1045,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -2400,8 +3275,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
@@ -2928,8 +3801,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
ID3D11DepthStencilView *depth_stencil_view)
|
||||
{
|
||||
@@ -1086,7 +1075,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
@@ -2421,15 +3316,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
@@ -2949,15 +3842,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
|
||||
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
|
||||
{
|
||||
@@ -1133,7 +1122,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
@@ -2471,13 +3395,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
@@ -2999,13 +3921,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
|
||||
ID3D11RasterizerState *rasterizer_state)
|
||||
{
|
||||
@@ -1170,7 +1159,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
@@ -2592,8 +3537,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
@@ -3120,8 +4063,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
@@ -1190,7 +1179,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
|
||||
@@ -2606,36 +3561,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
@@ -3134,36 +4087,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -1258,7 +1247,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -2936,7 +3917,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
@@ -3464,7 +4443,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
@@ -1275,7 +1264,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -2961,9 +3950,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
@@ -3489,9 +4476,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
|
||||
BOOL restore, ID3D11CommandList **command_list)
|
||||
{
|
||||
@@ -1307,7 +1296,7 @@ index 45467480905..4ee9d500802 100644
|
||||
}
|
||||
|
||||
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
|
||||
@@ -3724,6 +4733,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
@@ -4280,6 +5287,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = iface;
|
||||
object->refcount = 1;
|
||||
|
||||
@@ -1317,5 +1306,5 @@ index 45467480905..4ee9d500802 100644
|
||||
wined3d_private_store_init(&object->private_store);
|
||||
|
||||
--
|
||||
2.11.0
|
||||
2.12.2
|
||||
|
||||
|
@@ -1,38 +0,0 @@
|
||||
From a911b0d8c83dae701997bbbc476b55376727c647 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 11:52:50 +0100
|
||||
Subject: d3d11: Simplify d3d11_deferred_context_IASetVertexBuffers.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 83d97665ed5..7cd16c37470 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -3252,17 +3252,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_IASetVertexBuffers(ID3D11De
|
||||
call->vbuffer_info.num_buffers = buffer_count;
|
||||
|
||||
call->vbuffer_info.buffers = (void *)(call + 1);
|
||||
+ call->vbuffer_info.strides = (void *)&call->vbuffer_info.buffers[buffer_count];
|
||||
+ call->vbuffer_info.offsets = (void *)&call->vbuffer_info.strides[buffer_count];
|
||||
for (i = 0; i < buffer_count; i++)
|
||||
{
|
||||
if (buffers[i]) ID3D11Buffer_AddRef(buffers[i]);
|
||||
call->vbuffer_info.buffers[i] = buffers[i];
|
||||
+ call->vbuffer_info.strides[i] = strides[i];
|
||||
+ call->vbuffer_info.offsets[i] = offsets[i];
|
||||
}
|
||||
-
|
||||
- call->vbuffer_info.strides = (void *)((char *)call->vbuffer_info.buffers + buffer_count * sizeof(*buffers));
|
||||
- memcpy(call->vbuffer_info.strides, strides, sizeof(UINT) * buffer_count);
|
||||
-
|
||||
- call->vbuffer_info.offsets = (void *)((char *)call->vbuffer_info.strides + buffer_count * sizeof(UINT));
|
||||
- memcpy(call->vbuffer_info.offsets, offsets, sizeof(UINT) * buffer_count);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d36a6643bbb79dcea3bc39391dc4a129bd940f31 Mon Sep 17 00:00:00 2001
|
||||
From d4e5a58b69c7e8810c811041234134fe5062f931 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 25 Aug 2016 19:52:23 +0200
|
||||
Subject: d3d11/tests: Test the creation of 1d render buffers in
|
||||
@@ -9,10 +9,10 @@ Subject: d3d11/tests: Test the creation of 1d render buffers in
|
||||
1 file changed, 40 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index c48ff9a..ec5c296 100644
|
||||
index 9aa21584d8..063b30ebf1 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -3190,6 +3190,7 @@ static void test_create_rendertarget_view(void)
|
||||
@@ -3262,6 +3262,7 @@ static void test_create_rendertarget_view(void)
|
||||
D3D11_RENDER_TARGET_VIEW_DESC rtv_desc;
|
||||
D3D11_TEXTURE3D_DESC texture3d_desc;
|
||||
D3D11_TEXTURE2D_DESC texture2d_desc;
|
||||
@@ -20,15 +20,15 @@ index c48ff9a..ec5c296 100644
|
||||
D3D11_SUBRESOURCE_DATA data = {0};
|
||||
ULONG refcount, expected_refcount;
|
||||
D3D11_BUFFER_DESC buffer_desc;
|
||||
@@ -3197,6 +3198,7 @@ static void test_create_rendertarget_view(void)
|
||||
@@ -3269,6 +3270,7 @@ static void test_create_rendertarget_view(void)
|
||||
ID3D11Device *device, *tmp;
|
||||
ID3D11Texture3D *texture3d;
|
||||
ID3D11Texture2D *texture2d;
|
||||
+ ID3D11Texture1D *texture1d;
|
||||
ID3D11Resource *texture;
|
||||
ID3D11Buffer *buffer;
|
||||
IUnknown *iface;
|
||||
@@ -3227,6 +3229,23 @@ static void test_create_rendertarget_view(void)
|
||||
unsigned int i;
|
||||
@@ -3298,6 +3300,23 @@ static void test_create_rendertarget_view(void)
|
||||
}
|
||||
tests[] =
|
||||
{
|
||||
@@ -52,7 +52,7 @@ index c48ff9a..ec5c296 100644
|
||||
{{ 1, 1, RGBA8_UNORM}, {0}, {RGBA8_UNORM, TEX_2D, 0}},
|
||||
{{10, 1, RGBA8_UNORM}, {0}, {RGBA8_UNORM, TEX_2D, 0}},
|
||||
{{10, 1, RGBA8_UNORM}, {FMT_UNKNOWN, TEX_2D, 0}, {RGBA8_UNORM, TEX_2D, 0}},
|
||||
@@ -3388,6 +3407,12 @@ static void test_create_rendertarget_view(void)
|
||||
@@ -3460,6 +3479,12 @@ static void test_create_rendertarget_view(void)
|
||||
ID3D11RenderTargetView_Release(rtview);
|
||||
ID3D11Buffer_Release(buffer);
|
||||
|
||||
@@ -65,7 +65,7 @@ index c48ff9a..ec5c296 100644
|
||||
texture2d_desc.Width = 512;
|
||||
texture2d_desc.Height = 512;
|
||||
texture2d_desc.SampleDesc.Count = 1;
|
||||
@@ -3408,7 +3433,21 @@ static void test_create_rendertarget_view(void)
|
||||
@@ -3480,7 +3505,21 @@ static void test_create_rendertarget_view(void)
|
||||
{
|
||||
D3D11_RENDER_TARGET_VIEW_DESC *current_desc;
|
||||
|
||||
@@ -89,5 +89,5 @@ index c48ff9a..ec5c296 100644
|
||||
texture2d_desc.MipLevels = tests[i].texture.miplevel_count;
|
||||
texture2d_desc.ArraySize = tests[i].texture.depth_or_array_size;
|
||||
--
|
||||
2.8.1
|
||||
2.12.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0fb8cdfad5e55e814f6cb7c61935dc5e25cfd132 Mon Sep 17 00:00:00 2001
|
||||
From 2ba57281f31901b2f9ce05947e44b4a6e7035550 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 25 Aug 2016 19:54:13 +0200
|
||||
Subject: d3d11/tests: Test the creation of 1d shader resource views in
|
||||
@@ -9,10 +9,10 @@ Subject: d3d11/tests: Test the creation of 1d shader resource views in
|
||||
1 file changed, 40 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index ec5c296..0dd286d 100644
|
||||
index 063b30ebf1..81cced86c3 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -3536,6 +3536,7 @@ static void test_create_shader_resource_view(void)
|
||||
@@ -3609,6 +3609,7 @@ static void test_create_shader_resource_view(void)
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc;
|
||||
D3D11_TEXTURE3D_DESC texture3d_desc;
|
||||
D3D11_TEXTURE2D_DESC texture2d_desc;
|
||||
@@ -20,15 +20,15 @@ index ec5c296..0dd286d 100644
|
||||
ULONG refcount, expected_refcount;
|
||||
ID3D11ShaderResourceView *srview;
|
||||
D3D_FEATURE_LEVEL feature_level;
|
||||
@@ -3543,6 +3544,7 @@ static void test_create_shader_resource_view(void)
|
||||
@@ -3616,6 +3617,7 @@ static void test_create_shader_resource_view(void)
|
||||
ID3D11Device *device, *tmp;
|
||||
ID3D11Texture3D *texture3d;
|
||||
ID3D11Texture2D *texture2d;
|
||||
+ ID3D11Texture1D *texture1d;
|
||||
ID3D11Resource *texture;
|
||||
ID3D11Buffer *buffer;
|
||||
IUnknown *iface;
|
||||
@@ -3575,6 +3577,21 @@ static void test_create_shader_resource_view(void)
|
||||
unsigned int i;
|
||||
@@ -3647,6 +3649,21 @@ static void test_create_shader_resource_view(void)
|
||||
}
|
||||
tests[] =
|
||||
{
|
||||
@@ -50,7 +50,7 @@ index ec5c296..0dd286d 100644
|
||||
{{10, 1, RGBA8_UNORM}, {0}, {RGBA8_UNORM, TEX_2D, 0, 10}},
|
||||
{{10, 1, RGBA8_UNORM}, {FMT_UNKNOWN, TEX_2D, 0, ~0u}, {RGBA8_UNORM, TEX_2D, 0, 10}},
|
||||
{{10, 1, RGBA8_UNORM}, {RGBA8_UNORM, TEX_2D, 0, ~0u}, {RGBA8_UNORM, TEX_2D, 0, 10}},
|
||||
@@ -3769,6 +3786,12 @@ static void test_create_shader_resource_view(void)
|
||||
@@ -3847,6 +3864,12 @@ static void test_create_shader_resource_view(void)
|
||||
skip("Structured buffers require feature level 11_0.\n");
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ index ec5c296..0dd286d 100644
|
||||
texture2d_desc.Width = 512;
|
||||
texture2d_desc.Height = 512;
|
||||
texture2d_desc.SampleDesc.Count = 1;
|
||||
@@ -3788,7 +3811,23 @@ static void test_create_shader_resource_view(void)
|
||||
@@ -3866,7 +3889,23 @@ static void test_create_shader_resource_view(void)
|
||||
{
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC *current_desc;
|
||||
|
||||
@@ -89,5 +89,5 @@ index ec5c296..0dd286d 100644
|
||||
texture2d_desc.MipLevels = tests[i].texture.miplevel_count;
|
||||
texture2d_desc.ArraySize = tests[i].texture.depth_or_array_size;
|
||||
--
|
||||
2.8.1
|
||||
2.12.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 07bb6e9c60e3525ccf70f979d60f045e4300dbc4 Mon Sep 17 00:00:00 2001
|
||||
From d29f7e7f2e435ffee61f69eb488884b6d7043d0e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 19 Dec 2014 22:31:46 +0100
|
||||
Subject: d3dx9_36: Implement ID3DXEffect_FindNextValidTechnique + add tests.
|
||||
@@ -9,10 +9,10 @@ Subject: d3dx9_36: Implement ID3DXEffect_FindNextValidTechnique + add tests.
|
||||
2 files changed, 91 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
|
||||
index 813b57e1ea..3c5f7ba8b8 100644
|
||||
index 864c3902fde..2de2058666a 100644
|
||||
--- a/dlls/d3dx9_36/effect.c
|
||||
+++ b/dlls/d3dx9_36/effect.c
|
||||
@@ -3652,13 +3652,41 @@ static HRESULT WINAPI ID3DXEffectImpl_ValidateTechnique(ID3DXEffect* iface, D3DX
|
||||
@@ -3891,13 +3891,41 @@ static HRESULT WINAPI ID3DXEffectImpl_ValidateTechnique(ID3DXEffect* iface, D3DX
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -58,11 +58,11 @@ index 813b57e1ea..3c5f7ba8b8 100644
|
||||
|
||||
static BOOL walk_parameter_dep(struct d3dx_parameter *param, walk_parameter_dep_func param_func,
|
||||
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
|
||||
index de5ae69ec9..aba65d11fd 100644
|
||||
index f3bc9e3c36a..6fb770eafcb 100644
|
||||
--- a/dlls/d3dx9_36/tests/effect.c
|
||||
+++ b/dlls/d3dx9_36/tests/effect.c
|
||||
@@ -5681,6 +5681,65 @@ static void test_effect_state_manager(IDirect3DDevice9 *device)
|
||||
ok(!refcount, "State manager was not properly freed, refcount %u.\n", refcount);
|
||||
@@ -6290,6 +6290,65 @@ static void test_effect_get_pass_desc(IDirect3DDevice9 *device)
|
||||
effect->lpVtbl->Release(effect);
|
||||
}
|
||||
|
||||
+/*
|
||||
@@ -127,14 +127,14 @@ index de5ae69ec9..aba65d11fd 100644
|
||||
START_TEST(effect)
|
||||
{
|
||||
HWND wnd;
|
||||
@@ -5728,6 +5787,7 @@ START_TEST(effect)
|
||||
test_effect_commitchanges(device);
|
||||
test_effect_preshader_relative_addressing(device);
|
||||
test_effect_state_manager(device);
|
||||
@@ -6341,6 +6400,7 @@ START_TEST(effect)
|
||||
test_effect_shared_parameters(device);
|
||||
test_effect_large_address_aware_flag(device);
|
||||
test_effect_get_pass_desc(device);
|
||||
+ test_effect_technique_validation(device);
|
||||
|
||||
count = IDirect3DDevice9_Release(device);
|
||||
ok(count == 0, "The device was not properly freed: refcount %u\n", count);
|
||||
--
|
||||
2.11.0
|
||||
2.12.2
|
||||
|
||||
|
@@ -0,0 +1,52 @@
|
||||
From 53da53661a5058d691c15d85328148f37b753769 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 6 May 2017 01:32:51 +0200
|
||||
Subject: d3dx9_36/tests: Fix some test failures.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/math.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
|
||||
index 5bbfb4980b..5fe65ac484 100644
|
||||
--- a/dlls/d3dx9_36/tests/math.c
|
||||
+++ b/dlls/d3dx9_36/tests/math.c
|
||||
@@ -236,7 +236,7 @@ static void D3DXColorTest(void)
|
||||
/*_______________D3DXColorLerp________________*/
|
||||
expected.r = 0.32f; expected.g = 0.69f; expected.b = 0.356f; expected.a = 0.897f;
|
||||
D3DXColorLerp(&got,&color,&color1,scale);
|
||||
- expect_color(&expected, &got, 0);
|
||||
+ expect_color(&expected, &got, 2);
|
||||
/* Test the NULL case */
|
||||
funcpointer = D3DXColorLerp(&got,NULL,&color1,scale);
|
||||
ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer);
|
||||
@@ -306,7 +306,7 @@ static void D3DXFresnelTest(void)
|
||||
BOOL equal;
|
||||
|
||||
fresnel = D3DXFresnelTerm(0.5f, 1.5f);
|
||||
- equal = compare_float(fresnel, 8.91867056e-02f, 1);
|
||||
+ equal = compare_float(fresnel, 8.91867056e-02f, 2);
|
||||
ok(equal, "Got unexpected Fresnel term %.8e.\n", fresnel);
|
||||
}
|
||||
|
||||
@@ -2955,7 +2955,7 @@ static void test_D3DXSHEvalDirectionalLight(void)
|
||||
expected = j + test[l].boffset;
|
||||
else
|
||||
expected = test[l].blue_out[startindex + j];
|
||||
- equal = compare_float(expected, blue_out[j], 4);
|
||||
+ equal = compare_float(expected, blue_out[j], 8);
|
||||
ok(equal, "Blue: case %u, order %u: expected[%u] = %.8e, received %.8e.\n",
|
||||
l, order, j, expected, blue_out[j]);
|
||||
}
|
||||
@@ -3287,7 +3287,7 @@ static void test_D3DXSHMultiply3(void)
|
||||
D3DXSHMultiply3(c, c, b);
|
||||
for (i = 0; i < 20; i++)
|
||||
{
|
||||
- equal = compare_float(c[i], expected_aliased[i], 32);
|
||||
+ equal = compare_float(c[i], expected_aliased[i], 64);
|
||||
ok(equal, "Expected[%u] = %.8e, received = %.8e.\n", i, expected_aliased[i], c[i]);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.12.2
|
||||
|
@@ -0,0 +1,31 @@
|
||||
From dabf89ee29066b7a133ca2fb1e5c05a8100a0365 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 1 May 2017 19:49:41 +0200
|
||||
Subject: dmloader/tests: Fix test failures.
|
||||
|
||||
---
|
||||
dlls/dmloader/tests/loader.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c
|
||||
index 6b2ee3ad93..1735994088 100644
|
||||
--- a/dlls/dmloader/tests/loader.c
|
||||
+++ b/dlls/dmloader/tests/loader.c
|
||||
@@ -66,11 +66,11 @@ static void test_directory(void)
|
||||
/* Two consecutive SetSearchDirectory with the same path */
|
||||
GetTempPathW(ARRAY_SIZE(path), path);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &GUID_DirectMusicAllTypes, path, 0);
|
||||
- todo_wine ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr);
|
||||
+ ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &GUID_DirectMusicAllTypes, path, 0);
|
||||
- ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr);
|
||||
+ todo_wine ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &CLSID_DirectSoundWave, path, 0);
|
||||
- ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr);
|
||||
+ todo_wine ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr);
|
||||
hr = IDirectMusicLoader_SetSearchDirectory(loader, &CLSID_DirectSoundWave, path, 0);
|
||||
ok(hr == S_FALSE, "Second SetSearchDirectory failed with %#x\n", hr);
|
||||
|
||||
--
|
||||
2.12.2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user