Rebase against bfe8510ec0c7bcef0be1f6990c56ad235d8bccd6.

This commit is contained in:
Zebediah Figura 2018-09-07 18:44:22 -05:00
parent 1cbabaac9d
commit 3cc8f97398
4 changed files with 14 additions and 105 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "d99f6821183ef16457f5cedb13289bc715d11f09"
echo "bfe8510ec0c7bcef0be1f6990c56ad235d8bccd6"
}
# Show version information
@ -398,7 +398,6 @@ patch_enable_all ()
enable_winhttp_System_Proxy_Autoconfig="$1"
enable_wininet_Cleanup="$1"
enable_wininet_Http_Decoding="$1"
enable_wininet_InternetCrackUrlW="$1"
enable_winmm_Delay_Import_Depends="$1"
enable_winmm_mciSendCommandA="$1"
enable_wintab32_improvements="$1"
@ -1371,9 +1370,6 @@ patch_enable ()
wininet-Http_Decoding)
enable_wininet_Http_Decoding="$2"
;;
wininet-InternetCrackUrlW)
enable_wininet_InternetCrackUrlW="$2"
;;
winmm-Delay_Import_Depends)
enable_winmm_Delay_Import_Depends="$2"
;;
@ -8081,21 +8077,6 @@ if test "$enable_wininet_Http_Decoding" -eq 1; then
) >> "$patchlist"
fi
# Patchset wininet-InternetCrackUrlW
# |
# | This patchset fixes the following Wine bugs:
# | * [#40598] Resize buffer when call to InternetCanonicalizeUrlW fails in InternetCrackUrlW
# |
# | Modified files:
# | * dlls/wininet/internet.c, dlls/wininet/tests/url.c
# |
if test "$enable_wininet_InternetCrackUrlW" -eq 1; then
patch_apply wininet-InternetCrackUrlW/0002-wininet-Resize-buffer-when-call-to-InternetCanonical.patch
(
printf '%s\n' '+ { "Michael Müller", "wininet: Resize buffer when call to InternetCanonicalizeUrlW fails in InternetCrackUrlW.", 1 },';
) >> "$patchlist"
fi
# Patchset winmm-Delay_Import_Depends
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,4 +1,4 @@
From dcb185effe74be9c6899a503e62e8308c973f44d Mon Sep 17 00:00:00 2001
From c530667c08a09f77a74cbea8f9df48778db51686 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.
@ -71,12 +71,12 @@ index f0ff7b3..cd2f1bb 100644
}
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c
index d4c3bef..ed4ba5e 100644
index c36b87f..e235c18 100644
--- a/dlls/d3d11/state.c
+++ b/dlls/d3d11/state.c
@@ -335,10 +335,6 @@ HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC
tmp_desc.RenderTarget[i].DestBlendAlpha = desc->RenderTarget[j].DestBlendAlpha;
tmp_desc.RenderTarget[i].BlendOpAlpha = desc->RenderTarget[j].BlendOpAlpha;
@@ -347,10 +347,6 @@ HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC
tmp_desc.RenderTarget[i].BlendOpAlpha = D3D11_BLEND_OP_ADD;
}
tmp_desc.RenderTarget[i].RenderTargetWriteMask = desc->RenderTarget[j].RenderTargetWriteMask;
-
- if (i > 3 && tmp_desc.RenderTarget[i].RenderTargetWriteMask != D3D11_COLOR_WRITE_ENABLE_ALL)
@ -86,7 +86,7 @@ index d4c3bef..ed4ba5e 100644
/* glEnableIndexedEXT(GL_BLEND, ...) */
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 9d2236b..96c9dfb 100644
index 83e3563..5add8e9 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
@ -121,7 +121,7 @@ index 9d2236b..96c9dfb 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 ab67a96..6f1dd68 100644
index f6a0b39..3728d7c 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
@ -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 a297d55..a9f7637 100644
index d1847be..fe3cd33 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 a297d55..a9f7637 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 a90456e..a783a84 100644
index 6d84be7..951f927 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4627,7 +4627,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4632,7 +4632,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 a90456e..a783a84 100644
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
@@ -4647,9 +4646,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4652,9 +4651,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 a90456e..a783a84 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 de0b486..dd2908d 100644
index 7084168..0dc3534 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -274,6 +274,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
@@ -275,6 +275,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

View File

@ -1,71 +0,0 @@
From 77f892d376d01bce431b582e046f6bc1c34a824f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 16 May 2016 22:36:25 +0200
Subject: [PATCH] wininet: Resize buffer when call to InternetCanonicalizeUrlW
fails in InternetCrackUrlW.
---
dlls/wininet/internet.c | 21 ++++++++++++++++++---
dlls/wininet/tests/url.c | 6 +++---
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 0a0f8a7..1fbfd66 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -1664,7 +1664,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
if (dwFlags & ICU_DECODE)
{
- WCHAR *url_tmp;
+ WCHAR *url_tmp, *buffer;
DWORD len = dwUrlLength + 1;
BOOL ret;
@@ -1673,9 +1673,24 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
SetLastError(ERROR_OUTOFMEMORY);
return FALSE;
}
- ret = InternetCanonicalizeUrlW(url_tmp, url_tmp, &len, ICU_DECODE | ICU_NO_ENCODE);
+
+ buffer = url_tmp;
+ ret = InternetCanonicalizeUrlW(url_tmp, buffer, &len, ICU_DECODE | ICU_NO_ENCODE);
+ if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ {
+ buffer = heap_alloc(len * sizeof(WCHAR));
+ if (!buffer)
+ {
+ SetLastError(ERROR_OUTOFMEMORY);
+ heap_free(url_tmp);
+ return FALSE;
+ }
+ ret = InternetCanonicalizeUrlW(url_tmp, buffer, &len, ICU_DECODE | ICU_NO_ENCODE);
+ }
if (ret)
- ret = InternetCrackUrlW(url_tmp, len, dwFlags & ~ICU_DECODE, lpUC);
+ ret = InternetCrackUrlW(buffer, len, dwFlags & ~ICU_DECODE, lpUC);
+
+ if (buffer != url_tmp) heap_free(buffer);
heap_free(url_tmp);
return ret;
}
diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c
index 18c77b6..19ae7c3 100644
--- a/dlls/wininet/tests/url.c
+++ b/dlls/wininet/tests/url.c
@@ -816,9 +816,9 @@ static void InternetCrackUrlW_test(void)
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = ARRAY_SIZE(urlpart);
r = InternetCrackUrlW(url3, 0, ICU_DECODE, &comp);
- todo_wine ok(r, "InternetCrackUrlW failed unexpectedly\n");
- todo_wine ok(!strcmp_wa(host, "x.org"), "host is %s, should be x.org\n", wine_dbgstr_w(host));
- ok(urlpart[0] == 0, "urlpart should be empty\n");
+ ok(r, "InternetCrackUrlW failed unexpectedly\n");
+ ok(!strcmp_wa(host, "x.org"), "host is %s, should be x.org\n", wine_dbgstr_w(host));
+ todo_wine ok(urlpart[0] == 0, "urlpart should be empty\n");
}
static void fill_url_components(URL_COMPONENTSA *lpUrlComponents)
--
1.9.1

View File

@ -1 +0,0 @@
Fixes: [40598] Resize buffer when call to InternetCanonicalizeUrlW fails in InternetCrackUrlW