mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 887a57fadd00b39b266b421fe1a04ab09e0d917d
This commit is contained in:
parent
be41345d31
commit
fad0c725ae
@ -1,19 +1,18 @@
|
||||
From 2a1064c5f90beac2bd709ab5d1c454c90a16189b Mon Sep 17 00:00:00 2001
|
||||
From 3c1f5962482e7acf531f57f49d923d9c4e5278b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Aug 2017 02:51:57 +0200
|
||||
Subject: advapi32: Implement CreateRestrictedToken.
|
||||
Subject: [PATCH] advapi32: Implement CreateRestrictedToken.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 88 +++++++++++++++++++++++++++++++++++-------
|
||||
dlls/advapi32/tests/security.c | 88 +++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 157 insertions(+), 19 deletions(-)
|
||||
dlls/kernelbase/security.c | 103 ++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 84 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 82bb6689d43..c531e45c9a0 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -840,6 +840,60 @@ BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token)
|
||||
ThreadImpersonationToken, &token, sizeof token ));
|
||||
diff --git a/dlls/kernelbase/security.c b/dlls/kernelbase/security.c
|
||||
index 2e75e81ed77..97f6ee6a2fd 100644
|
||||
--- a/dlls/kernelbase/security.c
|
||||
+++ b/dlls/kernelbase/security.c
|
||||
@@ -592,31 +592,96 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static BOOL allocate_groups(TOKEN_GROUPS **groups_ret, SID_AND_ATTRIBUTES *sids, DWORD count)
|
||||
@ -71,11 +70,16 @@ index 82bb6689d43..c531e45c9a0 100644
|
||||
+}
|
||||
+
|
||||
/*************************************************************************
|
||||
* CreateRestrictedToken [ADVAPI32.@]
|
||||
*
|
||||
@@ -871,25 +925,33 @@ BOOL WINAPI CreateRestrictedToken(
|
||||
PSID_AND_ATTRIBUTES restrictSids,
|
||||
PHANDLE newToken)
|
||||
* CreateRestrictedToken (kernelbase.@)
|
||||
*/
|
||||
-BOOL WINAPI CreateRestrictedToken( HANDLE token, DWORD flags,
|
||||
- DWORD disable_count, PSID_AND_ATTRIBUTES disable_sids,
|
||||
- DWORD delete_count, PLUID_AND_ATTRIBUTES delete_privs,
|
||||
- DWORD restrict_count, PSID_AND_ATTRIBUTES restrict_sids, PHANDLE ret )
|
||||
+BOOL WINAPI CreateRestrictedToken( HANDLE baseToken, DWORD flags,
|
||||
+ DWORD nDisableSids, PSID_AND_ATTRIBUTES disableSids,
|
||||
+ DWORD nDeletePrivs, PLUID_AND_ATTRIBUTES deletePrivs,
|
||||
+ DWORD nRestrictSids, PSID_AND_ATTRIBUTES restrictSids, PHANDLE newToken )
|
||||
{
|
||||
- TOKEN_TYPE type;
|
||||
- SECURITY_IMPERSONATION_LEVEL level = SecurityAnonymous;
|
||||
@ -86,21 +90,14 @@ index 82bb6689d43..c531e45c9a0 100644
|
||||
+ BOOL ret = FALSE;
|
||||
|
||||
- FIXME("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p): stub\n",
|
||||
- token, flags, disable_count, disable_sids, delete_count, delete_privs,
|
||||
- restrict_count, restrict_sids, ret );
|
||||
+ TRACE("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p)\n",
|
||||
baseToken, flags, nDisableSids, disableSids,
|
||||
nDeletePrivs, deletePrivs,
|
||||
nRestrictSids, restrictSids,
|
||||
newToken);
|
||||
|
||||
- size = sizeof(type);
|
||||
- if (!GetTokenInformation( baseToken, TokenType, &type, size, &size )) return FALSE;
|
||||
- if (type == TokenImpersonation)
|
||||
- {
|
||||
- size = sizeof(level);
|
||||
- if (!GetTokenInformation( baseToken, TokenImpersonationLevel, &level, size, &size ))
|
||||
- return FALSE;
|
||||
- }
|
||||
- return DuplicateTokenEx( baseToken, MAXIMUM_ALLOWED, NULL, level, type, newToken );
|
||||
+ baseToken, flags, nDisableSids, disableSids,
|
||||
+ nDeletePrivs, deletePrivs,
|
||||
+ nRestrictSids, restrictSids,
|
||||
+ newToken);
|
||||
+
|
||||
+ if (!allocate_groups(&disable_groups, disableSids, nDisableSids))
|
||||
+ goto done;
|
||||
+
|
||||
@ -117,155 +114,19 @@ index 82bb6689d43..c531e45c9a0 100644
|
||||
+ heap_free(delete_privs);
|
||||
+ heap_free(restrict_sids);
|
||||
+ return ret;
|
||||
|
||||
- size = sizeof(type);
|
||||
- if (!GetTokenInformation( token, TokenType, &type, size, &size )) return FALSE;
|
||||
- if (type == TokenImpersonation)
|
||||
- {
|
||||
- size = sizeof(level);
|
||||
- if (!GetTokenInformation( token, TokenImpersonationLevel, &level, size, &size ))
|
||||
- return FALSE;
|
||||
- }
|
||||
- return DuplicateTokenEx( token, MAXIMUM_ALLOWED, NULL, level, type, ret );
|
||||
}
|
||||
|
||||
/* ##############################
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index a1ecc409b73..0fd41fe82fa 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -5292,10 +5292,13 @@ static void test_GetUserNameW(void)
|
||||
|
||||
static void test_CreateRestrictedToken(void)
|
||||
{
|
||||
+ TOKEN_PRIMARY_GROUP *primary_group, *primary_group2;
|
||||
HANDLE process_token, token, r_token;
|
||||
PTOKEN_GROUPS token_groups, groups2;
|
||||
SID_AND_ATTRIBUTES sattr;
|
||||
SECURITY_IMPERSONATION_LEVEL level;
|
||||
+ TOKEN_PRIVILEGES *privs;
|
||||
+ PRIVILEGE_SET privset;
|
||||
TOKEN_TYPE type;
|
||||
BOOL is_member;
|
||||
DWORD size;
|
||||
@@ -5311,7 +5314,7 @@ static void test_CreateRestrictedToken(void)
|
||||
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
|
||||
- ret = DuplicateTokenEx(process_token, TOKEN_DUPLICATE|TOKEN_ADJUST_GROUPS|TOKEN_QUERY,
|
||||
+ ret = DuplicateTokenEx(process_token, TOKEN_DUPLICATE|TOKEN_ADJUST_GROUPS|TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,
|
||||
NULL, SecurityImpersonation, TokenImpersonation, &token);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
|
||||
@@ -5342,11 +5345,21 @@ static void test_CreateRestrictedToken(void)
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
ok(is_member, "not a member\n");
|
||||
|
||||
- /* disable a SID in new token */
|
||||
+ privset.PrivilegeCount = 1;
|
||||
+ privset.Control = PRIVILEGE_SET_ALL_NECESSARY;
|
||||
+ ret = LookupPrivilegeValueA(NULL, "SeChangeNotifyPrivilege", &privset.Privilege[0].Luid);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ is_member = FALSE;
|
||||
+ ret = PrivilegeCheck(token, &privset, &is_member);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+ ok(is_member, "Expected SeChangeNotifyPrivilege to be enabled\n");
|
||||
+
|
||||
+ /* disable a SID and a privilege in new token */
|
||||
sattr.Sid = token_groups->Groups[i].Sid;
|
||||
sattr.Attributes = 0;
|
||||
r_token = NULL;
|
||||
- ret = pCreateRestrictedToken(token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token);
|
||||
+ ret = pCreateRestrictedToken(token, 0, 1, &sattr, 1, &privset.Privilege[0], 0, NULL, &r_token);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
|
||||
if (ret)
|
||||
@@ -5355,7 +5368,7 @@ static void test_CreateRestrictedToken(void)
|
||||
is_member = TRUE;
|
||||
ret = pCheckTokenMembership(r_token, token_groups->Groups[i].Sid, &is_member);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
- todo_wine ok(!is_member, "not a member\n");
|
||||
+ ok(!is_member, "not a member\n");
|
||||
|
||||
ret = GetTokenInformation(r_token, TokenGroups, NULL, 0, &size);
|
||||
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
@@ -5370,9 +5383,9 @@ static void test_CreateRestrictedToken(void)
|
||||
break;
|
||||
}
|
||||
|
||||
- todo_wine ok(groups2->Groups[j].Attributes & SE_GROUP_USE_FOR_DENY_ONLY,
|
||||
+ ok(groups2->Groups[j].Attributes & SE_GROUP_USE_FOR_DENY_ONLY,
|
||||
"got wrong attributes\n");
|
||||
- todo_wine ok((groups2->Groups[j].Attributes & SE_GROUP_ENABLED) == 0,
|
||||
+ ok((groups2->Groups[j].Attributes & SE_GROUP_ENABLED) == 0,
|
||||
"got wrong attributes\n");
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, groups2);
|
||||
@@ -5386,10 +5399,73 @@ static void test_CreateRestrictedToken(void)
|
||||
ret = GetTokenInformation(r_token, TokenImpersonationLevel, &level, size, &size);
|
||||
ok(ret, "got error %d\n", GetLastError());
|
||||
ok(level == SecurityImpersonation, "got level %u\n", type);
|
||||
+
|
||||
+ is_member = TRUE;
|
||||
+ ret = PrivilegeCheck(r_token, &privset, &is_member);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+ ok(!is_member, "Expected SeChangeNotifyPrivilege not to be enabled\n");
|
||||
+
|
||||
+ ret = GetTokenInformation(r_token, TokenPrivileges, NULL, 0, &size);
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
+ ret, GetLastError());
|
||||
+ privs = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = GetTokenInformation(r_token, TokenPrivileges, privs, size, &size);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ is_member = FALSE;
|
||||
+ for (j = 0; j < privs->PrivilegeCount; j++)
|
||||
+ {
|
||||
+ if (RtlEqualLuid(&privs->Privileges[j].Luid, &privset.Privilege[0].Luid))
|
||||
+ {
|
||||
+ is_member = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ok(!is_member, "Expected not to find privilege\n");
|
||||
+ HeapFree(GetProcessHeap(), 0, privs);
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, token_groups);
|
||||
CloseHandle(r_token);
|
||||
+
|
||||
+ ret = GetTokenInformation(token, TokenPrimaryGroup, NULL, 0, &size);
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
+ ret, GetLastError());
|
||||
+ primary_group = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = GetTokenInformation(token, TokenPrimaryGroup, primary_group, size, &size);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ /* disable primary group */
|
||||
+ sattr.Sid = primary_group->PrimaryGroup;
|
||||
+ sattr.Attributes = 0;
|
||||
+ r_token = NULL;
|
||||
+ ret = pCreateRestrictedToken(token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ is_member = TRUE;
|
||||
+ ret = pCheckTokenMembership(r_token, primary_group->PrimaryGroup, &is_member);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+ ok(!is_member, "not a member\n");
|
||||
+
|
||||
+ ret = GetTokenInformation(r_token, TokenPrimaryGroup, NULL, 0, &size);
|
||||
+ ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n",
|
||||
+ ret, GetLastError());
|
||||
+ primary_group2 = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ret = GetTokenInformation(r_token, TokenPrimaryGroup, primary_group2, size, &size);
|
||||
+ ok(ret, "got error %d\n", GetLastError());
|
||||
+
|
||||
+ ok(EqualSid(primary_group2->PrimaryGroup, primary_group->PrimaryGroup),
|
||||
+ "Expected same primary group\n");
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, primary_group2);
|
||||
+ }
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, primary_group);
|
||||
+ CloseHandle(r_token);
|
||||
+
|
||||
CloseHandle(token);
|
||||
CloseHandle(process_token);
|
||||
}
|
||||
/******************************************************************************
|
||||
--
|
||||
2.13.1
|
||||
2.20.1
|
||||
|
||||
|
@ -1,137 +0,0 @@
|
||||
From 64e8c4698047a079d4a538d1774f194529570453 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 3 Jun 2015 22:57:21 +0200
|
||||
Subject: [PATCH] winex11.drv: Allow changing the opengl pixel format on the
|
||||
desktop window.
|
||||
|
||||
This patch is not 100% correct because the old behavior was more similar to
|
||||
windows. However, Direct3D supports using the desktop window to create a
|
||||
context and since Wine translates Direct3D to OpenGL, using the desktop
|
||||
window will fail because of this limitation. Unless someone comes up with
|
||||
a more correct solution or finds an application that breaks because of this,
|
||||
it seems to be a suitable workaround as it fixes multiple applications.
|
||||
---
|
||||
dlls/d3d10_1/tests/d3d10_1.c | 16 +++++++++++++---
|
||||
dlls/d3d11/tests/d3d11.c | 22 +++++++++++++++++-----
|
||||
dlls/d3d9/tests/device.c | 16 ++++++++++++++++
|
||||
dlls/winex11.drv/opengl.c | 5 ++++-
|
||||
4 files changed, 50 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
|
||||
index 7c2b3ba..5d111d9 100644
|
||||
--- a/dlls/d3d10_1/tests/d3d10_1.c
|
||||
+++ b/dlls/d3d10_1/tests/d3d10_1.c
|
||||
@@ -252,9 +252,19 @@ static void test_create_device(void)
|
||||
swapchain_desc.OutputWindow = NULL;
|
||||
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
|
||||
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
|
||||
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
- ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
- ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ refcount = IDXGISwapChain_Release(swapchain);
|
||||
+ ok(!refcount, "Swapchain has %u references left.\n", refcount);
|
||||
+ refcount = ID3D10Device1_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
+ ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ }
|
||||
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D10Device1 *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 5a36bc2..1c07775 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -1705,11 +1705,23 @@ static void test_create_device(void)
|
||||
swapchain_desc.OutputWindow = NULL;
|
||||
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION,
|
||||
&swapchain_desc, &swapchain, &device, &feature_level, &immediate_context);
|
||||
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
- ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
- ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
- ok(!feature_level, "Got unexpected feature level %#x.\n", feature_level);
|
||||
- ok(!immediate_context, "Got unexpected immediate context pointer %p.\n", immediate_context);
|
||||
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ refcount = IDXGISwapChain_Release(swapchain);
|
||||
+ ok(!refcount, "Swapchain has %u references left.\n", refcount);
|
||||
+ refcount = ID3D11DeviceContext_Release(immediate_context);
|
||||
+ ok(!refcount, "Immediate context has %u references left.\n", refcount);
|
||||
+ refcount = ID3D11Device_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
+ ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ ok(!feature_level, "Got unexpected feature level %#x.\n", feature_level);
|
||||
+ ok(!immediate_context, "Got unexpected immediate context pointer %p.\n", immediate_context);
|
||||
+ }
|
||||
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D11Device *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 6084fd2..3480de0 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -12418,6 +12418,21 @@ static void test_stretch_rect(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_desktop_window(void)
|
||||
+{
|
||||
+ IDirect3DDevice9 *device = NULL;
|
||||
+ IDirect3D9 *d3d;
|
||||
+
|
||||
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
+ ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
+
|
||||
+ device = create_device(d3d, GetDesktopWindow(), NULL);
|
||||
+ ok(!!device, "Failed to created device on desktop window.\n");
|
||||
+
|
||||
+ if (device) IDirect3DDevice9_Release(device);
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+}
|
||||
+
|
||||
START_TEST(device)
|
||||
{
|
||||
WNDCLASSA wc = {0};
|
||||
@@ -12538,6 +12553,7 @@ START_TEST(device)
|
||||
test_format_unknown();
|
||||
test_destroyed_window();
|
||||
test_lockable_backbuffer();
|
||||
+ test_desktop_window();
|
||||
test_clip_planes_limits();
|
||||
test_swapchain_multisample_reset();
|
||||
test_stretch_rect();
|
||||
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
|
||||
index 01b92e3..0b5abb5 100644
|
||||
--- a/dlls/winex11.drv/opengl.c
|
||||
+++ b/dlls/winex11.drv/opengl.c
|
||||
@@ -1455,12 +1455,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
|
||||
|
||||
TRACE("(%p,%d)\n", hdc, format);
|
||||
|
||||
- if (!hwnd || hwnd == GetDesktopWindow())
|
||||
+ if (!hwnd)
|
||||
{
|
||||
WARN( "not a valid window DC %p/%p\n", hdc, hwnd );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ if (hwnd == GetDesktopWindow())
|
||||
+ FIXME("Using desktop window for OpenGL is not supported on windows\n");
|
||||
+
|
||||
fmt = get_pixel_format(gdi_display, format, FALSE /* Offscreen */);
|
||||
if (!fmt)
|
||||
{
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [18490] Allow to set pixel format for desktop window
|
@ -1,4 +1,4 @@
|
||||
From e06507db3cb448f938b04bc7f7587151a3f1de10 Mon Sep 17 00:00:00 2001
|
||||
From bf5df83b1be55676dcd539b79d0f2ceabb9409a5 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 4 Apr 2019 02:25:00 +0300
|
||||
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
2 files changed, 141 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index 1d176970c6a..9b6c9af5701 100644
|
||||
index 1d176970c6..9b6c9af570 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -2910,10 +2910,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface,
|
||||
@ -70,7 +70,7 @@ index 1d176970c6a..9b6c9af5701 100644
|
||||
|
||||
static const struct tss_lookup
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index 013d49c3658..a3ad1112c82 100644
|
||||
index bc58c1817c..3c643afe15 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -330,7 +330,7 @@ static IDirectDraw4 *create_ddraw(void)
|
||||
@ -132,8 +132,8 @@ index 013d49c3658..a3ad1112c82 100644
|
||||
static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h)
|
||||
{
|
||||
IDirect3DViewport3 *viewport;
|
||||
@@ -16335,6 +16346,116 @@ static void test_caps(void)
|
||||
IDirectDraw4_Release(ddraw);
|
||||
@@ -16383,6 +16394,116 @@ static void test_d32_support(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_texture_wrong_caps_(BOOL software)
|
||||
@ -249,12 +249,14 @@ index 013d49c3658..a3ad1112c82 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -16468,4 +16589,5 @@ START_TEST(ddraw4)
|
||||
@@ -16515,6 +16636,7 @@ START_TEST(ddraw4)
|
||||
test_gdi_surface();
|
||||
test_alphatest();
|
||||
test_clipper_refcount();
|
||||
test_caps();
|
||||
+ test_texture_wrong_caps();
|
||||
test_caps();
|
||||
test_d32_support();
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
2.20.1
|
||||
|
||||
|
@ -1,77 +0,0 @@
|
||||
From b4797a84f8cb931433b055c55030b0eb86320789 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Thomases <ken@codeweavers.com>
|
||||
Date: Sat, 18 Oct 2014 22:25:25 +0200
|
||||
Subject: gdi32: Also accept "\\.\DISPLAY<n>" devices names with <n> other than
|
||||
1 as display devices.
|
||||
|
||||
---
|
||||
dlls/gdi32/driver.c | 32 ++++++++++++++++++++++++++++----
|
||||
1 file changed, 28 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
|
||||
index 4529562..9e4f6f4 100644
|
||||
--- a/dlls/gdi32/driver.c
|
||||
+++ b/dlls/gdi32/driver.c
|
||||
@@ -109,6 +109,32 @@ static const struct gdi_dc_funcs *get_display_driver(void)
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
+ * is_display_device
|
||||
+ */
|
||||
+static BOOL is_display_device( LPCWSTR name )
|
||||
+{
|
||||
+ static const WCHAR display_deviceW[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y'};
|
||||
+ const WCHAR *p = name;
|
||||
+
|
||||
+ if (strncmpiW( name, display_deviceW, sizeof(display_deviceW) / sizeof(WCHAR) ))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ p += sizeof(display_deviceW) / sizeof(WCHAR);
|
||||
+
|
||||
+ if (!isdigitW( *p++ ))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ for (; *p; p++)
|
||||
+ {
|
||||
+ if (!isdigitW( *p ))
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**********************************************************************
|
||||
* DRIVER_load_driver
|
||||
*/
|
||||
const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name )
|
||||
@@ -116,10 +142,9 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name )
|
||||
HMODULE module;
|
||||
struct graphics_driver *driver, *new_driver;
|
||||
static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
|
||||
- static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
|
||||
|
||||
/* display driver is a special case */
|
||||
- if (!strcmpiW( name, displayW ) || !strcmpiW( name, display1W )) return get_display_driver();
|
||||
+ if (!strcmpiW( name, displayW ) || is_display_device( name )) return get_display_driver();
|
||||
|
||||
if ((module = GetModuleHandleW( name )))
|
||||
{
|
||||
@@ -774,13 +799,12 @@ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size )
|
||||
{
|
||||
static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
|
||||
static const WCHAR devicesW[] = { 'd','e','v','i','c','e','s',0 };
|
||||
- static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
|
||||
static const WCHAR empty_strW[] = { 0 };
|
||||
WCHAR *p;
|
||||
|
||||
/* display is a special case */
|
||||
if (!strcmpiW( device, displayW ) ||
|
||||
- !strcmpiW( device, display1W ))
|
||||
+ is_display_device( device ))
|
||||
{
|
||||
lstrcpynW( driver, displayW, size );
|
||||
return TRUE;
|
||||
--
|
||||
1.9.1
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "d83b71ebfdfe83704c313d7c11e8c87c9a8b0419"
|
||||
echo "887a57fadd00b39b266b421fe1a04ab09e0d917d"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -102,7 +102,6 @@ patch_enable_all ()
|
||||
enable_crypt32_MS_Root_Certs="$1"
|
||||
enable_d2d1_ID2D1Factory1="$1"
|
||||
enable_d3d11_Deferred_Context="$1"
|
||||
enable_d3d9_DesktopWindow="$1"
|
||||
enable_d3d9_Tests="$1"
|
||||
enable_d3dx9_32bpp_Alpha_Channel="$1"
|
||||
enable_d3dx9_36_BumpLuminance="$1"
|
||||
@ -431,9 +430,6 @@ patch_enable ()
|
||||
d3d11-Deferred_Context)
|
||||
enable_d3d11_Deferred_Context="$2"
|
||||
;;
|
||||
d3d9-DesktopWindow)
|
||||
enable_d3d9_DesktopWindow="$2"
|
||||
;;
|
||||
d3d9-Tests)
|
||||
enable_d3d9_Tests="$2"
|
||||
;;
|
||||
@ -2576,21 +2572,6 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-DesktopWindow
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#18490] Allow to set pixel format for desktop window
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d10_1/tests/d3d10_1.c, dlls/d3d11/tests/d3d11.c, dlls/d3d9/tests/device.c, dlls/winex11.drv/opengl.c
|
||||
# |
|
||||
if test "$enable_d3d9_DesktopWindow" -eq 1; then
|
||||
patch_apply d3d9-DesktopWindow/0001-winex11.drv-Allow-changing-the-opengl-pixel-format-o.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "winex11.drv: Allow changing the opengl pixel format on the desktop window.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-Tests
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -3871,13 +3852,11 @@ fi
|
||||
# | * [#41258] Return a more reasonable display DeviceID
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/gdi32/driver.c, dlls/winemac.drv/display.c
|
||||
# | * dlls/winemac.drv/display.c
|
||||
# |
|
||||
if test "$enable_gdi32_MultiMonitor" -eq 1; then
|
||||
patch_apply gdi32-MultiMonitor/0001-gdi32-Also-accept-.-DISPLAY-n-devices-names-with-n-o.patch
|
||||
patch_apply gdi32-MultiMonitor/0004-winemac-Make-GetMonitorInfo-give-a-different-device-.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Ken Thomases", "gdi32: Also accept \"\\\\.\\DISPLAY<n>\" devices names with <n> other than 1 as display devices.", 1 },';
|
||||
printf '%s\n' '+ { "Ken Thomases", "winemac: Make GetMonitorInfo() give a different device name (\\\\.\\DISPLAY<n>) to each monitor.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
@ -6178,11 +6157,13 @@ if test "$enable_uxtheme_GTK_Theming" -eq 1; then
|
||||
patch_apply uxtheme-GTK_Theming/0003-uxtheme-Correctly-render-buttons-with-GTK-3.14.0.patch
|
||||
patch_apply uxtheme-GTK_Theming/0004-uxtheme-Reset-FPU-flags-before-calling-GTK3-function.patch
|
||||
patch_apply uxtheme-GTK_Theming/0005-uxtheme-Fix-some-incorrect-error-codes.patch
|
||||
patch_apply uxtheme-GTK_Theming/0006-uxtheme-Dont-build-with-msvcrt.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Ivan Akulinchev", "uxtheme: Initial implementation of GTK backend.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "uxtheme: Correctly render buttons with GTK >= 3.14.0.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "uxtheme: Reset FPU flags before calling GTK3 functions.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "uxtheme: Fix some incorrect error codes.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "uxtheme: Dont build with msvcrt.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 54d8fb202add2fa8dc95fbdee431994886a84b90 Mon Sep 17 00:00:00 2001
|
||||
From f97de7500c086aa283e4b299f3f103a83438fd01 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 18 Nov 2016 22:31:29 +0800
|
||||
Subject: [PATCH] uxtheme: Protect CloseThemeData() from invalid input.
|
||||
@ -14,18 +14,18 @@ Testcase by Michael Müller <michael@fds-team.de>.
|
||||
3 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c
|
||||
index fe91494..7cd2145 100644
|
||||
index cee5aaf054e..5030e52a597 100644
|
||||
--- a/dlls/uxtheme/msstyles.c
|
||||
+++ b/dlls/uxtheme/msstyles.c
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "msstyles.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
+#include "wine/exception.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
@@ -57,6 +58,8 @@ static const WCHAR szThemesIniResource[] = {
|
||||
@@ -54,6 +55,8 @@ static const WCHAR szThemesIniResource[] = {
|
||||
't','h','e','m','e','s','_','i','n','i','\0'
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index fe91494..7cd2145 100644
|
||||
static PTHEME_FILE tfActiveTheme;
|
||||
|
||||
/***********************************************************************/
|
||||
@@ -221,6 +224,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
|
||||
@@ -218,6 +221,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
|
||||
pcls->partstate = ps->next;
|
||||
heap_free(ps);
|
||||
}
|
||||
@ -42,7 +42,7 @@ index fe91494..7cd2145 100644
|
||||
heap_free(pcls);
|
||||
}
|
||||
}
|
||||
@@ -452,6 +456,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
|
||||
@@ -449,6 +453,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
|
||||
if(cur) return cur;
|
||||
|
||||
cur = heap_alloc(sizeof(*cur));
|
||||
@ -50,7 +50,7 @@ index fe91494..7cd2145 100644
|
||||
cur->hTheme = tf->hTheme;
|
||||
lstrcpyW(cur->szAppName, pszAppName);
|
||||
lstrcpyW(cur->szClassName, pszClassName);
|
||||
@@ -1045,6 +1050,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
|
||||
@@ -1042,6 +1047,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
|
||||
*/
|
||||
HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc)
|
||||
{
|
||||
@ -75,7 +75,7 @@ index fe91494..7cd2145 100644
|
||||
return S_OK;
|
||||
}
|
||||
diff --git a/dlls/uxtheme/msstyles.h b/dlls/uxtheme/msstyles.h
|
||||
index 0b7e1ab..ba10ac8 100644
|
||||
index 0b7e1ab35cc..ba10ac82b82 100644
|
||||
--- a/dlls/uxtheme/msstyles.h
|
||||
+++ b/dlls/uxtheme/msstyles.h
|
||||
@@ -49,6 +49,7 @@ typedef struct _THEME_PARTSTATE {
|
||||
@ -96,10 +96,10 @@ index 0b7e1ab..ba10ac8 100644
|
||||
} THEME_IMAGE, *PTHEME_IMAGE;
|
||||
|
||||
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
|
||||
index 6989f44..d529279 100644
|
||||
index b3a861eaa6b..1cfafb30e2a 100644
|
||||
--- a/dlls/uxtheme/tests/system.c
|
||||
+++ b/dlls/uxtheme/tests/system.c
|
||||
@@ -198,6 +198,10 @@ static void test_OpenThemeData(void)
|
||||
@@ -189,6 +189,10 @@ static void test_OpenThemeData(void)
|
||||
"Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
|
||||
GetLastError());
|
||||
|
||||
@ -111,5 +111,5 @@ index 6989f44..d529279 100644
|
||||
{
|
||||
SetLastError(0xdeadbeef);
|
||||
--
|
||||
2.7.4
|
||||
2.20.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 02bb8239600800a77a9e27661a6c45baba7f4fa1 Mon Sep 17 00:00:00 2001
|
||||
From 96632f2ae19ee3fa157f58db5cf3f3aaebc52d2e Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Akulinchev <ivan.akulinchev@gmail.com>
|
||||
Date: Sat, 9 Feb 2019 15:18:54 -0600
|
||||
Subject: [PATCH] uxtheme: Initial implementation of GTK backend.
|
||||
@ -23,25 +23,25 @@ Additional changes by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
configure.ac | 20 +
|
||||
dlls/uxtheme/Makefile.in | 15 +
|
||||
dlls/uxtheme/draw.c | 30 ++
|
||||
dlls/uxtheme/gtk-button.c | 516 ++++++++++++++++++++++++
|
||||
dlls/uxtheme/gtk-combobox.c | 242 +++++++++++
|
||||
dlls/uxtheme/gtk-edit.c | 211 ++++++++++
|
||||
dlls/uxtheme/gtk-header.c | 128 ++++++
|
||||
dlls/uxtheme/gtk-listbox.c | 119 ++++++
|
||||
dlls/uxtheme/gtk-button.c | 516 +++++++++++++++++++
|
||||
dlls/uxtheme/gtk-combobox.c | 242 +++++++++
|
||||
dlls/uxtheme/gtk-edit.c | 211 ++++++++
|
||||
dlls/uxtheme/gtk-header.c | 128 +++++
|
||||
dlls/uxtheme/gtk-listbox.c | 119 +++++
|
||||
dlls/uxtheme/gtk-listview.c | 38 ++
|
||||
dlls/uxtheme/gtk-menu.c | 189 +++++++++
|
||||
dlls/uxtheme/gtk-rebar.c | 102 +++++
|
||||
dlls/uxtheme/gtk-status.c | 157 ++++++++
|
||||
dlls/uxtheme/gtk-tab.c | 207 ++++++++++
|
||||
dlls/uxtheme/gtk-toolbar.c | 171 ++++++++
|
||||
dlls/uxtheme/gtk-trackbar.c | 188 +++++++++
|
||||
dlls/uxtheme/gtk-window.c | 172 ++++++++
|
||||
dlls/uxtheme/gtk.c | 962 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/uxtheme/metric.c | 24 ++
|
||||
dlls/uxtheme/gtk-menu.c | 189 +++++++
|
||||
dlls/uxtheme/gtk-rebar.c | 102 ++++
|
||||
dlls/uxtheme/gtk-status.c | 157 ++++++
|
||||
dlls/uxtheme/gtk-tab.c | 207 ++++++++
|
||||
dlls/uxtheme/gtk-toolbar.c | 171 +++++++
|
||||
dlls/uxtheme/gtk-trackbar.c | 188 +++++++
|
||||
dlls/uxtheme/gtk-window.c | 172 +++++++
|
||||
dlls/uxtheme/gtk.c | 962 ++++++++++++++++++++++++++++++++++++
|
||||
dlls/uxtheme/metric.c | 24 +
|
||||
dlls/uxtheme/property.c | 40 ++
|
||||
dlls/uxtheme/system.c | 34 +-
|
||||
dlls/uxtheme/uxthemedll.h | 72 ++++
|
||||
dlls/uxtheme/uxthemegtk.h | 129 ++++++
|
||||
dlls/uxtheme/uxthemedll.h | 72 +++
|
||||
dlls/uxtheme/uxthemegtk.h | 129 +++++
|
||||
23 files changed, 3785 insertions(+), 1 deletion(-)
|
||||
create mode 100644 dlls/uxtheme/gtk-button.c
|
||||
create mode 100644 dlls/uxtheme/gtk-combobox.c
|
||||
@ -60,7 +60,7 @@ Additional changes by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
create mode 100644 dlls/uxtheme/uxthemegtk.h
|
||||
|
||||
diff --git a/aclocal.m4 b/aclocal.m4
|
||||
index ed0c3a8..4151fe7 100644
|
||||
index ed0c3a8317c..4151fe7f423 100644
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -126,6 +126,26 @@ test -z "$ac_libs" || ac_libs=`echo " $ac_libs" | sed 's/ -L\([[^/]]\)/ -L\$(top
|
||||
@ -91,7 +91,7 @@ index ed0c3a8..4151fe7 100644
|
||||
dnl
|
||||
dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]])
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c2f97e0..7034c42 100644
|
||||
index d6d51ebfc60..beb160aa389 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -56,6 +56,7 @@ AC_ARG_WITH(gsm, AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06
|
||||
@ -102,7 +102,7 @@ index c2f97e0..7034c42 100644
|
||||
AC_ARG_WITH(hal, AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)]))
|
||||
AC_ARG_WITH(inotify, AS_HELP_STRING([--without-inotify],[do not use inotify (filesystem change notifications)]))
|
||||
AC_ARG_WITH(jpeg, AS_HELP_STRING([--without-jpeg],[do not use JPEG]))
|
||||
@@ -1502,6 +1503,25 @@ fi
|
||||
@@ -1571,6 +1572,25 @@ fi
|
||||
WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"],
|
||||
[liblcms2 ${notice_platform}development files not found, Color Management won't be supported.])
|
||||
|
||||
@ -129,15 +129,17 @@ index c2f97e0..7034c42 100644
|
||||
if test "x$with_freetype" != "xno"
|
||||
then
|
||||
diff --git a/dlls/uxtheme/Makefile.in b/dlls/uxtheme/Makefile.in
|
||||
index c3fff30..e09f891 100644
|
||||
index 61817ee5468..d0409300230 100644
|
||||
--- a/dlls/uxtheme/Makefile.in
|
||||
+++ b/dlls/uxtheme/Makefile.in
|
||||
@@ -2,10 +2,25 @@ MODULE = uxtheme.dll
|
||||
@@ -2,12 +2,27 @@ MODULE = uxtheme.dll
|
||||
IMPORTLIB = uxtheme
|
||||
IMPORTS = user32 gdi32 advapi32
|
||||
DELAYIMPORTS = msimg32
|
||||
+EXTRAINCL = $(GTK3_CFLAGS)
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
buffer.c \
|
||||
draw.c \
|
||||
@ -159,10 +161,10 @@ index c3fff30..e09f891 100644
|
||||
metric.c \
|
||||
msstyles.c \
|
||||
diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c
|
||||
index 69c53b9..dbcbaab 100644
|
||||
index 3dcc58205b0..113793fed7e 100644
|
||||
--- a/dlls/uxtheme/draw.c
|
||||
+++ b/dlls/uxtheme/draw.c
|
||||
@@ -55,6 +55,10 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
|
||||
@@ -53,6 +53,10 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
|
||||
BOOL res;
|
||||
|
||||
TRACE("(%p,0x%08x\n", hwnd, dwFlags);
|
||||
@ -173,7 +175,7 @@ index 69c53b9..dbcbaab 100644
|
||||
res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
|
||||
UlongToHandle(dwFlags|0x80000000));
|
||||
/* 0x80000000 serves as a "flags set" flag */
|
||||
@@ -74,6 +78,9 @@ BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
|
||||
@@ -72,6 +76,9 @@ BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
|
||||
DWORD dwDialogTextureFlags;
|
||||
TRACE("(%p)\n", hwnd);
|
||||
|
||||
@ -183,7 +185,7 @@ index 69c53b9..dbcbaab 100644
|
||||
dwDialogTextureFlags = HandleToUlong( GetPropW( hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled) ));
|
||||
if (dwDialogTextureFlags == 0)
|
||||
/* Means EnableThemeDialogTexture wasn't called for this dialog */
|
||||
@@ -1027,6 +1034,9 @@ HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -1025,6 +1032,9 @@ HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -193,7 +195,7 @@ index 69c53b9..dbcbaab 100644
|
||||
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype);
|
||||
if (bgtype == BT_NONE) return S_OK;
|
||||
|
||||
@@ -1670,6 +1680,10 @@ HRESULT WINAPI DrawThemeTextEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId
|
||||
@@ -1668,6 +1678,10 @@ HRESULT WINAPI DrawThemeTextEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -204,7 +206,7 @@ index 69c53b9..dbcbaab 100644
|
||||
if (options->dwFlags & ~DTT_TEXTCOLOR)
|
||||
FIXME("unsupported flags 0x%08x\n", options->dwFlags);
|
||||
|
||||
@@ -1932,6 +1946,9 @@ HRESULT WINAPI GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -1930,6 +1944,9 @@ HRESULT WINAPI GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!pRect || !pRegion)
|
||||
return E_POINTER;
|
||||
|
||||
@ -214,7 +216,7 @@ index 69c53b9..dbcbaab 100644
|
||||
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype);
|
||||
if(bgtype == BT_IMAGEFILE) {
|
||||
hr = create_image_bg_region(hTheme, iPartId, iStateId, pRect, pRegion);
|
||||
@@ -1983,6 +2000,9 @@ HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -1981,6 +1998,9 @@ HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -224,7 +226,7 @@ index 69c53b9..dbcbaab 100644
|
||||
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype);
|
||||
if (bgtype == BT_NONE)
|
||||
/* do nothing */;
|
||||
@@ -2019,6 +2039,10 @@ HRESULT WINAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -2017,6 +2037,10 @@ HRESULT WINAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -235,7 +237,7 @@ index 69c53b9..dbcbaab 100644
|
||||
if(pBoundingRect)
|
||||
rt = *pBoundingRect;
|
||||
|
||||
@@ -2056,6 +2080,9 @@ HRESULT WINAPI GetThemeTextMetrics(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -2054,6 +2078,9 @@ HRESULT WINAPI GetThemeTextMetrics(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -245,7 +247,7 @@ index 69c53b9..dbcbaab 100644
|
||||
hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, TMT_FONT, &logfont);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hFont = CreateFontIndirectW(&logfont);
|
||||
@@ -2094,6 +2121,9 @@ BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId,
|
||||
@@ -2092,6 +2119,9 @@ BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId,
|
||||
if(!hTheme)
|
||||
return FALSE;
|
||||
|
||||
@ -257,7 +259,7 @@ index 69c53b9..dbcbaab 100644
|
||||
if (bgtype != BT_IMAGEFILE) return FALSE;
|
||||
diff --git a/dlls/uxtheme/gtk-button.c b/dlls/uxtheme/gtk-button.c
|
||||
new file mode 100644
|
||||
index 0000000..f8b3da0
|
||||
index 00000000000..f8b3da0dddd
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-button.c
|
||||
@@ -0,0 +1,516 @@
|
||||
@ -779,7 +781,7 @@ index 0000000..f8b3da0
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-combobox.c b/dlls/uxtheme/gtk-combobox.c
|
||||
new file mode 100644
|
||||
index 0000000..60bcb0e
|
||||
index 00000000000..60bcb0e6cb0
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-combobox.c
|
||||
@@ -0,0 +1,242 @@
|
||||
@ -1027,7 +1029,7 @@ index 0000000..60bcb0e
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-edit.c b/dlls/uxtheme/gtk-edit.c
|
||||
new file mode 100644
|
||||
index 0000000..dee00d7
|
||||
index 00000000000..dee00d7b929
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-edit.c
|
||||
@@ -0,0 +1,211 @@
|
||||
@ -1244,7 +1246,7 @@ index 0000000..dee00d7
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-header.c b/dlls/uxtheme/gtk-header.c
|
||||
new file mode 100644
|
||||
index 0000000..8a5b235
|
||||
index 00000000000..8a5b235e36c
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-header.c
|
||||
@@ -0,0 +1,128 @@
|
||||
@ -1378,7 +1380,7 @@ index 0000000..8a5b235
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-listbox.c b/dlls/uxtheme/gtk-listbox.c
|
||||
new file mode 100644
|
||||
index 0000000..6e27592
|
||||
index 00000000000..6e2759259f6
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-listbox.c
|
||||
@@ -0,0 +1,119 @@
|
||||
@ -1503,7 +1505,7 @@ index 0000000..6e27592
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-listview.c b/dlls/uxtheme/gtk-listview.c
|
||||
new file mode 100644
|
||||
index 0000000..9b98983
|
||||
index 00000000000..9b98983f181
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-listview.c
|
||||
@@ -0,0 +1,38 @@
|
||||
@ -1547,7 +1549,7 @@ index 0000000..9b98983
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-menu.c b/dlls/uxtheme/gtk-menu.c
|
||||
new file mode 100644
|
||||
index 0000000..5d00afd
|
||||
index 00000000000..5d00afdff0e
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-menu.c
|
||||
@@ -0,0 +1,189 @@
|
||||
@ -1742,7 +1744,7 @@ index 0000000..5d00afd
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-rebar.c b/dlls/uxtheme/gtk-rebar.c
|
||||
new file mode 100644
|
||||
index 0000000..5d5b5a4
|
||||
index 00000000000..5d5b5a486c9
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-rebar.c
|
||||
@@ -0,0 +1,102 @@
|
||||
@ -1850,7 +1852,7 @@ index 0000000..5d5b5a4
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-status.c b/dlls/uxtheme/gtk-status.c
|
||||
new file mode 100644
|
||||
index 0000000..38f8646
|
||||
index 00000000000..38f8646e747
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-status.c
|
||||
@@ -0,0 +1,157 @@
|
||||
@ -2013,7 +2015,7 @@ index 0000000..38f8646
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-tab.c b/dlls/uxtheme/gtk-tab.c
|
||||
new file mode 100644
|
||||
index 0000000..d6417f6
|
||||
index 00000000000..d6417f64326
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-tab.c
|
||||
@@ -0,0 +1,207 @@
|
||||
@ -2226,7 +2228,7 @@ index 0000000..d6417f6
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-toolbar.c b/dlls/uxtheme/gtk-toolbar.c
|
||||
new file mode 100644
|
||||
index 0000000..b23cf0b
|
||||
index 00000000000..b23cf0b4ecb
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-toolbar.c
|
||||
@@ -0,0 +1,171 @@
|
||||
@ -2403,7 +2405,7 @@ index 0000000..b23cf0b
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-trackbar.c b/dlls/uxtheme/gtk-trackbar.c
|
||||
new file mode 100644
|
||||
index 0000000..a58540e
|
||||
index 00000000000..a58540e3051
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-trackbar.c
|
||||
@@ -0,0 +1,188 @@
|
||||
@ -2597,7 +2599,7 @@ index 0000000..a58540e
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk-window.c b/dlls/uxtheme/gtk-window.c
|
||||
new file mode 100644
|
||||
index 0000000..657cfb0
|
||||
index 00000000000..657cfb03690
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk-window.c
|
||||
@@ -0,0 +1,172 @@
|
||||
@ -2775,7 +2777,7 @@ index 0000000..657cfb0
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/gtk.c b/dlls/uxtheme/gtk.c
|
||||
new file mode 100644
|
||||
index 0000000..9459b1f
|
||||
index 00000000000..9459b1f5c33
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/gtk.c
|
||||
@@ -0,0 +1,962 @@
|
||||
@ -3742,10 +3744,10 @@ index 0000000..9459b1f
|
||||
+
|
||||
+#endif /* HAVE_GTK_GTK_H */
|
||||
diff --git a/dlls/uxtheme/metric.c b/dlls/uxtheme/metric.c
|
||||
index 073422f..244187d 100644
|
||||
index 2d5a09d0256..77eebc780a1 100644
|
||||
--- a/dlls/uxtheme/metric.c
|
||||
+++ b/dlls/uxtheme/metric.c
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "tmschema.h"
|
||||
|
||||
#include "msstyles.h"
|
||||
@ -3753,7 +3755,7 @@ index 073422f..244187d 100644
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -46,6 +47,10 @@ BOOL WINAPI GetThemeSysBool(HTHEME hTheme, int iBoolID)
|
||||
@@ -44,6 +45,10 @@ BOOL WINAPI GetThemeSysBool(HTHEME hTheme, int iBoolID)
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p, %d)\n", hTheme, iBoolID);
|
||||
@ -3764,7 +3766,7 @@ index 073422f..244187d 100644
|
||||
SetLastError(0);
|
||||
if(hTheme) {
|
||||
if((tp = MSSTYLES_FindMetric(TMT_BOOL, iBoolID))) {
|
||||
@@ -76,6 +81,10 @@ COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
|
||||
@@ -74,6 +79,10 @@ COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
|
||||
PTHEME_PROPERTY tp;
|
||||
|
||||
TRACE("(%p, %d)\n", hTheme, iColorID);
|
||||
@ -3775,7 +3777,7 @@ index 073422f..244187d 100644
|
||||
SetLastError(0);
|
||||
if(hTheme) {
|
||||
if((tp = MSSTYLES_FindMetric(TMT_COLOR, iColorID))) {
|
||||
@@ -108,6 +117,10 @@ HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf)
|
||||
@@ -106,6 +115,10 @@ HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf)
|
||||
PTHEME_PROPERTY tp;
|
||||
|
||||
TRACE("(%p, %d)\n", hTheme, iFontID);
|
||||
@ -3786,7 +3788,7 @@ index 073422f..244187d 100644
|
||||
if(hTheme) {
|
||||
if((tp = MSSTYLES_FindMetric(TMT_FONT, iFontID))) {
|
||||
HDC hdc = GetDC(NULL);
|
||||
@@ -151,6 +164,10 @@ HRESULT WINAPI GetThemeSysInt(HTHEME hTheme, int iIntID, int *piValue)
|
||||
@@ -149,6 +162,10 @@ HRESULT WINAPI GetThemeSysInt(HTHEME hTheme, int iIntID, int *piValue)
|
||||
TRACE("(%p, %d)\n", hTheme, iIntID);
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
@ -3797,7 +3799,7 @@ index 073422f..244187d 100644
|
||||
if(iIntID < TMT_FIRSTINT || iIntID > TMT_LASTINT) {
|
||||
WARN("Unknown IntID: %d\n", iIntID);
|
||||
return STG_E_INVALIDPARAMETER;
|
||||
@@ -180,6 +197,9 @@ int WINAPI GetThemeSysSize(HTHEME hTheme, int iSizeID)
|
||||
@@ -178,6 +195,9 @@ int WINAPI GetThemeSysSize(HTHEME hTheme, int iSizeID)
|
||||
PTHEME_PROPERTY tp;
|
||||
int i, id = -1;
|
||||
|
||||
@ -3807,7 +3809,7 @@ index 073422f..244187d 100644
|
||||
if(hTheme) {
|
||||
for(i=0; i<ARRAY_SIZE(metricMap); i+=2) {
|
||||
if(metricMap[i] == iSizeID) {
|
||||
@@ -215,6 +235,10 @@ HRESULT WINAPI GetThemeSysString(HTHEME hTheme, int iStringID,
|
||||
@@ -213,6 +233,10 @@ HRESULT WINAPI GetThemeSysString(HTHEME hTheme, int iStringID,
|
||||
TRACE("(%p, %d)\n", hTheme, iStringID);
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
@ -3819,10 +3821,10 @@ index 073422f..244187d 100644
|
||||
WARN("Unknown StringID: %d\n", iStringID);
|
||||
return STG_E_INVALIDPARAMETER;
|
||||
diff --git a/dlls/uxtheme/property.c b/dlls/uxtheme/property.c
|
||||
index 0e077ae..ada4828 100644
|
||||
index 93a72ab9189..2a56466dfc9 100644
|
||||
--- a/dlls/uxtheme/property.c
|
||||
+++ b/dlls/uxtheme/property.c
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "tmschema.h"
|
||||
|
||||
#include "msstyles.h"
|
||||
@ -3830,7 +3832,7 @@ index 0e077ae..ada4828 100644
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -48,6 +49,9 @@ HRESULT WINAPI GetThemeBool(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -46,6 +47,9 @@ HRESULT WINAPI GetThemeBool(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3840,7 +3842,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_BOOL, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyBool(tp, pfVal);
|
||||
@@ -65,6 +69,9 @@ HRESULT WINAPI GetThemeColor(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -63,6 +67,9 @@ HRESULT WINAPI GetThemeColor(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3850,7 +3852,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_COLOR, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyColor(tp, pColor);
|
||||
@@ -84,6 +91,9 @@ HRESULT WINAPI GetThemeEnumValue(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -82,6 +89,9 @@ HRESULT WINAPI GetThemeEnumValue(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3860,7 +3862,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_ENUM, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
|
||||
@@ -108,6 +118,9 @@ HRESULT WINAPI GetThemeFilename(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -106,6 +116,9 @@ HRESULT WINAPI GetThemeFilename(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3870,7 +3872,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_FILENAME, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyString(tp, pszThemeFilename, cchMaxBuffChars);
|
||||
@@ -125,6 +138,9 @@ HRESULT WINAPI GetThemeFont(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -123,6 +136,9 @@ HRESULT WINAPI GetThemeFont(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3880,7 +3882,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_FONT, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyFont(tp, hdc, pFont);
|
||||
@@ -142,6 +158,9 @@ HRESULT WINAPI GetThemeInt(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -140,6 +156,9 @@ HRESULT WINAPI GetThemeInt(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3890,7 +3892,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_INT, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyInt(tp, piVal);
|
||||
@@ -159,6 +178,9 @@ HRESULT WINAPI GetThemeIntList(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -157,6 +176,9 @@ HRESULT WINAPI GetThemeIntList(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3900,7 +3902,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_INTLIST, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyIntList(tp, pIntList);
|
||||
@@ -176,6 +198,9 @@ HRESULT WINAPI GetThemePosition(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -174,6 +196,9 @@ HRESULT WINAPI GetThemePosition(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3910,7 +3912,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_POSITION, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyPosition(tp, pPoint);
|
||||
@@ -193,6 +218,9 @@ HRESULT WINAPI GetThemeRect(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -191,6 +216,9 @@ HRESULT WINAPI GetThemeRect(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3920,7 +3922,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_RECT, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyRect(tp, pRect);
|
||||
@@ -210,6 +238,9 @@ HRESULT WINAPI GetThemeString(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -208,6 +236,9 @@ HRESULT WINAPI GetThemeString(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3930,7 +3932,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_STRING, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyString(tp, pszBuff, cchMaxBuffChars);
|
||||
@@ -229,6 +260,9 @@ HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -227,6 +258,9 @@ HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3940,7 +3942,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_MARGINS, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
return MSSTYLES_GetPropertyMargins(tp, prc, pMargins);
|
||||
@@ -248,6 +282,9 @@ HRESULT WINAPI GetThemeMetric(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
@@ -246,6 +280,9 @@ HRESULT WINAPI GetThemeMetric(HTHEME hTheme, HDC hdc, int iPartId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3950,7 +3952,7 @@ index 0e077ae..ada4828 100644
|
||||
if(!(tp = MSSTYLES_FindProperty(hTheme, iPartId, iStateId, 0, iPropId)))
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
switch(tp->iPrimitiveType) {
|
||||
@@ -288,6 +325,9 @@ HRESULT WINAPI GetThemePropertyOrigin(HTHEME hTheme, int iPartId, int iStateId,
|
||||
@@ -286,6 +323,9 @@ HRESULT WINAPI GetThemePropertyOrigin(HTHEME hTheme, int iPartId, int iStateId,
|
||||
if(!hTheme)
|
||||
return E_HANDLE;
|
||||
|
||||
@ -3961,10 +3963,10 @@ index 0e077ae..ada4828 100644
|
||||
*pOrigin = PO_NOTFOUND;
|
||||
return S_OK;
|
||||
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c
|
||||
index c898ad3..2f7d40f 100644
|
||||
index 6e9c0f22369..a5e3ead0986 100644
|
||||
--- a/dlls/uxtheme/system.c
|
||||
+++ b/dlls/uxtheme/system.c
|
||||
@@ -558,6 +558,10 @@ BOOL WINAPI IsAppThemed(void)
|
||||
@@ -556,6 +556,10 @@ BOOL WINAPI IsAppThemed(void)
|
||||
BOOL WINAPI IsThemeActive(void)
|
||||
{
|
||||
TRACE("\n");
|
||||
@ -3975,7 +3977,7 @@ index c898ad3..2f7d40f 100644
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return bThemeActive;
|
||||
}
|
||||
@@ -587,6 +591,9 @@ HRESULT WINAPI EnableTheming(BOOL fEnable)
|
||||
@@ -585,6 +589,9 @@ HRESULT WINAPI EnableTheming(BOOL fEnable)
|
||||
|
||||
TRACE("(%d)\n", fEnable);
|
||||
|
||||
@ -3985,7 +3987,7 @@ index c898ad3..2f7d40f 100644
|
||||
if(fEnable != bThemeActive) {
|
||||
if(fEnable)
|
||||
UXTHEME_BackupSystemMetrics();
|
||||
@@ -659,7 +666,9 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
|
||||
@@ -657,7 +664,9 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
|
||||
if(flags)
|
||||
FIXME("unhandled flags: %x\n", flags);
|
||||
|
||||
@ -3996,7 +3998,7 @@ index c898ad3..2f7d40f 100644
|
||||
{
|
||||
pszAppName = UXTHEME_GetWindowProperty(hwnd, atSubAppName, szAppBuff, ARRAY_SIZE(szAppBuff));
|
||||
/* If SetWindowTheme was used on the window, that overrides the class list passed to this function */
|
||||
@@ -670,6 +679,7 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
|
||||
@@ -668,6 +677,7 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
|
||||
if (pszUseClassList)
|
||||
hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList);
|
||||
}
|
||||
@ -4004,7 +4006,7 @@ index c898ad3..2f7d40f 100644
|
||||
if(IsWindow(hwnd))
|
||||
SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme);
|
||||
TRACE(" = %p\n", hTheme);
|
||||
@@ -712,6 +722,10 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
|
||||
@@ -710,6 +720,10 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
|
||||
HRESULT hr;
|
||||
TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName),
|
||||
debugstr_w(pszSubIdList));
|
||||
@ -4015,7 +4017,7 @@ index c898ad3..2f7d40f 100644
|
||||
hr = UXTHEME_SetWindowProperty(hwnd, atSubAppName, pszSubAppName);
|
||||
if(SUCCEEDED(hr))
|
||||
hr = UXTHEME_SetWindowProperty(hwnd, atSubIdList, pszSubIdList);
|
||||
@@ -737,6 +751,10 @@ HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars,
|
||||
@@ -735,6 +749,10 @@ HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars,
|
||||
LPWSTR pszColorBuff, int cchMaxColorChars,
|
||||
LPWSTR pszSizeBuff, int cchMaxSizeChars)
|
||||
{
|
||||
@ -4026,7 +4028,7 @@ index c898ad3..2f7d40f 100644
|
||||
if(!bThemeActive)
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
if(pszThemeFileName) lstrcpynW(pszThemeFileName, szCurrentTheme, dwMaxNameChars);
|
||||
@@ -750,6 +768,8 @@ HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars,
|
||||
@@ -748,6 +766,8 @@ HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars,
|
||||
*/
|
||||
DWORD WINAPI GetThemeAppProperties(void)
|
||||
{
|
||||
@ -4035,7 +4037,7 @@ index c898ad3..2f7d40f 100644
|
||||
return dwThemeAppProperties;
|
||||
}
|
||||
|
||||
@@ -759,6 +779,10 @@ DWORD WINAPI GetThemeAppProperties(void)
|
||||
@@ -757,6 +777,10 @@ DWORD WINAPI GetThemeAppProperties(void)
|
||||
void WINAPI SetThemeAppProperties(DWORD dwFlags)
|
||||
{
|
||||
TRACE("(0x%08x)\n", dwFlags);
|
||||
@ -4046,7 +4048,7 @@ index c898ad3..2f7d40f 100644
|
||||
dwThemeAppProperties = dwFlags;
|
||||
}
|
||||
|
||||
@@ -770,6 +794,10 @@ HRESULT WINAPI CloseThemeData(HTHEME hTheme)
|
||||
@@ -768,6 +792,10 @@ HRESULT WINAPI CloseThemeData(HTHEME hTheme)
|
||||
TRACE("(%p)\n", hTheme);
|
||||
if(!hTheme || hTheme == INVALID_HANDLE_VALUE)
|
||||
return E_HANDLE;
|
||||
@ -4057,7 +4059,7 @@ index c898ad3..2f7d40f 100644
|
||||
return MSSTYLES_CloseThemeClass(hTheme);
|
||||
}
|
||||
|
||||
@@ -797,6 +825,10 @@ BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
|
||||
@@ -795,6 +823,10 @@ BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
|
||||
SetLastError(E_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
@ -4069,7 +4071,7 @@ index c898ad3..2f7d40f 100644
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
diff --git a/dlls/uxtheme/uxthemedll.h b/dlls/uxtheme/uxthemedll.h
|
||||
index fee152c..cdc5958 100644
|
||||
index fee152c9c34..cdc5958d7c7 100644
|
||||
--- a/dlls/uxtheme/uxthemedll.h
|
||||
+++ b/dlls/uxtheme/uxthemedll.h
|
||||
@@ -21,6 +21,14 @@
|
||||
@ -4160,7 +4162,7 @@ index fee152c..cdc5958 100644
|
||||
/* "Cheap" binary alpha blending - but possibly faster */
|
||||
diff --git a/dlls/uxtheme/uxthemegtk.h b/dlls/uxtheme/uxthemegtk.h
|
||||
new file mode 100644
|
||||
index 0000000..87cd045
|
||||
index 00000000000..87cd0456f8d
|
||||
--- /dev/null
|
||||
+++ b/dlls/uxtheme/uxthemegtk.h
|
||||
@@ -0,0 +1,129 @@
|
||||
@ -4294,5 +4296,5 @@ index 0000000..87cd045
|
||||
+
|
||||
+#endif /* UXTHEMEGTK_H */
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 1b00043f71c020e59d28bbc79f78a17bc3b4fd86 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 26 Jun 2019 10:38:23 +1000
|
||||
Subject: [PATCH] uxtheme: Dont build with msvcrt
|
||||
|
||||
---
|
||||
dlls/uxtheme/Makefile.in | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/uxtheme/Makefile.in b/dlls/uxtheme/Makefile.in
|
||||
index d0409300230..e09f891ee48 100644
|
||||
--- a/dlls/uxtheme/Makefile.in
|
||||
+++ b/dlls/uxtheme/Makefile.in
|
||||
@@ -4,8 +4,6 @@ IMPORTS = user32 gdi32 advapi32
|
||||
DELAYIMPORTS = msimg32
|
||||
EXTRAINCL = $(GTK3_CFLAGS)
|
||||
|
||||
-EXTRADLLFLAGS = -mno-cygwin
|
||||
-
|
||||
C_SRCS = \
|
||||
buffer.c \
|
||||
draw.c \
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 25a35989280c737958a1b5a0a2222c6b3d312439 Mon Sep 17 00:00:00 2001
|
||||
From 9ab80dcada9f3756c0f23d7b65d5f9cf4189318b Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 20:28:35 +0300
|
||||
Subject: [PATCH] wined3d: Support indexed vertex blending.
|
||||
@ -6,17 +6,17 @@ Subject: [PATCH] wined3d: Support indexed vertex blending.
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 6 +-
|
||||
dlls/wined3d/glsl_shader.c | 172 +++++++++++++++++++++++++++++++++------
|
||||
dlls/wined3d/glsl_shader.c | 172 ++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/utils.c | 1 +
|
||||
dlls/wined3d/vertexdeclaration.c | 9 ++
|
||||
dlls/wined3d/wined3d_private.h | 11 ++-
|
||||
dlls/wined3d/wined3d_private.h | 11 +-
|
||||
5 files changed, 169 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 5d5ca38..f3493a3 100644
|
||||
index 38d702b65d5..f36524da562 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21678,7 +21678,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21679,7 +21679,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
|
||||
if (caps.MaxVertexBlendMatrixIndex < 7 || caps.MaxVertexBlendMatrices < 4)
|
||||
{
|
||||
@ -25,7 +25,7 @@ index 5d5ca38..f3493a3 100644
|
||||
test_id_str, caps.MaxVertexBlendMatrices, caps.MaxVertexBlendMatrixIndex);
|
||||
return;
|
||||
}
|
||||
@@ -21835,7 +21835,7 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21836,7 +21836,7 @@ static void test_indexed_vertex_blending(void)
|
||||
memset(&caps, 0, sizeof(caps));
|
||||
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
|
||||
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
|
||||
@ -34,7 +34,7 @@ index 5d5ca38..f3493a3 100644
|
||||
caps.MaxVertexBlendMatrixIndex);
|
||||
|
||||
do_test_indexed_vertex_blending(device,"IVB software");
|
||||
@@ -21861,7 +21861,7 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21862,7 +21862,7 @@ static void test_indexed_vertex_blending(void)
|
||||
memset(&caps, 0, sizeof(caps));
|
||||
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
|
||||
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
|
||||
@ -44,7 +44,7 @@ index 5d5ca38..f3493a3 100644
|
||||
|
||||
hr = IDirect3DDevice9_SetSoftwareVertexProcessing(device, FALSE);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index e3f3da0..aec384f 100644
|
||||
index af02740cab9..75548afc8ea 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -150,6 +150,9 @@ struct shader_glsl_priv
|
||||
@ -65,7 +65,7 @@ index e3f3da0..aec384f 100644
|
||||
GLint projection_matrix_location;
|
||||
GLint normal_matrix_location;
|
||||
GLint texture_matrix_location[WINED3D_MAX_TEXTURES];
|
||||
@@ -1610,10 +1614,10 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1600,10 +1604,10 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
{
|
||||
unsigned int base, count;
|
||||
|
||||
@ -78,7 +78,7 @@ index e3f3da0..aec384f 100644
|
||||
if (priv->ubo_vs_c == -1)
|
||||
{
|
||||
GL_EXTCALL(glGenBuffers(1, &priv->ubo_vs_c));
|
||||
@@ -1626,6 +1630,21 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1616,6 +1620,21 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
GL_EXTCALL(glBindBufferBase(GL_UNIFORM_BUFFER, base, priv->ubo_vs_c));
|
||||
checkGLcall("glBindBufferBase");
|
||||
}
|
||||
@ -100,7 +100,7 @@ index e3f3da0..aec384f 100644
|
||||
ctx_data->ubo_bound = TRUE;
|
||||
}
|
||||
|
||||
@@ -1672,28 +1691,41 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1662,28 +1681,41 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
}
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_FFP_MODELVIEW)
|
||||
@ -111,7 +111,7 @@ index e3f3da0..aec384f 100644
|
||||
- GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[0], 1, FALSE, &mat._11));
|
||||
- checkGLcall("glUniformMatrix4fv");
|
||||
-
|
||||
shader_glsl_ffp_vertex_normalmatrix_uniform(context, state, prog);
|
||||
shader_glsl_ffp_vertex_normalmatrix_uniform(context_gl, state, prog);
|
||||
- }
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_FFP_VERTEXBLEND)
|
||||
@ -156,7 +156,7 @@ index e3f3da0..aec384f 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8991,8 +9023,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -8977,8 +9009,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
{
|
||||
{"vec4", "ffp_attrib_position"}, /* WINED3D_FFP_POSITION */
|
||||
{"vec4", "ffp_attrib_blendweight"}, /* WINED3D_FFP_BLENDWEIGHT */
|
||||
@ -166,7 +166,7 @@ index e3f3da0..aec384f 100644
|
||||
{"vec3", "ffp_attrib_normal"}, /* WINED3D_FFP_NORMAL */
|
||||
{"float", "ffp_attrib_psize"}, /* WINED3D_FFP_PSIZE */
|
||||
{"vec4", "ffp_attrib_diffuse"}, /* WINED3D_FFP_DIFFUSE */
|
||||
@@ -9008,6 +9039,9 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -8994,6 +9025,9 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
string_buffer_clear(buffer);
|
||||
|
||||
shader_glsl_add_version_declaration(buffer, gl_info);
|
||||
@ -176,7 +176,7 @@ index e3f3da0..aec384f 100644
|
||||
|
||||
if (shader_glsl_use_explicit_attrib_location(gl_info))
|
||||
shader_addline(buffer, "#extension GL_ARB_explicit_attrib_location : enable\n");
|
||||
@@ -9022,7 +9056,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9008,7 +9042,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
}
|
||||
shader_addline(buffer, "\n");
|
||||
|
||||
@ -196,7 +196,7 @@ index e3f3da0..aec384f 100644
|
||||
shader_addline(buffer, "uniform mat4 ffp_projection_matrix;\n");
|
||||
shader_addline(buffer, "uniform mat3 ffp_normal_matrix;\n");
|
||||
shader_addline(buffer, "uniform mat4 ffp_texture_matrix[%u];\n", WINED3D_MAX_TEXTURES);
|
||||
@@ -9084,6 +9129,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9070,6 +9115,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
shader_addline(buffer, "\nvoid main()\n{\n");
|
||||
shader_addline(buffer, "float m;\n");
|
||||
shader_addline(buffer, "vec3 r;\n");
|
||||
@ -205,7 +205,7 @@ index e3f3da0..aec384f 100644
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(attrib_info); ++i)
|
||||
{
|
||||
@@ -9113,8 +9160,21 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9099,8 +9146,21 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
shader_addline(buffer, "ffp_attrib_blendweight[%u] -= ffp_attrib_blendweight[%u];\n", settings->vertexblends, i);
|
||||
|
||||
shader_addline(buffer, "vec4 ec_pos = vec4(0.0);\n");
|
||||
@ -229,7 +229,7 @@ index e3f3da0..aec384f 100644
|
||||
|
||||
shader_addline(buffer, "gl_Position = ffp_projection_matrix * ec_pos;\n");
|
||||
if (settings->clipping)
|
||||
@@ -9138,7 +9198,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9124,7 +9184,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
else
|
||||
{
|
||||
for (i = 0; i < settings->vertexblends + 1; ++i)
|
||||
@ -250,7 +250,7 @@ index e3f3da0..aec384f 100644
|
||||
}
|
||||
|
||||
if (settings->normalize)
|
||||
@@ -10003,6 +10075,28 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -9989,6 +10061,28 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
string_buffer_sprintf(name, "ffp_modelview_matrix[%u]", i);
|
||||
vs->modelview_matrix_location[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
|
||||
}
|
||||
@ -279,7 +279,7 @@ index e3f3da0..aec384f 100644
|
||||
vs->projection_matrix_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_projection_matrix"));
|
||||
vs->normal_matrix_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_normal_matrix"));
|
||||
for (i = 0; i < WINED3D_MAX_TEXTURES; ++i)
|
||||
@@ -10582,7 +10676,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10570,7 +10664,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW
|
||||
| WINED3D_SHADER_CONST_FFP_PROJ;
|
||||
|
||||
@ -288,7 +288,7 @@ index e3f3da0..aec384f 100644
|
||||
{
|
||||
if (entry->vs.modelview_matrix_location[i] != -1)
|
||||
{
|
||||
@@ -10591,6 +10685,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10579,6 +10673,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ index e3f3da0..aec384f 100644
|
||||
for (i = 0; i < WINED3D_MAX_TEXTURES; ++i)
|
||||
{
|
||||
if (entry->vs.texture_matrix_location[i] != -1)
|
||||
@@ -11128,7 +11225,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11117,7 +11214,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
fragment_pipe->get_caps(device->adapter, &fragment_caps);
|
||||
priv->ffp_proj_control = fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_PROJ_CONTROL;
|
||||
priv->legacy_lighting = device->wined3d->flags & WINED3D_LEGACY_FFP_LIGHTING;
|
||||
@ -317,7 +317,7 @@ index e3f3da0..aec384f 100644
|
||||
device->vertex_priv = vertex_priv;
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
@@ -11161,6 +11268,14 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
@@ -11150,6 +11257,14 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
string_buffer_free(&priv->shader_buffer);
|
||||
priv->fragment_pipe->free_private(device, context);
|
||||
priv->vertex_pipe->vp_free(device, context);
|
||||
@ -332,7 +332,7 @@ index e3f3da0..aec384f 100644
|
||||
|
||||
if (priv->ubo_vs_c != -1)
|
||||
{
|
||||
@@ -11580,7 +11695,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter,
|
||||
@@ -11569,7 +11684,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter,
|
||||
caps->ffp_generic_attributes = TRUE;
|
||||
caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS;
|
||||
caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS;
|
||||
@ -345,7 +345,7 @@ index e3f3da0..aec384f 100644
|
||||
caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
|
||||
| WINED3DVTXPCAPS_MATERIALSOURCE7
|
||||
| WINED3DVTXPCAPS_VERTEXFOG
|
||||
@@ -11780,7 +11899,8 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
|
||||
@@ -11769,7 +11888,8 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
|
||||
static void glsl_vertex_pipe_world(struct wined3d_context *context,
|
||||
const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -356,10 +356,10 @@ index e3f3da0..aec384f 100644
|
||||
|
||||
static void glsl_vertex_pipe_vertexblend(struct wined3d_context *context,
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index a84417d..b840e62 100644
|
||||
index 9f033936666..5509afd769f 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -6519,6 +6519,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
|
||||
@@ -6501,6 +6501,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
|
||||
settings->flatshading = FALSE;
|
||||
|
||||
settings->swizzle_map = si->swizzle_map;
|
||||
@ -368,7 +368,7 @@ index a84417d..b840e62 100644
|
||||
|
||||
int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry)
|
||||
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
|
||||
index cd8bb5e..d37f3ce 100644
|
||||
index cd8bb5e4233..d37f3ce8606 100644
|
||||
--- a/dlls/wined3d/vertexdeclaration.c
|
||||
+++ b/dlls/wined3d/vertexdeclaration.c
|
||||
@@ -119,6 +119,15 @@ static BOOL declaration_element_valid_ffp(const struct wined3d_vertex_element *e
|
||||
@ -388,10 +388,10 @@ index cd8bb5e..d37f3ce 100644
|
||||
switch(element->format)
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2035c0c..4122db5 100644
|
||||
index 51520919644..8469ae8aa29 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -267,6 +267,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
@@ -268,6 +268,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
}
|
||||
|
||||
/* Device caps */
|
||||
@ -399,7 +399,7 @@ index 2035c0c..4122db5 100644
|
||||
#define WINED3D_MAX_STREAMS 16
|
||||
#define WINED3D_MAX_TEXTURES 8
|
||||
#define WINED3D_MAX_FRAGMENT_SAMPLERS 16
|
||||
@@ -2958,7 +2959,8 @@ struct wined3d_ffp_vs_settings
|
||||
@@ -2965,7 +2966,8 @@ struct wined3d_ffp_vs_settings
|
||||
DWORD ortho_fog : 1;
|
||||
DWORD flatshading : 1;
|
||||
DWORD swizzle_map : 16; /* MAX_ATTRIBS, 16 */
|
||||
@ -409,7 +409,7 @@ index 2035c0c..4122db5 100644
|
||||
|
||||
DWORD texgen[WINED3D_MAX_TEXTURES];
|
||||
};
|
||||
@@ -4875,6 +4877,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
@@ -4913,6 +4915,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
}
|
||||
|
||||
@ -424,5 +424,5 @@ index 2035c0c..4122db5 100644
|
||||
enum wined3d_material_color_source source)
|
||||
{
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 940ff566fa1192c46622e3a107b087993b02063e Mon Sep 17 00:00:00 2001
|
||||
From 54e5b6327bac8709f264ef8effe6b629aa264a8a Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 13:17:01 +0300
|
||||
Subject: [PATCH 1/5] wined3d: Use UBO for vertex shader float constants if
|
||||
Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if
|
||||
supported.
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
@ -9,12 +9,12 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
dlls/d3d8/directx.c | 2 +-
|
||||
dlls/d3d9/directx.c | 2 +-
|
||||
dlls/wined3d/adapter_gl.c | 3 +
|
||||
dlls/wined3d/glsl_shader.c | 145 ++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/glsl_shader.c | 146 ++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/shader.c | 2 +
|
||||
dlls/wined3d/state.c | 5 ++
|
||||
dlls/wined3d/wined3d_private.h | 2 +
|
||||
include/wine/wined3d.h | 1 +
|
||||
8 files changed, 148 insertions(+), 14 deletions(-)
|
||||
8 files changed, 149 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
|
||||
index f78ff3e5af..847cfd17bf 100644
|
||||
@ -57,7 +57,7 @@ index c8ebe34643..4071ed0f82 100644
|
||||
}
|
||||
if (gl_info->supported[ARB_TESSELLATION_SHADER])
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index ab62c1ca59..fc3093f4d1 100644
|
||||
index 80e58ccb72..0bc81d07fe 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -138,6 +138,10 @@ struct shader_glsl_priv
|
||||
@ -143,16 +143,18 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
|
||||
/* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
|
||||
if (shader->reg_maps.shader_version.major == 1
|
||||
@@ -1515,7 +1563,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1515,8 +1563,9 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
{
|
||||
const struct wined3d_shader *vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX];
|
||||
const struct wined3d_shader *pshader = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
- const struct glsl_context_data *ctx_data = context->shader_backend_data;
|
||||
+ struct glsl_context_data *ctx_data = context->shader_backend_data;
|
||||
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
|
||||
+
|
||||
struct glsl_shader_prog_link *prog = ctx_data->glsl_program;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
float position_fixup[4 * WINED3D_MAX_VIEWPORTS];
|
||||
@@ -1531,9 +1579,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1532,9 +1581,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
constant_version = prog->constant_version;
|
||||
update_mask = context->constant_update_mask & prog->constant_update_mask;
|
||||
|
||||
@ -186,7 +188,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_VS_I)
|
||||
shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i,
|
||||
@@ -1686,7 +1757,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1687,7 +1759,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_PS_F)
|
||||
shader_glsl_load_constants_f(pshader, gl_info, state->ps_consts_f,
|
||||
@ -195,7 +197,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_PS_I)
|
||||
shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i,
|
||||
@@ -1825,6 +1896,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@@ -1826,6 +1898,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
struct constant_heap *heap = &priv->vconst_heap;
|
||||
UINT i;
|
||||
|
||||
@ -208,7 +210,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
for (i = start; i < count + start; ++i)
|
||||
{
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
@@ -1837,6 +1914,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
|
||||
@@ -1838,6 +1916,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
|
||||
struct constant_heap *heap = &priv->pconst_heap;
|
||||
UINT i;
|
||||
|
||||
@ -218,7 +220,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
for (i = start; i < count + start; ++i)
|
||||
{
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
@@ -2140,6 +2220,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2141,6 +2222,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct wined3d_shader_version *version = ®_maps->shader_version;
|
||||
const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
@ -226,7 +228,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_shader_indexable_temp *idx_temp_reg;
|
||||
unsigned int uniform_block_base, uniform_block_count;
|
||||
@@ -2160,7 +2241,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2161,7 +2243,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
}
|
||||
|
||||
/* Declare the constants (aka uniforms) */
|
||||
@ -243,7 +245,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
{
|
||||
unsigned max_constantsF;
|
||||
|
||||
@@ -2225,11 +2314,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2226,11 +2316,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -258,7 +260,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
}
|
||||
|
||||
/* Always declare the full set of constants, the compiler can remove the
|
||||
@@ -9818,17 +9908,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
|
||||
@@ -9815,17 +9906,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
|
||||
|
||||
|
||||
static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *gl_info,
|
||||
@ -300,7 +302,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
{
|
||||
@@ -10900,6 +11009,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -10900,6 +11010,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
const struct fragment_pipeline *fragment_pipe)
|
||||
{
|
||||
SIZE_T stack_size = wined3d_log2i(max(WINED3D_MAX_VS_CONSTS_F, WINED3D_MAX_PS_CONSTS_F)) + 1;
|
||||
@ -308,7 +310,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
struct fragment_caps fragment_caps;
|
||||
void *vertex_priv, *fragment_priv;
|
||||
struct shader_glsl_priv *priv;
|
||||
@@ -10907,6 +11017,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -10907,6 +11018,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
if (!(priv = heap_alloc_zero(sizeof(*priv))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@ -317,7 +319,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -10961,6 +11073,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -10961,6 +11074,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
|
||||
@ -326,7 +328,7 @@ index ab62c1ca59..fc3093f4d1 100644
|
||||
return WINED3D_OK;
|
||||
|
||||
fail:
|
||||
@@ -10988,6 +11102,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
@@ -10988,6 +11103,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
priv->fragment_pipe->free_private(device, context);
|
||||
priv->vertex_pipe->vp_free(device, context);
|
||||
|
||||
@ -354,10 +356,10 @@ index a8fee07c6c..d7fdc9cfdb 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index c52e25d6ce..435aaa598b 100644
|
||||
index 06b30ba5e1..4d5b8be65a 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -4387,6 +4387,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4389,6 +4389,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
|
||||
unsigned int i, base, count;
|
||||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
@ -370,7 +372,7 @@ index c52e25d6ce..435aaa598b 100644
|
||||
if (STATE_IS_GRAPHICS_CONSTANT_BUFFER(state_id))
|
||||
shader_type = state_id - STATE_GRAPHICS_CONSTANT_BUFFER(0);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8272a56203..444ffdba1e 100644
|
||||
index b6f4b67018..0f82fc8e49 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1065,6 +1065,7 @@ struct wined3d_shader_reg_maps
|
||||
@ -381,7 +383,7 @@ index 8272a56203..444ffdba1e 100644
|
||||
};
|
||||
|
||||
/* Keeps track of details for TEX_M#x# instructions which need to maintain
|
||||
@@ -2638,6 +2639,7 @@ struct wined3d_gl_limits
|
||||
@@ -2643,6 +2644,7 @@ struct wined3d_gl_limits
|
||||
UINT glsl_varyings;
|
||||
UINT glsl_vs_float_constants;
|
||||
UINT glsl_ps_float_constants;
|
||||
@ -390,10 +392,10 @@ index 8272a56203..444ffdba1e 100644
|
||||
UINT arb_vs_float_constants;
|
||||
UINT arb_vs_native_constants;
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index ada5636550..302c5b4fa4 100644
|
||||
index abef3f0ad0..86e324a0df 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1334,6 +1334,7 @@ enum wined3d_shader_type
|
||||
@@ -1335,6 +1335,7 @@ enum wined3d_shader_type
|
||||
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
|
||||
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
|
||||
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
|
||||
@ -402,5 +404,5 @@ index ada5636550..302c5b4fa4 100644
|
||||
#define WINED3D_RESZ_CODE 0x7fa05000
|
||||
|
||||
--
|
||||
2.21.0
|
||||
2.20.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user