mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against cc4b28a99df649d2885c14fd28c2ad2f0c2abdad.
This commit is contained in:
parent
2de179532e
commit
15e36c54fc
@ -1,4 +1,4 @@
|
||||
From ed2822f9c9c1178b78872b13aa5d5df1a397bd35 Mon Sep 17 00:00:00 2001
|
||||
From 52012d859a9cb5d48af8832944aa0d58e950c211 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:08:05 +0200
|
||||
Subject: [PATCH] server: Implement support for creating processes using a
|
||||
@ -15,10 +15,10 @@ Subject: [PATCH] server: Implement support for creating processes using a
|
||||
7 files changed, 59 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index e9d10ee..4ea7f1d 100644
|
||||
index 5f838f3..fdaca57 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2203,7 +2203,7 @@ static NTSTATUS alloc_object_attributes( const SECURITY_ATTRIBUTES *attr, struct
|
||||
@@ -2204,7 +2204,7 @@ static NTSTATUS alloc_object_attributes( const SECURITY_ATTRIBUTES *attr, struct
|
||||
* Create a new process. If hFile is a valid handle we have an exe
|
||||
* file, otherwise it is a Winelib app.
|
||||
*/
|
||||
@ -27,7 +27,7 @@ index e9d10ee..4ea7f1d 100644
|
||||
LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir,
|
||||
@@ -2316,6 +2316,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
@@ -2317,6 +2317,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
req->access = PROCESS_ALL_ACCESS;
|
||||
req->cpu = cpu;
|
||||
req->info_size = startup_info_size;
|
||||
@ -35,7 +35,7 @@ index e9d10ee..4ea7f1d 100644
|
||||
wine_server_add_data( req, objattr, attr_len );
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, env, (env_end - env) * sizeof(WCHAR) );
|
||||
@@ -2432,7 +2433,7 @@ error:
|
||||
@@ -2433,7 +2434,7 @@ error:
|
||||
*
|
||||
* Create a new VDM process for a 16-bit or DOS application.
|
||||
*/
|
||||
@ -45,11 +45,11 @@ index e9d10ee..4ea7f1d 100644
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir, int exec_only )
|
||||
@@ -2458,7 +2459,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
sprintfW(new_cmd_line, argsW, winevdmW, buffer, cmd_line);
|
||||
sprintfW(new_cmd_line, argsW, winevdm, buffer, cmd_line);
|
||||
memset( &pe_info, 0, sizeof(pe_info) );
|
||||
pe_info.machine = IMAGE_FILE_MACHINE_I386;
|
||||
- ret = create_process( 0, winevdmW, new_cmd_line, env, cur_dir, psa, tsa, inherit,
|
||||
+ ret = create_process( token, 0, winevdmW, new_cmd_line, env, cur_dir, psa, tsa, inherit,
|
||||
- ret = create_process( 0, winevdm, new_cmd_line, env, cur_dir, psa, tsa, inherit,
|
||||
+ ret = create_process( token, 0, winevdm, new_cmd_line, env, cur_dir, psa, tsa, inherit,
|
||||
flags, startup, info, unixdir, &pe_info, exec_only );
|
||||
HeapFree( GetProcessHeap(), 0, new_cmd_line );
|
||||
return ret;
|
||||
@ -84,7 +84,7 @@ index e9d10ee..4ea7f1d 100644
|
||||
if (new_token) FIXME("No support for returning created process token\n");
|
||||
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ), &hFile, &is_64bit )))
|
||||
@@ -2688,18 +2691,18 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2700,18 +2703,18 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
debugstr_w(name), is_64bit_arch(pe_info.machine) ? 64 : 32,
|
||||
wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
|
||||
pe_info.machine );
|
||||
@ -106,7 +106,7 @@ index e9d10ee..4ea7f1d 100644
|
||||
inherit, flags, startup_info, info, unixdir, &pe_info, FALSE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2709,14 +2712,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2721,14 +2724,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!strcmpiW( p, comW ) || !strcmpiW( p, pifW ))
|
||||
{
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
|
||||
@ -123,7 +123,7 @@ index e9d10ee..4ea7f1d 100644
|
||||
inherit, flags, startup_info, info );
|
||||
break;
|
||||
}
|
||||
@@ -2832,12 +2835,12 @@ static void exec_process( LPCWSTR name )
|
||||
@@ -2844,12 +2847,12 @@ static void exec_process( LPCWSTR name )
|
||||
debugstr_w(name), is_64bit_arch(pe_info.machine) ? 64 : 32,
|
||||
wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
|
||||
pe_info.machine );
|
||||
@ -138,7 +138,7 @@ index e9d10ee..4ea7f1d 100644
|
||||
FALSE, 0, &startup_info, &info, NULL, &pe_info, TRUE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2847,7 +2850,7 @@ static void exec_process( LPCWSTR name )
|
||||
@@ -2859,7 +2862,7 @@ static void exec_process( LPCWSTR name )
|
||||
/* fall through */
|
||||
case BINARY_WIN16:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
|
||||
|
@ -1,26 +0,0 @@
|
||||
From e71a9b9a10c2de28a617f9490c3d135b1e12adf1 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 16 Dec 2016 13:20:32 +0800
|
||||
Subject: advapi32: SDDL assigns the "AC" abbreviation to
|
||||
WinBuiltinAnyPackageSid.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 28331df..3b585aa 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -135,7 +135,7 @@ static const WELLKNOWNSID WellKnownSids[] =
|
||||
{ {'M','E'}, WinMediumLabelSid, { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY}, { SECURITY_MANDATORY_MEDIUM_RID } } },
|
||||
{ {'H','I'}, WinHighLabelSid, { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY}, { SECURITY_MANDATORY_HIGH_RID } } },
|
||||
{ {'S','I'}, WinSystemLabelSid, { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY}, { SECURITY_MANDATORY_SYSTEM_RID } } },
|
||||
- { {0,0}, WinBuiltinAnyPackageSid, { SID_REVISION, 2, { SECURITY_APP_PACKAGE_AUTHORITY }, { SECURITY_APP_PACKAGE_BASE_RID, SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE } } },
|
||||
+ { {'A','C'}, WinBuiltinAnyPackageSid, { SID_REVISION, 2, { SECURITY_APP_PACKAGE_AUTHORITY }, { SECURITY_APP_PACKAGE_BASE_RID, SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE } } },
|
||||
};
|
||||
|
||||
/* these SIDs must be constructed as relative to some domain - only the RID is well-known */
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,227 +0,0 @@
|
||||
From 393f8906d8b26414fb4fc89c692cb5247be6b4c2 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 16 Dec 2016 13:23:15 +0800
|
||||
Subject: advapi32/tests: Add a test that compares a well-known SID to a SID
|
||||
created from a SDDL abbreviation.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 130 +++++++++++++++++++++++++++++------------
|
||||
1 file changed, 92 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index dfe2f871d42..808547ddbc0 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -2,7 +2,7 @@
|
||||
* Unit tests for security functions
|
||||
*
|
||||
* Copyright (c) 2004 Mike McCormack
|
||||
- * Copyright (c) 2011 Dmitry Timoshkov
|
||||
+ * Copyright (c) 2011,2013,2014,2016 Dmitry Timoshkov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -138,14 +138,6 @@ static HMODULE hmod;
|
||||
static int myARGC;
|
||||
static char** myARGV;
|
||||
|
||||
-struct strsid_entry
|
||||
-{
|
||||
- const char *str;
|
||||
- DWORD flags;
|
||||
-};
|
||||
-#define STRSID_OK 0
|
||||
-#define STRSID_OPT 1
|
||||
-
|
||||
#define SID_SLOTS 4
|
||||
static char debugsid_str[SID_SLOTS][256];
|
||||
static int debugsid_index = 0;
|
||||
@@ -174,12 +166,6 @@ static const char* debugstr_sid(PSID sid)
|
||||
return res;
|
||||
}
|
||||
|
||||
-struct sidRef
|
||||
-{
|
||||
- SID_IDENTIFIER_AUTHORITY auth;
|
||||
- const char *refStr;
|
||||
-};
|
||||
-
|
||||
static void init(void)
|
||||
{
|
||||
HMODULE hntdll;
|
||||
@@ -297,7 +283,11 @@ static void test_group_equal(HANDLE Handle, PSID expected, int line)
|
||||
|
||||
static void test_sid(void)
|
||||
{
|
||||
- struct sidRef refs[] = {
|
||||
+ static struct
|
||||
+ {
|
||||
+ SID_IDENTIFIER_AUTHORITY auth;
|
||||
+ const char *refStr;
|
||||
+ } refs[] = {
|
||||
{ { {0x00,0x00,0x33,0x44,0x55,0x66} }, "S-1-860116326-1" },
|
||||
{ { {0x00,0x00,0x01,0x02,0x03,0x04} }, "S-1-16909060-1" },
|
||||
{ { {0x00,0x00,0x00,0x01,0x02,0x03} }, "S-1-66051-1" },
|
||||
@@ -305,24 +295,60 @@ static void test_sid(void)
|
||||
{ { {0x00,0x00,0x00,0x00,0x00,0x02} }, "S-1-2-1" },
|
||||
{ { {0x00,0x00,0x00,0x00,0x00,0x0c} }, "S-1-12-1" },
|
||||
};
|
||||
- struct strsid_entry strsid_table[] = {
|
||||
- {"AO", STRSID_OK}, {"RU", STRSID_OK}, {"AN", STRSID_OK}, {"AU", STRSID_OK},
|
||||
- {"BA", STRSID_OK}, {"BG", STRSID_OK}, {"BO", STRSID_OK}, {"BU", STRSID_OK},
|
||||
- {"CA", STRSID_OPT}, {"CG", STRSID_OK}, {"CO", STRSID_OK}, {"DA", STRSID_OPT},
|
||||
- {"DC", STRSID_OPT}, {"DD", STRSID_OPT}, {"DG", STRSID_OPT}, {"DU", STRSID_OPT},
|
||||
- {"EA", STRSID_OPT}, {"ED", STRSID_OK}, {"WD", STRSID_OK}, {"PA", STRSID_OPT},
|
||||
- {"IU", STRSID_OK}, {"LA", STRSID_OK}, {"LG", STRSID_OK}, {"LS", STRSID_OK},
|
||||
- {"SY", STRSID_OK}, {"NU", STRSID_OK}, {"NO", STRSID_OK}, {"NS", STRSID_OK},
|
||||
- {"PO", STRSID_OK}, {"PS", STRSID_OK}, {"PU", STRSID_OK}, {"RS", STRSID_OPT},
|
||||
- {"RD", STRSID_OK}, {"RE", STRSID_OK}, {"RC", STRSID_OK}, {"SA", STRSID_OPT},
|
||||
- {"SO", STRSID_OK}, {"SU", STRSID_OK}};
|
||||
-
|
||||
+ static const struct
|
||||
+ {
|
||||
+ const char *str;
|
||||
+ WELL_KNOWN_SID_TYPE sid_type;
|
||||
+ BOOL optional;
|
||||
+ } strsid_table[] = {
|
||||
+ /* Please keep the list sorted. */
|
||||
+ { "AC", WinBuiltinAnyPackageSid, TRUE },
|
||||
+ { "AN", WinAnonymousSid },
|
||||
+ { "AO", WinBuiltinAccountOperatorsSid },
|
||||
+ { "AU", WinAuthenticatedUserSid },
|
||||
+ { "BA", WinBuiltinAdministratorsSid },
|
||||
+ { "BG", WinBuiltinGuestsSid },
|
||||
+ { "BO", WinBuiltinBackupOperatorsSid },
|
||||
+ { "BU", WinBuiltinUsersSid },
|
||||
+ { "CA", WinAccountCertAdminsSid, TRUE},
|
||||
+ { "CG", WinCreatorGroupSid },
|
||||
+ { "CO", WinCreatorOwnerSid },
|
||||
+ { "DA", WinAccountDomainAdminsSid, TRUE},
|
||||
+ { "DC", WinAccountComputersSid, TRUE},
|
||||
+ { "DD", WinAccountControllersSid, TRUE},
|
||||
+ { "DG", WinAccountDomainGuestsSid, TRUE},
|
||||
+ { "DU", WinAccountDomainUsersSid, TRUE},
|
||||
+ { "EA", WinAccountEnterpriseAdminsSid, TRUE},
|
||||
+ { "ED", WinEnterpriseControllersSid },
|
||||
+ { "IU", WinInteractiveSid },
|
||||
+ { "LA", WinAccountAdministratorSid },
|
||||
+ { "LG", WinAccountGuestSid },
|
||||
+ { "LS", WinLocalServiceSid },
|
||||
+ { "NO", WinBuiltinNetworkConfigurationOperatorsSid },
|
||||
+ { "NS", WinNetworkServiceSid },
|
||||
+ { "NU", WinNetworkSid },
|
||||
+ { "PA", WinAccountPolicyAdminsSid, TRUE},
|
||||
+ { "PO", WinBuiltinPrintOperatorsSid },
|
||||
+ { "PS", WinSelfSid },
|
||||
+ { "PU", WinBuiltinPowerUsersSid },
|
||||
+ { "RC", WinRestrictedCodeSid },
|
||||
+ { "RD", WinBuiltinRemoteDesktopUsersSid },
|
||||
+ { "RE", WinBuiltinReplicatorSid },
|
||||
+ { "RS", WinAccountRasAndIasServersSid, TRUE },
|
||||
+ { "RU", WinBuiltinPreWindows2000CompatibleAccessSid },
|
||||
+ { "SA", WinAccountSchemaAdminsSid, TRUE },
|
||||
+ { "SO", WinBuiltinSystemOperatorsSid },
|
||||
+ { "SU", WinServiceSid },
|
||||
+ { "SY", WinLocalSystemSid },
|
||||
+ { "WD", WinWorldSid },
|
||||
+ };
|
||||
+ SID_IDENTIFIER_AUTHORITY domain_ident = { SECURITY_NT_AUTHORITY };
|
||||
const char noSubAuthStr[] = "S-1-5";
|
||||
unsigned int i;
|
||||
- PSID psid = NULL;
|
||||
+ PSID psid, domain_sid;
|
||||
SID *pisid;
|
||||
BOOL r;
|
||||
- LPSTR str = NULL;
|
||||
+ LPSTR str;
|
||||
|
||||
if( !pConvertStringSidToSidA )
|
||||
{
|
||||
@@ -402,7 +428,7 @@ static void test_sid(void)
|
||||
}
|
||||
|
||||
/* string constant format not supported before XP */
|
||||
- r = pConvertStringSidToSidA(strsid_table[0].str, &psid);
|
||||
+ r = pConvertStringSidToSidA("AN", &psid);
|
||||
if(!r)
|
||||
{
|
||||
win_skip("String constant format not supported\n");
|
||||
@@ -410,25 +436,51 @@ static void test_sid(void)
|
||||
}
|
||||
LocalFree(psid);
|
||||
|
||||
+ AllocateAndInitializeSid(&domain_ident, 4, SECURITY_NT_NON_UNIQUE, 0, 0, 0, 0, 0, 0, 0, &domain_sid);
|
||||
+
|
||||
for(i = 0; i < ARRAY_SIZE(strsid_table); i++)
|
||||
{
|
||||
- char *temp;
|
||||
-
|
||||
SetLastError(0xdeadbeef);
|
||||
r = pConvertStringSidToSidA(strsid_table[i].str, &psid);
|
||||
|
||||
- if (!(strsid_table[i].flags & STRSID_OPT))
|
||||
+ if (!(strsid_table[i].optional))
|
||||
{
|
||||
ok(r, "%s: got %u\n", strsid_table[i].str, GetLastError());
|
||||
}
|
||||
|
||||
if (r)
|
||||
{
|
||||
- if ((winetest_debug > 1) && (ConvertSidToStringSidA(psid, &temp)))
|
||||
+ char buf[SECURITY_MAX_SID_SIZE];
|
||||
+ char *sid_string, *well_known_sid_string;
|
||||
+ DWORD n, size;
|
||||
+
|
||||
+ /* zero out domain id before comparison to simplify things */
|
||||
+ if (strsid_table[i].sid_type == WinAccountAdministratorSid ||
|
||||
+ strsid_table[i].sid_type == WinAccountGuestSid)
|
||||
{
|
||||
- trace(" %s: %s\n", strsid_table[i].str, temp);
|
||||
- LocalFree(temp);
|
||||
+ for (n = 1; n <= 3; n++)
|
||||
+ *GetSidSubAuthority(psid, n) = 0;
|
||||
}
|
||||
+
|
||||
+ r = ConvertSidToStringSidA(psid, &sid_string);
|
||||
+ ok(r, "%s: ConvertSidToStringSid error %u\n", strsid_table[i].str, GetLastError());
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("%s => %s\n", strsid_table[i].str, sid_string);
|
||||
+
|
||||
+ size = sizeof(buf);
|
||||
+ r = pCreateWellKnownSid(strsid_table[i].sid_type, domain_sid, buf, &size);
|
||||
+ ok(r, "%u: CreateWellKnownSid(%u) error %u\n", i, strsid_table[i].sid_type, GetLastError());
|
||||
+
|
||||
+ r = ConvertSidToStringSidA(buf, &well_known_sid_string);
|
||||
+ ok(r, "%u: ConvertSidToStringSi(%u) error %u\n", i, strsid_table[i].sid_type, GetLastError());
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("%u => %s\n", strsid_table[i].sid_type, well_known_sid_string);
|
||||
+
|
||||
+ ok(strcmp(sid_string, well_known_sid_string) == 0,
|
||||
+ "%u: (%u) expected %s, got %s\n", i, strsid_table[i].sid_type, well_known_sid_string, sid_string);
|
||||
+
|
||||
+ LocalFree(well_known_sid_string);
|
||||
+ LocalFree(sid_string);
|
||||
LocalFree(psid);
|
||||
}
|
||||
else
|
||||
@@ -439,6 +491,8 @@ static void test_sid(void)
|
||||
trace(" %s: couldn't be converted\n", strsid_table[i].str);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ LocalFree(domain_sid);
|
||||
}
|
||||
|
||||
static void test_trustee(void)
|
||||
@@ -2288,7 +2342,7 @@ static void test_LookupAccountSid(void)
|
||||
if (pCreateWellKnownSid)
|
||||
{
|
||||
trace("Well Known SIDs:\n");
|
||||
- for (i = 0; i <= 60; i++)
|
||||
+ for (i = 0; i <= 84; i++)
|
||||
{
|
||||
size = SECURITY_MAX_SID_SIZE;
|
||||
if (pCreateWellKnownSid(i, NULL, &max_sid.sid, &size))
|
||||
--
|
||||
2.13.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [41934] Assigns the AC abbreviation to WinBuiltinAnyPackageSid
|
@ -1,181 +0,0 @@
|
||||
From 04bb8bf7196efb6f7c0a3c5f7524ac8aefc645b6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 7 Oct 2017 00:52:34 +0200
|
||||
Subject: wined3d: Add support for depth bias clamping.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 5 ++++-
|
||||
dlls/wined3d/adapter_gl.c | 3 +++
|
||||
dlls/wined3d/cs.c | 1 +
|
||||
dlls/wined3d/state.c | 17 +++++++++++++++--
|
||||
dlls/wined3d/stateblock.c | 2 ++
|
||||
dlls/wined3d/utils.c | 1 +
|
||||
dlls/wined3d/wined3d_gl.h | 1 +
|
||||
include/wine/wined3d.h | 3 ++-
|
||||
8 files changed, 29 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index e6ba31c..f0ff7b3 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -933,7 +933,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
{
|
||||
DWORD d;
|
||||
float f;
|
||||
- } scale_bias, const_bias;
|
||||
+ } scale_bias, const_bias, bias_clamp;
|
||||
|
||||
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
|
||||
|
||||
@@ -945,6 +945,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, WINED3D_CULL_BACK);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SLOPESCALEDEPTHBIAS, 0);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, 0);
|
||||
+ wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIASCLAMP, 0);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, FALSE);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, FALSE);
|
||||
@@ -959,8 +960,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, desc->CullMode);
|
||||
scale_bias.f = desc->SlopeScaledDepthBias;
|
||||
const_bias.f = desc->DepthBias;
|
||||
+ bias_clamp.f = desc->DepthBiasClamp;
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SLOPESCALEDEPTHBIAS, scale_bias.d);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, const_bias.d);
|
||||
+ wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIASCLAMP, bias_clamp.d);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, desc->ScissorEnable);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable);
|
||||
wined3d_device_set_render_state(device->wined3d_device,
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 686c79a..dc49c88 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -180,6 +180,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
{"GL_EXT_packed_depth_stencil", EXT_PACKED_DEPTH_STENCIL },
|
||||
{"GL_EXT_packed_float", EXT_PACKED_FLOAT },
|
||||
{"GL_EXT_point_parameters", EXT_POINT_PARAMETERS },
|
||||
+ {"GL_EXT_polygon_offset_clamp", EXT_POLYGON_OFFSET_CLAMP },
|
||||
{"GL_EXT_provoking_vertex", EXT_PROVOKING_VERTEX },
|
||||
{"GL_EXT_secondary_color", EXT_SECONDARY_COLOR },
|
||||
{"GL_EXT_stencil_two_side", EXT_STENCIL_TWO_SIDE },
|
||||
@@ -2473,6 +2474,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
|
||||
/* GL_EXT_point_parameters */
|
||||
USE_GL_FUNC(glPointParameterfEXT)
|
||||
USE_GL_FUNC(glPointParameterfvEXT)
|
||||
+ /* GL_EXT_polygon_offset_clamp */
|
||||
+ USE_GL_FUNC(glPolygonOffsetClampEXT)
|
||||
/* GL_EXT_provoking_vertex */
|
||||
USE_GL_FUNC(glProvokingVertexEXT)
|
||||
/* GL_EXT_secondary_color */
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d6bc739..515982c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1124,6 +1124,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS));
|
||||
+ device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIASCLAMP));
|
||||
}
|
||||
else if (prev && prev->format->depth_bias_scale != op->view->format->depth_bias_scale)
|
||||
{
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 3b2f845..2dd6ac2 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -1781,10 +1781,11 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
{
|
||||
DWORD d;
|
||||
float f;
|
||||
- } scale_bias, const_bias;
|
||||
+ } scale_bias, const_bias, bias_clamp;
|
||||
|
||||
scale_bias.d = state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS];
|
||||
const_bias.d = state->render_states[WINED3D_RS_DEPTHBIAS];
|
||||
+ bias_clamp.d = state->render_states[WINED3D_RS_DEPTHBIASCLAMP];
|
||||
|
||||
if (context->d3d_info->wined3d_creation_flags & WINED3D_LEGACY_DEPTH_BIAS)
|
||||
{
|
||||
@@ -1811,7 +1812,18 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
}
|
||||
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_POLYGON_OFFSET_FILL);
|
||||
- gl_info->gl_ops.gl.p_glPolygonOffset(factor, units);
|
||||
+ if (gl_info->supported[EXT_POLYGON_OFFSET_CLAMP])
|
||||
+ {
|
||||
+ GL_EXTCALL(glPolygonOffsetClampEXT(factor, units, bias_clamp.f));
|
||||
+ checkGLcall("glPolygonOffsetClampEXT(...)");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (bias_clamp.f)
|
||||
+ WARN("EXT_polygon_offset_clamp extension missing, no support for depth bias clamping.\n");
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glPolygonOffset(factor, units);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4678,6 +4690,7 @@ const struct StateEntryTemplate misc_state_template[] =
|
||||
{ STATE_RENDER(WINED3D_RS_BLENDFACTOR), { STATE_RENDER(WINED3D_RS_BLENDFACTOR), state_blendfactor }, EXT_BLEND_COLOR },
|
||||
{ STATE_RENDER(WINED3D_RS_BLENDFACTOR), { STATE_RENDER(WINED3D_RS_BLENDFACTOR), state_blendfactor_w }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_DEPTHBIAS), { STATE_RENDER(WINED3D_RS_DEPTHBIAS), state_depthbias }, WINED3D_GL_EXT_NONE },
|
||||
+ { STATE_RENDER(WINED3D_RS_DEPTHBIASCLAMP), { STATE_RENDER(WINED3D_RS_DEPTHBIAS), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_ZVISIBLE), { STATE_RENDER(WINED3D_RS_ZVISIBLE), state_zvisible }, WINED3D_GL_EXT_NONE },
|
||||
/* Samplers */
|
||||
{ STATE_SAMPLER(0), { STATE_SAMPLER(0), sampler }, WINED3D_GL_EXT_NONE },
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index b4d1751..093c740 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -1257,6 +1257,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
||||
state->render_states[WINED3D_RS_BLENDFACTOR] = 0xffffffff;
|
||||
state->render_states[WINED3D_RS_SRGBWRITEENABLE] = 0;
|
||||
state->render_states[WINED3D_RS_DEPTHBIAS] = 0;
|
||||
+ tmpfloat.f = 0.0f;
|
||||
+ state->render_states[WINED3D_RS_DEPTHBIASCLAMP] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_WRAP8] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP9] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP10] = 0;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 861f169..b46f67f 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4652,6 +4652,7 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BLENDFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
|
||||
+ D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIASCLAMP);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP8);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP9);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP10);
|
||||
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
|
||||
index 525c298..883faaa 100644
|
||||
--- a/dlls/wined3d/wined3d_gl.h
|
||||
+++ b/dlls/wined3d/wined3d_gl.h
|
||||
@@ -164,6 +164,7 @@ enum wined3d_gl_extension
|
||||
EXT_PACKED_DEPTH_STENCIL,
|
||||
EXT_PACKED_FLOAT,
|
||||
EXT_POINT_PARAMETERS,
|
||||
+ EXT_POLYGON_OFFSET_CLAMP,
|
||||
EXT_PROVOKING_VERTEX,
|
||||
EXT_SECONDARY_COLOR,
|
||||
EXT_STENCIL_TWO_SIDE,
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 239ccd8..884e824 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -399,8 +399,9 @@ enum wined3d_render_state
|
||||
WINED3D_RS_SRCBLENDALPHA = 207,
|
||||
WINED3D_RS_DESTBLENDALPHA = 208,
|
||||
WINED3D_RS_BLENDOPALPHA = 209,
|
||||
+ WINED3D_RS_DEPTHBIASCLAMP = 210,
|
||||
};
|
||||
-#define WINEHIGHEST_RENDER_STATE WINED3D_RS_BLENDOPALPHA
|
||||
+#define WINEHIGHEST_RENDER_STATE WINED3D_RS_DEPTHBIASCLAMP
|
||||
|
||||
enum wined3d_blend
|
||||
{
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,178 +0,0 @@
|
||||
From 23044a3ed53cfe0c8a35c5cc19d51913e1523c51 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 17 May 2018 09:29:08 -0500
|
||||
Subject: [PATCH] d3d10core/tests: Add test for depth bias clamp.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/d3d10core/tests/d3d10core.c | 126 ++++++++++++++++++-------------
|
||||
1 file changed, 74 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c
|
||||
index e675c12a39e..2100a6611e5 100644
|
||||
--- a/dlls/d3d10core/tests/d3d10core.c
|
||||
+++ b/dlls/d3d10core/tests/d3d10core.c
|
||||
@@ -14957,10 +14957,10 @@ static void test_depth_bias(void)
|
||||
struct resource_readback rb;
|
||||
ID3D10DepthStencilView *dsv;
|
||||
unsigned int expected_value;
|
||||
+ unsigned int x, y, i, j, k;
|
||||
ID3D10RasterizerState *rs;
|
||||
ID3D10Texture2D *texture;
|
||||
unsigned int format_idx;
|
||||
- unsigned int x, y, i, j;
|
||||
unsigned int shift = 0;
|
||||
ID3D10Device *device;
|
||||
float *depth_values;
|
||||
@@ -14987,6 +14987,10 @@ static void test_depth_bias(void)
|
||||
-10000, -1000, -100, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 100, 200, 500, 1000, 10000,
|
||||
};
|
||||
+ static const float bias_clamp_tests[] =
|
||||
+ {
|
||||
+ 0.0f, -0.00001f, 0.00001f
|
||||
+ };
|
||||
static const float quad_slopes[] =
|
||||
{
|
||||
0.0f, 0.5f, 1.0f
|
||||
@@ -15079,68 +15083,86 @@ static void test_depth_bias(void)
|
||||
for (j = 0; j < ARRAY_SIZE(bias_tests); ++j)
|
||||
{
|
||||
rasterizer_desc.DepthBias = bias_tests[j];
|
||||
- ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rs);
|
||||
- ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr);
|
||||
- ID3D10Device_RSSetState(device, rs);
|
||||
- ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0);
|
||||
- draw_quad(&test_context);
|
||||
- switch (format)
|
||||
- {
|
||||
- case DXGI_FORMAT_D32_FLOAT:
|
||||
- bias = rasterizer_desc.DepthBias * pow(2.0f, quads[i].exponent - 23.0f);
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
-
|
||||
- check_texture_float(texture, depth, 2);
|
||||
- break;
|
||||
- case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
- r = 1.0f / 16777215.0f;
|
||||
- bias = rasterizer_desc.DepthBias * r;
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
|
||||
- get_texture_readback(texture, 0, &rb);
|
||||
- for (y = 0; y < texture_desc.Height; ++y)
|
||||
- {
|
||||
- expected_value = depth * 16777215.0f + 0.5f;
|
||||
- for (x = 0; x < texture_desc.Width; ++x)
|
||||
+ for (k = 0; k < ARRAY_SIZE(bias_clamp_tests); ++k)
|
||||
+ {
|
||||
+ rasterizer_desc.DepthBiasClamp = bias_clamp_tests[k];
|
||||
+ ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rs);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr);
|
||||
+ ID3D10Device_RSSetState(device, rs);
|
||||
+ ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0);
|
||||
+ draw_quad(&test_context);
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case DXGI_FORMAT_D32_FLOAT:
|
||||
+ bias = rasterizer_desc.DepthBias * pow(2.0f, quads[i].exponent - 23.0f);
|
||||
+ if (rasterizer_desc.DepthBiasClamp > 0)
|
||||
+ bias = min(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ if (rasterizer_desc.DepthBiasClamp < 0)
|
||||
+ bias = max(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
+
|
||||
+ check_texture_float(texture, depth, 2);
|
||||
+ break;
|
||||
+ case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
+ r = 1.0f / 16777215.0f;
|
||||
+ bias = rasterizer_desc.DepthBias * r;
|
||||
+ if (rasterizer_desc.DepthBiasClamp > 0)
|
||||
+ bias = min(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ if (rasterizer_desc.DepthBiasClamp < 0)
|
||||
+ bias = max(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
+
|
||||
+ get_texture_readback(texture, 0, &rb);
|
||||
+ for (y = 0; y < texture_desc.Height; ++y)
|
||||
{
|
||||
- u32 = get_readback_data(&rb, x, y, sizeof(*u32));
|
||||
- u32_value = *u32 >> shift;
|
||||
- ok(abs(u32_value - expected_value) <= 1,
|
||||
- "Got value %#x (%.8e), expected %#x (%.8e).\n",
|
||||
- u32_value, u32_value / 16777215.0f,
|
||||
- expected_value, expected_value / 16777215.0f);
|
||||
+ expected_value = depth * 16777215.0f + 0.5f;
|
||||
+ for (x = 0; x < texture_desc.Width; ++x)
|
||||
+ {
|
||||
+ u32 = get_readback_data(&rb, x, y, sizeof(*u32));
|
||||
+ u32_value = *u32 >> shift;
|
||||
+ ok(abs(u32_value - expected_value) <= 1,
|
||||
+ "Got value %#x (%.8e), expected %#x (%.8e).\n",
|
||||
+ u32_value, u32_value / 16777215.0f,
|
||||
+ expected_value, expected_value / 16777215.0f);
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
- release_resource_readback(&rb);
|
||||
- break;
|
||||
- case DXGI_FORMAT_D16_UNORM:
|
||||
- r = 1.0f / 65535.0f;
|
||||
- bias = rasterizer_desc.DepthBias * r;
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
-
|
||||
- get_texture_readback(texture, 0, &rb);
|
||||
- for (y = 0; y < texture_desc.Height; ++y)
|
||||
- {
|
||||
- expected_value = depth * 65535.0f + 0.5f;
|
||||
- for (x = 0; x < texture_desc.Width; ++x)
|
||||
+ release_resource_readback(&rb);
|
||||
+ break;
|
||||
+ case DXGI_FORMAT_D16_UNORM:
|
||||
+ r = 1.0f / 65535.0f;
|
||||
+ bias = rasterizer_desc.DepthBias * r;
|
||||
+ if (rasterizer_desc.DepthBiasClamp > 0)
|
||||
+ bias = min(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ if (rasterizer_desc.DepthBiasClamp < 0)
|
||||
+ bias = max(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
+
|
||||
+ get_texture_readback(texture, 0, &rb);
|
||||
+ for (y = 0; y < texture_desc.Height; ++y)
|
||||
{
|
||||
- u16 = get_readback_data(&rb, x, y, sizeof(*u16));
|
||||
- ok(abs(*u16 - expected_value) <= 1,
|
||||
- "Got value %#x (%.8e), expected %#x (%.8e).\n",
|
||||
- *u16, *u16 / 65535.0f, expected_value, expected_value / 65535.0f);
|
||||
+ expected_value = depth * 65535.0f + 0.5f;
|
||||
+ for (x = 0; x < texture_desc.Width; ++x)
|
||||
+ {
|
||||
+ u16 = get_readback_data(&rb, x, y, sizeof(*u16));
|
||||
+ ok(abs(*u16 - expected_value) <= 1,
|
||||
+ "Got value %#x (%.8e), expected %#x (%.8e).\n",
|
||||
+ *u16, *u16 / 65535.0f, expected_value, expected_value / 65535.0f);
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
- release_resource_readback(&rb);
|
||||
- break;
|
||||
- default:
|
||||
- break;
|
||||
+ release_resource_readback(&rb);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ ID3D10RasterizerState_Release(rs);
|
||||
}
|
||||
- ID3D10RasterizerState_Release(rs);
|
||||
}
|
||||
}
|
||||
|
||||
/* SlopeScaledDepthBias */
|
||||
rasterizer_desc.DepthBias = 0;
|
||||
+ rasterizer_desc.DepthBiasClamp = 0.0f;
|
||||
for (i = 0; i < ARRAY_SIZE(quad_slopes); ++i)
|
||||
{
|
||||
for (j = 0; j < ARRAY_SIZE(vertices); ++j)
|
||||
--
|
||||
2.18.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [43848] Implement support for depth bias clamping
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "2e754a652725c067bc44445cebe8b96487ec4a6e"
|
||||
echo "cc4b28a99df649d2885c14fd28c2ad2f0c2abdad"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -91,7 +91,6 @@ patch_enable_all ()
|
||||
enable_advapi32_LsaLookupSids="$1"
|
||||
enable_advapi32_SetSecurityInfo="$1"
|
||||
enable_advapi32_Token_Integrity_Level="$1"
|
||||
enable_advapi32_WinBuiltinAnyPackageSid="$1"
|
||||
enable_api_ms_win_Stub_DLLs="$1"
|
||||
enable_avifil32_IGetFrame_fnSetFormat="$1"
|
||||
enable_avifile_dll16_AVIStreamGetFrame="$1"
|
||||
@ -105,7 +104,6 @@ patch_enable_all ()
|
||||
enable_crypt32_MS_Root_Certs="$1"
|
||||
enable_d2d1_ID2D1Factory1="$1"
|
||||
enable_d3d11_Deferred_Context="$1"
|
||||
enable_d3d11_Depth_Bias="$1"
|
||||
enable_d3d8_ValidateShader="$1"
|
||||
enable_d3d9_DesktopWindow="$1"
|
||||
enable_d3d9_Tests="$1"
|
||||
@ -441,9 +439,6 @@ patch_enable ()
|
||||
advapi32-Token_Integrity_Level)
|
||||
enable_advapi32_Token_Integrity_Level="$2"
|
||||
;;
|
||||
advapi32-WinBuiltinAnyPackageSid)
|
||||
enable_advapi32_WinBuiltinAnyPackageSid="$2"
|
||||
;;
|
||||
api-ms-win-Stub_DLLs)
|
||||
enable_api_ms_win_Stub_DLLs="$2"
|
||||
;;
|
||||
@ -483,9 +478,6 @@ patch_enable ()
|
||||
d3d11-Deferred_Context)
|
||||
enable_d3d11_Deferred_Context="$2"
|
||||
;;
|
||||
d3d11-Depth_Bias)
|
||||
enable_d3d11_Depth_Bias="$2"
|
||||
;;
|
||||
d3d8-ValidateShader)
|
||||
enable_d3d8_ValidateShader="$2"
|
||||
;;
|
||||
@ -1809,13 +1801,6 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -eq 1; then
|
||||
if test "$enable_d3d11_Depth_Bias" -gt 1; then
|
||||
abort "Patchset d3d11-Depth_Bias disabled, but wined3d-WINED3D_RS_COLORWRITEENABLE depends on that."
|
||||
fi
|
||||
enable_d3d11_Depth_Bias=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
if test "$enable_d3d11_Deferred_Context" -gt 1; then
|
||||
abort "Patchset d3d11-Deferred_Context disabled, but wined3d-CSMT_Main depends on that."
|
||||
@ -2506,23 +2491,6 @@ if test "$enable_advapi32_Token_Integrity_Level" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset advapi32-WinBuiltinAnyPackageSid
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#41934] Assigns the AC abbreviation to WinBuiltinAnyPackageSid
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/advapi32/security.c, dlls/advapi32/tests/security.c
|
||||
# |
|
||||
if test "$enable_advapi32_WinBuiltinAnyPackageSid" -eq 1; then
|
||||
patch_apply advapi32-WinBuiltinAnyPackageSid/0001-advapi32-SDDL-assigns-the-AC-abbreviation-to-WinBuil.patch
|
||||
patch_apply advapi32-WinBuiltinAnyPackageSid/0002-advapi32-tests-Add-a-test-that-compares-a-well-known.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "advapi32: SDDL assigns the \"AC\" abbreviation to WinBuiltinAnyPackageSid.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "advapi32/tests: Add a test that compares a well-known SID to a SID created from a SDDL abbreviation.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset api-ms-win-Stub_DLLs
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -2906,24 +2874,6 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d11-Depth_Bias
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#43848] Implement support for depth bias clamping
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d10core/tests/d3d10core.c, dlls/d3d11/device.c, dlls/wined3d/adapter_gl.c, dlls/wined3d/cs.c,
|
||||
# | dlls/wined3d/state.c, dlls/wined3d/stateblock.c, dlls/wined3d/utils.c, dlls/wined3d/wined3d_gl.h, include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_d3d11_Depth_Bias" -eq 1; then
|
||||
patch_apply d3d11-Depth_Bias/0006-wined3d-Add-support-for-depth-bias-clamping.patch
|
||||
patch_apply d3d11-Depth_Bias/0007-d3d10core-tests-Add-test-for-depth-bias-clamp.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Add support for depth bias clamping.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "d3d10core/tests: Add test for depth bias clamp.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d8-ValidateShader
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -7488,9 +7438,6 @@ fi
|
||||
|
||||
# Patchset wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-Depth_Bias
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/device.c, dlls/d3d11/state.c, dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/state.c,
|
||||
# | dlls/wined3d/stateblock.c, dlls/wined3d/surface.c, dlls/wined3d/utils.c, dlls/wined3d/wined3d_private.h,
|
||||
@ -7506,7 +7453,7 @@ fi
|
||||
# Patchset wined3d-Indexed_Vertex_Blending
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-Depth_Bias, wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
# | * wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#39057] Support for indexed vertex blending
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c530667c08a09f77a74cbea8f9df48778db51686 Mon Sep 17 00:00:00 2001
|
||||
From bc274efa29b8d384aa2945c8703cefa3a60820e4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 20 Jul 2017 13:50:07 +0200
|
||||
Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
|
||||
@ -17,7 +17,7 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
|
||||
10 files changed, 73 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index f0ff7b3..cd2f1bb 100644
|
||||
index 157ff03..753efde 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -702,6 +702,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
|
||||
@ -71,7 +71,7 @@ index f0ff7b3..cd2f1bb 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c
|
||||
index c36b87f..e235c18 100644
|
||||
index 6de3502..2051749 100644
|
||||
--- a/dlls/d3d11/state.c
|
||||
+++ b/dlls/d3d11/state.c
|
||||
@@ -347,10 +347,6 @@ HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC
|
||||
@ -86,7 +86,7 @@ index c36b87f..e235c18 100644
|
||||
|
||||
/* glEnableIndexedEXT(GL_BLEND, ...) */
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 83e3563..5add8e9 100644
|
||||
index 8199afa..ec8adbf 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2768,7 +2768,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
|
||||
@ -111,7 +111,7 @@ index 83e3563..5add8e9 100644
|
||||
|
||||
context->last_was_rhw = TRUE;
|
||||
context_invalidate_state(context, STATE_VDECL); /* because of last_was_rhw = TRUE */
|
||||
@@ -4849,7 +4847,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
@@ -4851,7 +4849,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
if (!(rtv = fb->render_targets[i]) || rtv->format->id == WINED3DFMT_NULL)
|
||||
continue;
|
||||
|
||||
@ -121,7 +121,7 @@ index 83e3563..5add8e9 100644
|
||||
wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding);
|
||||
wined3d_rendertarget_view_invalidate_location(rtv, ~rtv->resource->draw_binding);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index f6a0b39..3728d7c 100644
|
||||
index abb2a89..02b1454 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -392,10 +392,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -138,7 +138,7 @@ index f6a0b39..3728d7c 100644
|
||||
checkGLcall("glClearColor");
|
||||
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 2dd6ac2..d37e809 100644
|
||||
index 375bc65..c89e50a 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -1555,9 +1555,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
|
||||
@ -201,7 +201,7 @@ index 2dd6ac2..d37e809 100644
|
||||
}
|
||||
|
||||
static void state_localviewer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
@@ -4675,18 +4662,26 @@ const struct StateEntryTemplate misc_state_template[] =
|
||||
@@ -4677,18 +4664,26 @@ const struct StateEntryTemplate misc_state_template[] =
|
||||
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), { STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_msaa_w }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), { STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), state_multisampmask }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), { STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), state_debug_monitor }, WINED3D_GL_EXT_NONE },
|
||||
@ -236,7 +236,7 @@ index 2dd6ac2..d37e809 100644
|
||||
{ STATE_RENDER(WINED3D_RS_BLENDFACTOR), { STATE_RENDER(WINED3D_RS_BLENDFACTOR), state_blendfactor_w }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_DEPTHBIAS), { STATE_RENDER(WINED3D_RS_DEPTHBIAS), state_depthbias }, WINED3D_GL_EXT_NONE },
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index baf1ec7..71f0ed6 100644
|
||||
index 45a4008..0a6b10f 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -45,6 +45,10 @@ static const DWORD pixel_states_render[] =
|
||||
@ -268,7 +268,7 @@ index baf1ec7..71f0ed6 100644
|
||||
state->render_states[WINED3D_RS_BLENDFACTOR] = 0xffffffff;
|
||||
state->render_states[WINED3D_RS_SRGBWRITEENABLE] = 0;
|
||||
state->render_states[WINED3D_RS_DEPTHBIAS] = 0;
|
||||
@@ -1272,6 +1272,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
||||
@@ -1270,6 +1270,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
||||
state->render_states[WINED3D_RS_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
|
||||
state->render_states[WINED3D_RS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO;
|
||||
state->render_states[WINED3D_RS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
|
||||
@ -278,7 +278,7 @@ index baf1ec7..71f0ed6 100644
|
||||
/* Texture Stage States - Put directly into state block, we will call function below */
|
||||
for (i = 0; i < MAX_TEXTURES; ++i)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index d1847be..fe3cd33 100644
|
||||
index 71693ad..c54e4d5 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -160,6 +160,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
|
||||
@ -303,10 +303,10 @@ index d1847be..fe3cd33 100644
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 6d84be7..951f927 100644
|
||||
index e3df24a..7dbf960 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4632,7 +4632,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
@@ -4693,7 +4693,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DEBUGMONITORTOKEN);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MAX);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_INDEXEDVERTEXBLENDENABLE);
|
||||
@ -314,7 +314,7 @@ index 6d84be7..951f927 100644
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
|
||||
@@ -4652,9 +4651,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
@@ -4713,9 +4712,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFUNC);
|
||||
@ -330,10 +330,10 @@ index 6d84be7..951f927 100644
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7084168..0dc3534 100644
|
||||
index 20e626c..dc4ab10 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -275,6 +275,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
@@ -266,6 +266,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
#define MAX_UNORDERED_ACCESS_VIEWS 8
|
||||
#define MAX_TGSM_REGISTERS 8192
|
||||
#define MAX_VERTEX_BLENDS 4
|
||||
@ -342,19 +342,19 @@ index 7084168..0dc3534 100644
|
||||
struct min_lookup
|
||||
{
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 884e824..0203816 100644
|
||||
index c62d364..4247124 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -400,8 +400,20 @@ enum wined3d_render_state
|
||||
@@ -403,8 +403,20 @@ enum wined3d_render_state
|
||||
WINED3D_RS_SRCBLENDALPHA = 207,
|
||||
WINED3D_RS_DESTBLENDALPHA = 208,
|
||||
WINED3D_RS_BLENDOPALPHA = 209,
|
||||
WINED3D_RS_DEPTHBIASCLAMP = 210,
|
||||
+ WINED3D_RS_COLORWRITEENABLE4 = 211,
|
||||
+ WINED3D_RS_COLORWRITEENABLE5 = 212,
|
||||
+ WINED3D_RS_COLORWRITEENABLE6 = 213,
|
||||
+ WINED3D_RS_COLORWRITEENABLE7 = 214,
|
||||
};
|
||||
-#define WINEHIGHEST_RENDER_STATE WINED3D_RS_DEPTHBIASCLAMP
|
||||
-#define WINEHIGHEST_RENDER_STATE WINED3D_RS_BLENDOPALPHA
|
||||
+#define WINEHIGHEST_RENDER_STATE WINED3D_RS_COLORWRITEENABLE7
|
||||
+
|
||||
+static inline enum wined3d_render_state WINED3D_RS_COLORWRITE(int index)
|
||||
|
@ -1,2 +1 @@
|
||||
Fixes: Implement support for all d3d11 color write masks in wined3d
|
||||
Depends: d3d11-Depth_Bias
|
||||
|
8
patches/winepulse-PulseAudio_Support/definition
Normal file
8
patches/winepulse-PulseAudio_Support/definition
Normal file
@ -0,0 +1,8 @@
|
||||
Fixes: Allow selection of audio device for PulseAudio backend
|
||||
Fixes: [37042] Implement exclusive mode in PulseAudio backend
|
||||
Fixes: Fix possible segfault in pulse_rd_loop of PulseAudio backend
|
||||
Fixes: Add support for GetPropValue to PulseAudio backend
|
||||
Fixes: Use actual program name if available to describe PulseAudio streams
|
||||
Fixes: Expose PKEY_AudioEndpoint_PhysicalSpeakers device property in PulseAudio driver
|
||||
# Patches 0002, 0008-0010 fix the following bug:
|
||||
Fixes: [28282] Sound constantly crackling in a lot of games
|
Loading…
x
Reference in New Issue
Block a user