Rebase against 1fbb661ed1745bdfdcd1287c730f63503ee3f13f.

This also merges several improvements to avoid compiler warnings with GCC 7.

FIXME: There seems to be a regression (random crashes) during prefix shutdown,
       needs further debugging.
This commit is contained in:
Sebastian Lackner 2017-06-04 15:49:06 +02:00
parent ac2c2ffdb8
commit f5671acfdd
19 changed files with 501 additions and 444 deletions

View File

@ -0,0 +1,25 @@
From 8093970096f440a6accd5930a59fc44d32269356 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:52:21 +0200
Subject: d3d11: Remove duplicate const.
---
dlls/d3d11/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index fcf5d10a3b2..e84c3655e08 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -3324,7 +3324,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device *i
struct wined3d *wined3d;
unsigned int i;
- static const const struct
+ static const struct
{
enum wined3d_resource_type rtype;
unsigned int usage;
--
2.13.0

View File

@ -0,0 +1,25 @@
From 33717bde9e702520e23ae014c398bd7076902d43 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:56:47 +0200
Subject: shell32: Fix length parameter for ZeroMemory.
---
dlls/shell32/shfldr_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
index c7259276d1d..10653f92b52 100644
--- a/dlls/shell32/shfldr_fs.c
+++ b/dlls/shell32/shfldr_fs.c
@@ -1315,7 +1315,7 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl,
if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) {
SHGetPathFromIDListW (pidl, wszSrcPathRoot);
- ZeroMemory(wszDstPath, MAX_PATH+1);
+ ZeroMemory(wszDstPath, sizeof(wszDstPath));
if (This->sPathTarget)
lstrcpynW(wszDstPath, This->sPathTarget, MAX_PATH);
PathAddBackslashW(wszSrcPathRoot);
--
2.13.0

View File

@ -0,0 +1,25 @@
From 2b5e9f330770221eee2eda2aab251eba8d370a60 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 13:17:54 +0200
Subject: fusion: Fix length parameter for ZeroMemory.
---
dlls/fusion/tests/asmname.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/fusion/tests/asmname.c b/dlls/fusion/tests/asmname.c
index 5fb14a48291..21cd4874edc 100644
--- a/dlls/fusion/tests/asmname.c
+++ b/dlls/fusion/tests/asmname.c
@@ -358,7 +358,7 @@ static void test_assembly_name_props_line(IAssemblyName *name,
to_widechar(expect, vals[i].val);
size = MAX_PATH;
- ZeroMemory(str, MAX_PATH);
+ ZeroMemory(str, sizeof(str));
hr = IAssemblyName_GetProperty(name, i, str, &size);
to_multibyte(val, str);
--
2.13.0

View File

@ -0,0 +1,34 @@
From 3e59710a3091a4a61b7cce00606ed23b7b66dfda Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:55:31 +0200
Subject: fusion/tests: Avoid compiler warnings with GCC 7.
---
dlls/fusion/tests/asmenum.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/fusion/tests/asmenum.c b/dlls/fusion/tests/asmenum.c
index 1dc34a286e5..8b95f2a6bd5 100644
--- a/dlls/fusion/tests/asmenum.c
+++ b/dlls/fusion/tests/asmenum.c
@@ -223,7 +223,7 @@ typedef struct _tagASMNAME
static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
{
WIN32_FIND_DATAA ffd;
- CHAR buf[MAX_PATH];
+ CHAR buf[MAX_PATH + 37];
CHAR disp[MAX_PATH];
ASMNAME *name;
HANDLE hfind;
@@ -248,7 +248,7 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
else if (depth == 1)
{
char culture[MAX_PATH];
- char dll[MAX_PATH], exe[MAX_PATH];
+ char dll[MAX_PATH + 6], exe[MAX_PATH + 6];
/* Directories with no dll or exe will not be enumerated */
sprintf(dll, "%s\\%s\\%s.dll", path, ffd.cFileName, parent);
--
2.13.0

View File

@ -0,0 +1,33 @@
From 818e3ecdcf86444a2717b135a3316eb938c726a2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:56:10 +0200
Subject: kernel32/tests: Avoid compiler warnings with GCC 7.
---
dlls/kernel32/tests/heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c
index 0acf109dff0..5fee6e39fc3 100644
--- a/dlls/kernel32/tests/heap.c
+++ b/dlls/kernel32/tests/heap.c
@@ -109,6 +109,8 @@ static void test_heap(void)
}
/* test some border cases of HeapAlloc and HeapReAlloc */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Walloc-size-larger-than="
mem = HeapAlloc(GetProcessHeap(), 0, 0);
ok(mem != NULL, "memory not allocated for size 0\n");
msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0 - 7);
@@ -125,6 +127,7 @@ static void test_heap(void)
ok(size == 0 || broken(size == 1) /* some vista and win7 */,
"HeapSize should have returned 0 instead of %lu\n", size);
HeapFree(GetProcessHeap(), 0, msecond);
+#pragma GCC diagnostic pop
/* large blocks must be 16-byte aligned */
mem = HeapAlloc(GetProcessHeap(), 0, 512 * 1024);
--
2.13.0

View File

@ -0,0 +1,25 @@
From 61ceddca38f26c2df2acc6361c35ced52fe9b098 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:58:31 +0200
Subject: rsaenh/tests: Avoid compiler warnings with GCC 7.
---
dlls/rsaenh/rsaenh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index 9af770dfc6e..6978c860278 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -1097,7 +1097,7 @@ static void store_key_permissions(HCRYPTKEY hCryptKey, HKEY hKey, DWORD dwKeySpe
*/
static BOOL create_container_key(KEYCONTAINER *pKeyContainer, REGSAM sam, HKEY *phKey)
{
- CHAR szRSABase[MAX_PATH];
+ CHAR szRSABase[MAX_PATH + 25];
HKEY hRootKey;
sprintf(szRSABase, RSAENH_REGKEY, pKeyContainer->szName);
--
2.13.0

View File

@ -0,0 +1,46 @@
From 67ed53ca67214d7dbdea7f342b9f2ff0356a220b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:59:10 +0200
Subject: kernel32: Avoid compiler warnings with GCC 7.
---
dlls/kernel32/oldconfig.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/oldconfig.c b/dlls/kernel32/oldconfig.c
index 6c80dc614f0..3e628757283 100644
--- a/dlls/kernel32/oldconfig.c
+++ b/dlls/kernel32/oldconfig.c
@@ -290,7 +290,8 @@ static void create_hardware_branch(void)
{
if (strncmp(dent->d_name, "hd", 2) == 0)
{
- sprintf(cStr, procname_ide_media, dent->d_name);
+ result = snprintf(cStr, sizeof(cStr), procname_ide_media, dent->d_name);
+ if (result < 0 || result >= sizeof(cStr)) continue;
procfile = fopen(cStr, "r");
if (!procfile)
{
@@ -306,7 +307,8 @@ static void create_hardware_branch(void)
if (nType == DRIVE_UNKNOWN) continue;
}
- sprintf(cStr, procname_ide_model, dent->d_name);
+ result = snprintf(cStr, sizeof(cStr), procname_ide_model, dent->d_name);
+ if (result < 0 || result >= sizeof(cStr)) continue;
procfile = fopen(cStr, "r");
if (!procfile)
{
@@ -322,7 +324,8 @@ static void create_hardware_branch(void)
cDevModel[strlen(cDevModel) - 1] = 0;
}
- sprintf(cUnixDeviceName, "/dev/%s", dent->d_name);
+ result = snprintf(cUnixDeviceName, sizeof(cUnixDeviceName), "/dev/%s", dent->d_name);
+ if (result < 0 || result >= sizeof(cUnixDeviceName)) continue;
scsi_addr.PortNumber = (dent->d_name[2] - 'a') / 2;
scsi_addr.PathId = 0;
scsi_addr.TargetId = (dent->d_name[2] - 'a') % 2;
--
2.13.0

View File

@ -0,0 +1,24 @@
From 560a25c662f7b56d2b895759be1ea65c64d0f5af Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 4 Jun 2017 12:57:17 +0200
Subject: ws2_32/tests: Work around an incorrect detection in GCC 7.
---
dlls/ws2_32/tests/sock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 677a750ec6b..65c82e36524 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3601,6 +3601,7 @@ static DWORD WINAPI SelectReadThread(void *param)
struct sockaddr_in addr;
struct timeval select_timeout;
+ memset(&readfds, 0, sizeof(readfds));
FD_ZERO(&readfds);
FD_SET(par->s, &readfds);
select_timeout.tv_sec=5;
--
2.13.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "06eceb3af2d56f158dab2db5a7bc768cc2b1c391"
echo "1fbb661ed1745bdfdcd1287c730f63503ee3f13f"
}
# Show version information
@ -434,7 +434,6 @@ patch_enable_all ()
enable_wined3d_Silence_FIXMEs="$1"
enable_wined3d_WINED3DFMT_R32G32_UINT="$1"
enable_wined3d_buffer_create="$1"
enable_wined3d_check_format_support="$1"
enable_wined3d_wined3d_guess_gl_vendor="$1"
enable_winedbg_Process_Arguments="$1"
enable_winedevice_Fix_Relocation="$1"
@ -1541,9 +1540,6 @@ patch_enable ()
wined3d-buffer_create)
enable_wined3d_buffer_create="$2"
;;
wined3d-check_format_support)
enable_wined3d_check_format_support="$2"
;;
wined3d-wined3d_guess_gl_vendor)
enable_wined3d_wined3d_guess_gl_vendor="$2"
;;
@ -2621,14 +2617,24 @@ fi
# Patchset Compiler_Warnings
# |
# | Modified files:
# | * dlls/amstream/mediastreamfilter.c, dlls/d2d1/brush.c, dlls/d2d1/geometry.c, dlls/d3d11/view.c, dlls/d3d8/texture.c,
# | dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dsound/primary.c, dlls/dwrite/font.c,
# | dlls/dwrite/layout.c, dlls/msxml3/schema.c, dlls/netapi32/netapi32.c, dlls/ole32/storage32.h, dlls/oleaut32/oleaut.c,
# | dlls/rpcrt4/cstub.c, dlls/vbscript/vbdisp.c, dlls/winealsa.drv/mmdevdrv.c, dlls/wined3d/glsl_shader.c,
# | * dlls/amstream/mediastreamfilter.c, dlls/d2d1/brush.c, dlls/d2d1/geometry.c, dlls/d3d11/device.c, dlls/d3d11/view.c,
# | dlls/d3d8/texture.c, dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dsound/primary.c,
# | dlls/dwrite/font.c, dlls/dwrite/layout.c, dlls/fusion/tests/asmenum.c, dlls/fusion/tests/asmname.c,
# | dlls/kernel32/oldconfig.c, dlls/kernel32/tests/heap.c, dlls/msxml3/schema.c, dlls/netapi32/netapi32.c,
# | dlls/ole32/storage32.h, dlls/oleaut32/oleaut.c, dlls/rpcrt4/cstub.c, dlls/rsaenh/rsaenh.c, dlls/shell32/shfldr_fs.c,
# | dlls/vbscript/vbdisp.c, dlls/winealsa.drv/mmdevdrv.c, dlls/wined3d/glsl_shader.c, dlls/ws2_32/tests/sock.c,
# | include/wine/list.h, include/wine/rbtree.h, include/winnt.h, tools/makedep.c
# |
if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0001-ole32-Fix-compilation-with-recent-versions-of-gcc.patch
patch_apply Compiler_Warnings/0002-d3d11-Remove-duplicate-const.patch
patch_apply Compiler_Warnings/0003-shell32-Fix-length-parameter-for-ZeroMemory.patch
patch_apply Compiler_Warnings/0004-fusion-Fix-length-parameter-for-ZeroMemory.patch
patch_apply Compiler_Warnings/0005-fusion-tests-Avoid-compiler-warnings-with-GCC-7.patch
patch_apply Compiler_Warnings/0006-kernel32-tests-Avoid-compiler-warnings-with-GCC-7.patch
patch_apply Compiler_Warnings/0007-rsaenh-tests-Avoid-compiler-warnings-with-GCC-7.patch
patch_apply Compiler_Warnings/0008-kernel32-Avoid-compiler-warnings-with-GCC-7.patch
patch_apply Compiler_Warnings/0009-ws2_32-tests-Work-around-an-incorrect-detection-in-G.patch
patch_apply Compiler_Warnings/0018-Appease-the-blessed-version-of-gcc-4.5-when-Werror-i.patch
patch_apply Compiler_Warnings/0019-dsound-Avoid-implicit-cast-of-interface-pointer.patch
patch_apply Compiler_Warnings/0020-amstream-Avoid-implicit-cast-of-interface-pointer.patch
@ -2645,6 +2651,14 @@ if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0031-include-Check-element-type-in-CONTAINING_RECORD-and-.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ole32: Fix compilation with recent versions of gcc.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "d3d11: Remove duplicate const.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "shell32: Fix length parameter for ZeroMemory.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "fusion: Fix length parameter for ZeroMemory.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "fusion/tests: Avoid compiler warnings with GCC 7.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "kernel32/tests: Avoid compiler warnings with GCC 7.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "rsaenh/tests: Avoid compiler warnings with GCC 7.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "kernel32: Avoid compiler warnings with GCC 7.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "ws2_32/tests: Work around an incorrect detection in GCC 7.", 1 },';
printf '%s\n' '+ { "Erich E. Hoover", "Appease the blessed version of gcc (4.5) when -Werror is enabled.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "dsound: Avoid implicit cast of interface pointer.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "amstream: Avoid implicit cast of interface pointer.", 1 },';
@ -3418,7 +3432,8 @@ fi
# Patchset wined3d-1DTextures
# |
# | Modified files:
# | * dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/glsl_shader.c, dlls/wined3d/resource.c,
# | * dlls/d3d10core/tests/device.c, dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/context.c,
# | dlls/wined3d/device.c, dlls/wined3d/directx.c, dlls/wined3d/glsl_shader.c, dlls/wined3d/resource.c,
# | dlls/wined3d/texture.c, dlls/wined3d/utils.c, dlls/wined3d/view.c, dlls/wined3d/wined3d_private.h,
# | include/wine/wined3d.h
# |
@ -3438,6 +3453,7 @@ if test "$enable_wined3d_1DTextures" -eq 1; then
patch_apply wined3d-1DTextures/0013-wined3d-Add-support-for-1d-textures-in-context_attac.patch
patch_apply wined3d-1DTextures/0014-wined3d-Handle-1d-textures-in-texture_activate_dimen.patch
patch_apply wined3d-1DTextures/0015-wined3d-Allow-creation-of-1d-shader-views.patch
patch_apply wined3d-1DTextures/0016-d3d11-Improve-ID3D11Device_CheckFormatSupport.patch
(
printf '%s\n' '+ { "Michael Müller", "wined3d: Create dummy 1d textures.", 1 },';
printf '%s\n' '+ { "Michael Müller", "wined3d: Add 1d texture resource type.", 1 },';
@ -3454,6 +3470,7 @@ if test "$enable_wined3d_1DTextures" -eq 1; then
printf '%s\n' '+ { "Michael Müller", "wined3d: Add support for 1d textures in context_attach_gl_texture_fbo.", 1 },';
printf '%s\n' '+ { "Michael Müller", "wined3d: Handle 1d textures in texture_activate_dimensions.", 1 },';
printf '%s\n' '+ { "Michael Müller", "wined3d: Allow creation of 1d shader views.", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Improve ID3D11Device_CheckFormatSupport.", 1 },';
) >> "$patchlist"
fi
@ -8868,16 +8885,14 @@ fi
# | * [#42140] Silence noisy FIXME in gl_stencil_op
# |
# | Modified files:
# | * dlls/wined3d/resource.c, dlls/wined3d/state.c, dlls/wined3d/surface.c, dlls/wined3d/swapchain.c, dlls/wined3d/texture.c
# | * dlls/wined3d/resource.c, dlls/wined3d/surface.c, dlls/wined3d/swapchain.c, dlls/wined3d/texture.c
# |
if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then
patch_apply wined3d-Silence_FIXMEs/0002-wined3d-Display-FIXME-for-cmp-function-0-only-once.patch
patch_apply wined3d-Silence_FIXMEs/0003-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
patch_apply wined3d-Silence_FIXMEs/0004-wined3d-Print-FIXME-only-once-in-surface_cpu_blt.patch
patch_apply wined3d-Silence_FIXMEs/0005-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
patch_apply wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch
(
printf '%s\n' '+ { "Christian Costa", "wined3d: Display FIXME for cmp function 0 only once.", 1 },';
printf '%s\n' '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
printf '%s\n' '+ { "Christian Costa", "wined3d: Print FIXME only once in surface_cpu_blt.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
@ -8950,23 +8965,6 @@ if test "$enable_wined3d_buffer_create" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-check_format_support
# |
# | Modified files:
# | * dlls/d3d10core/tests/device.c, dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/device.c,
# | dlls/wined3d/wined3d.spec, include/wine/wined3d.h
# |
if test "$enable_wined3d_check_format_support" -eq 1; then
patch_apply wined3d-check_format_support/0001-wined3d-Add-wined3d_check_device_format_support.patch
patch_apply wined3d-check_format_support/0002-d3d11-Implement-ID3D11Device_CheckFormatSupport.patch
patch_apply wined3d-check_format_support/0003-d3d11-Implement-ID3D10Device_CheckFormatSupport.patch
(
printf '%s\n' '+ { "Michael Müller", "wined3d: Add wined3d_check_device_format_support.", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ID3D11Device_CheckFormatSupport.", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ID3D10Device_CheckFormatSupport.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_guess_gl_vendor
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,4 +1,4 @@
From 487882af653cb228767391dd106d74f75f39f621 Mon Sep 17 00:00:00 2001
From 94a182b744f90995ad229b9d69a936742cf0ee9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 23 Aug 2016 22:47:56 +0200
Subject: wined3d: Add 1d texture resource type.
@ -9,24 +9,24 @@ Subject: wined3d: Add 1d texture resource type.
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index ee3af83..4e00aad 100644
index 79c322f9e6e..5b5bdc62375 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3926,6 +3926,7 @@ const char *debug_d3dresourcetype(enum wined3d_resource_type resource_type)
{
@@ -4122,6 +4122,7 @@ const char *debug_d3dresourcetype(enum wined3d_resource_type resource_type)
#define WINED3D_TO_STR(x) case x: return #x
WINED3D_TO_STR(WINED3D_RTYPE_NONE);
WINED3D_TO_STR(WINED3D_RTYPE_BUFFER);
+ WINED3D_TO_STR(WINED3D_RTYPE_TEXTURE_1D);
WINED3D_TO_STR(WINED3D_RTYPE_TEXTURE_2D);
WINED3D_TO_STR(WINED3D_RTYPE_TEXTURE_3D);
#undef WINED3D_TO_STR
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 81dffea..1cf927a 100644
index 8ead4979b5a..5cfcfed2b86 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -667,8 +667,9 @@ enum wined3d_texture_filter_type
enum wined3d_resource_type
@@ -672,8 +672,9 @@ enum wined3d_resource_type
{
WINED3D_RTYPE_NONE = 0,
WINED3D_RTYPE_BUFFER = 1,
- WINED3D_RTYPE_TEXTURE_2D = 2,
- WINED3D_RTYPE_TEXTURE_3D = 3,
@ -37,5 +37,5 @@ index 81dffea..1cf927a 100644
enum wined3d_pool
--
2.8.1
2.12.2

View File

@ -0,0 +1,187 @@
From e2452eb12f42fa733647dca9980ac6e4efad1327 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 4 Jun 2017 22:04:39 +0200
Subject: d3d11: Improve ID3D11Device_CheckFormatSupport.
---
dlls/d3d10core/tests/device.c | 2 +-
dlls/d3d11/device.c | 26 +++++++++++++++++++-------
dlls/d3d11/tests/d3d11.c | 33 ++++++++++++++++++++++++++++++++-
dlls/wined3d/directx.c | 21 ++++++++++++++++++++-
4 files changed, 72 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 364a2abfe7f..78ae08b8c6c 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -10565,7 +10565,7 @@ static void test_required_format_support(void)
for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
{
hr = ID3D10Device_CheckFormatSupport(device, format, &format_support[format]);
- todo_wine ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
+ ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
"Got unexpected result for format %#x: hr %#x, format_support %#x.\n",
format, hr, format_support[format]);
}
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index e84c3655e08..4e7d988075e 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -3332,17 +3332,24 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device *i
}
flag_mapping[] =
{
- {WINED3D_RTYPE_TEXTURE_2D, WINED3DUSAGE_TEXTURE, D3D11_FORMAT_SUPPORT_TEXTURE2D},
- {WINED3D_RTYPE_TEXTURE_3D, WINED3DUSAGE_TEXTURE, D3D11_FORMAT_SUPPORT_TEXTURE3D},
- {WINED3D_RTYPE_NONE, WINED3DUSAGE_RENDERTARGET, D3D11_FORMAT_SUPPORT_RENDER_TARGET},
- {WINED3D_RTYPE_NONE, WINED3DUSAGE_DEPTHSTENCIL, D3D11_FORMAT_SUPPORT_DEPTH_STENCIL},
+ {WINED3D_RTYPE_TEXTURE_1D, WINED3DUSAGE_TEXTURE, D3D11_FORMAT_SUPPORT_TEXTURE1D | D3D11_FORMAT_SUPPORT_MIP},
+ {WINED3D_RTYPE_TEXTURE_2D, WINED3DUSAGE_TEXTURE, D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_MIP},
+ {WINED3D_RTYPE_TEXTURE_3D, WINED3DUSAGE_TEXTURE, D3D11_FORMAT_SUPPORT_TEXTURE3D | D3D11_FORMAT_SUPPORT_MIP},
+ {WINED3D_RTYPE_NONE, WINED3DUSAGE_RENDERTARGET, D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_DISPLAY},
+ {WINED3D_RTYPE_NONE, WINED3DUSAGE_DEPTHSTENCIL, D3D11_FORMAT_SUPPORT_DEPTH_STENCIL},
+ {WINED3D_RTYPE_BUFFER, WINED3DUSAGE_QUERY_VERTEXTEXTURE, D3D11_FORMAT_SUPPORT_BUFFER |
+ D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER | D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER | D3D11_FORMAT_SUPPORT_SO_BUFFER
+ },
+ {WINED3D_RTYPE_TEXTURE_2D, WINED3DUSAGE_TEXTURE | WINED3DUSAGE_LEGACY_CUBEMAP, D3D11_FORMAT_SUPPORT_TEXTURECUBE},
+ {WINED3D_RTYPE_TEXTURE_2D, WINED3DUSAGE_TEXTURE | WINED3DUSAGE_AUTOGENMIPMAP, D3D11_FORMAT_SUPPORT_MIP_AUTOGEN},
+ {WINED3D_RTYPE_TEXTURE_2D, WINED3DUSAGE_TEXTURE | WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3D11_FORMAT_SUPPORT_BLENDABLE},
};
HRESULT hr;
FIXME("iface %p, format %u, format_support %p partial-stub!\n", iface, format, format_support);
wined3d_format = wined3dformat_from_dxgi_format(format);
- if (format && !wined3d_format)
+ if ((format && !wined3d_format) || wined3d_format == WINED3DFMT_UNKNOWN)
{
WARN("Invalid format %#x.\n", format);
*format_support = 0;
@@ -5550,10 +5557,15 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateCounter(ID3D10Device1 *iface
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device1 *iface,
DXGI_FORMAT format, UINT *format_support)
{
- FIXME("iface %p, format %s, format_support %p stub!\n",
+ struct d3d_device *device = impl_from_ID3D10Device(iface);
+ HRESULT hr;
+
+ TRACE("iface %p, format %s, format_support %p.\n",
iface, debug_dxgi_format(format), format_support);
- return E_NOTIMPL;
+ hr = d3d11_device_CheckFormatSupport(&device->ID3D11Device_iface, format, format_support);
+ if (SUCCEEDED(hr)) *format_support &= 0x8ffffff;
+ return hr;
}
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device1 *iface,
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 84ffe4e31a2..d64d8ef7acc 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -14046,7 +14046,8 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
if (formats[i].fl_required <= feature_level)
{
- todo_wine ok(supported, "Format %#x - %s not supported, feature_level %#x, format support %#x.\n",
+ todo_wine_if(formats[i].format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM)
+ ok(supported, "Format %#x - %s not supported, feature_level %#x, format support %#x.\n",
format, feature_name, feature_level, format_support[format]);
continue;
}
@@ -14059,6 +14060,9 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
continue;
}
+ todo_wine_if(formats[i].format == DXGI_FORMAT_R16G16B16A16_FLOAT ||
+ formats[i].format == DXGI_FORMAT_R10G10B10A2_UNORM ||
+ formats[i].format == DXGI_FORMAT_R32_UINT)
ok(!supported, "Format %#x - %s supported, feature level %#x, format support %#x.\n",
format, feature_name, feature_level, format_support[format]);
}
@@ -14066,6 +14070,15 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
static void test_required_format_support(const D3D_FEATURE_LEVEL feature_level)
{
+ static const UINT expected = D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER |
+ D3D11_FORMAT_SUPPORT_TEXTURE1D | D3D11_FORMAT_SUPPORT_TEXTURE2D |
+ D3D11_FORMAT_SUPPORT_TEXTURE3D | D3D11_FORMAT_SUPPORT_TEXTURECUBE |
+ D3D11_FORMAT_SUPPORT_MIP | D3D11_FORMAT_SUPPORT_MIP_AUTOGEN |
+ D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_BLENDABLE |
+ D3D11_FORMAT_SUPPORT_DISPLAY /* | D3D11_FORMAT_SUPPORT_SHADER_LOAD
+ D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | D3D11_FORMAT_SUPPORT_CPU_LOCKABLE |
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE | D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET */;
unsigned int format_support[DXGI_FORMAT_B4G4R4A4_UNORM + 1];
struct device_desc device_desc;
ID3D11Device *device;
@@ -14093,6 +14106,24 @@ static void test_required_format_support(const D3D_FEATURE_LEVEL feature_level)
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
ok(!support, "Got unexpected format support %#x.\n", support);
+ /* crashes on Windows, even though MSDN states the function returns E_INVALIDARG */
+ if (0)
+ {
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_R8G8B8A8_UNORM, NULL);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %#x.\n", hr);
+ }
+
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_UNKNOWN, &support);
+ ok(hr == E_FAIL, "Expected E_FAIL, got %#x.\n", hr);
+
+ hr = ID3D11Device_CheckFormatSupport(device, 0xdeadbeef, &support);
+ ok(hr == E_FAIL, "Expected E_FAIL, got %#x.\n", hr);
+
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_R8G8B8A8_UNORM, &support);
+ ok(hr == S_OK, "Expected S_OK, got %#x.\n", hr);
+ ok((support & expected) == expected, "Expected the following features to be supported: %#x.\n",
+ (support ^ expected) & expected);
+
memset(format_support, 0, sizeof(format_support));
for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
{
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 9614e16d9dc..6fe22003489 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -5254,10 +5254,23 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
case WINED3D_RTYPE_NONE:
allowed_usage = WINED3DUSAGE_DEPTHSTENCIL
| WINED3DUSAGE_RENDERTARGET;
- gl_type = WINED3D_GL_RES_TYPE_TEX_2D;
+ gl_type = WINED3D_GL_RES_TYPE_TEX_1D;
gl_type_end = WINED3D_GL_RES_TYPE_TEX_3D;
break;
+ case WINED3D_RTYPE_TEXTURE_1D:
+ allowed_usage = WINED3DUSAGE_DYNAMIC
+ | WINED3DUSAGE_SOFTWAREPROCESSING
+ | WINED3DUSAGE_TEXTURE
+ | WINED3DUSAGE_QUERY_FILTER
+ | WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
+ | WINED3DUSAGE_QUERY_SRGBREAD
+ | WINED3DUSAGE_QUERY_SRGBWRITE
+ | WINED3DUSAGE_QUERY_VERTEXTEXTURE
+ | WINED3DUSAGE_QUERY_WRAPANDMIP;
+ gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_1D;
+ break;
+
case WINED3D_RTYPE_TEXTURE_2D:
allowed_usage = WINED3DUSAGE_DEPTHSTENCIL
| WINED3DUSAGE_RENDERTARGET
@@ -5314,6 +5327,12 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_3D;
break;
+ case WINED3D_RTYPE_BUFFER:
+ allowed_usage = WINED3DUSAGE_DYNAMIC
+ | WINED3DUSAGE_QUERY_VERTEXTEXTURE;
+ gl_type = gl_type_end = WINED3D_GL_RES_TYPE_BUFFER;
+ break;
+
default:
FIXME("Unhandled resource type %s.\n", debug_d3dresourcetype(resource_type));
return WINED3DERR_NOTAVAILABLE;
--
2.13.0

View File

@ -1,16 +1,16 @@
From cd32330bc6d35331524eb1deef302fa8f5f6d4de Mon Sep 17 00:00:00 2001
From 0960e201efd83f9ca6d8d2cf3d93760e3b7b84a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 20 Feb 2017 00:27:25 +0100
Subject: wined3d: Improve wined3d_cs_emit_update_sub_resource.
---
dlls/wined3d/cs.c | 74 ++++++++++++++++++++++++++++++++++++++++--
dlls/wined3d/cs.c | 76 ++++++++++++++++++++++++++++++++++++++++--
dlls/wined3d/device.c | 2 --
dlls/wined3d/wined3d_private.h | 1 +
3 files changed, 73 insertions(+), 4 deletions(-)
3 files changed, 75 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index b20008d55e7..aa83a546e87 100644
index b8bad5bc91b..5e365a37d93 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -402,6 +402,7 @@ struct wined3d_cs_update_sub_resource
@ -21,7 +21,7 @@ index b20008d55e7..aa83a546e87 100644
};
struct wined3d_cs_add_dirty_texture_region
@@ -2138,6 +2139,49 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2138,6 +2139,51 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
unsigned int slice_pitch)
{
struct wined3d_cs_update_sub_resource *op;
@ -45,6 +45,8 @@ index b20008d55e7..aa83a546e87 100644
+ case WINED3D_RTYPE_BUFFER:
+ data_size = box->right - box->left;
+ break;
+ case WINED3D_RTYPE_NONE:
+ return;
+ }
+
+ size = FIELD_OFFSET(struct wined3d_cs_update_sub_resource, copy_data[data_size]);
@ -71,7 +73,7 @@ index b20008d55e7..aa83a546e87 100644
op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
@@ -2151,8 +2195,6 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2151,8 +2197,6 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
wined3d_resource_acquire(resource);
cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP);
@ -80,7 +82,7 @@ index b20008d55e7..aa83a546e87 100644
cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP);
}
@@ -2279,6 +2321,11 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2279,6 +2323,11 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW */ wined3d_cs_exec_clear_unordered_access_view,
};
@ -92,7 +94,7 @@ index b20008d55e7..aa83a546e87 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
{
if (size > (cs->data_size - cs->end))
@@ -2332,6 +2379,7 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2332,6 +2381,7 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
static const struct wined3d_cs_ops wined3d_cs_st_ops =
{
@ -100,7 +102,7 @@ index b20008d55e7..aa83a546e87 100644
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
wined3d_cs_st_finish,
@@ -2364,6 +2412,19 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2364,6 +2414,19 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
wined3d_cs_queue_submit(&cs->queue[queue_id], cs);
}
@ -120,7 +122,7 @@ index b20008d55e7..aa83a546e87 100644
static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs)
{
size_t queue_size = ARRAY_SIZE(queue->data);
@@ -2425,6 +2486,14 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
@@ -2425,6 +2488,14 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
return packet->data;
}
@ -135,7 +137,7 @@ index b20008d55e7..aa83a546e87 100644
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
{
if (cs->thread_id == GetCurrentThreadId())
@@ -2444,6 +2513,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2444,6 +2515,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
static const struct wined3d_cs_ops wined3d_cs_mt_ops =
{
@ -144,10 +146,10 @@ index b20008d55e7..aa83a546e87 100644
wined3d_cs_mt_submit,
wined3d_cs_mt_finish,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index fa01f8a15e0..0a638ecf19a 100644
index 11a348b7a55..208a10c92f9 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4298,8 +4298,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4222,8 +4222,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
@ -157,10 +159,10 @@ index fa01f8a15e0..0a638ecf19a 100644
{
if (sub_resource_idx > 0)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6920b29329f..b6f0dd3a90c 100644
index a80e88424f5..1c9f290f847 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3318,6 +3318,7 @@ struct wined3d_cs_queue
@@ -3390,6 +3390,7 @@ struct wined3d_cs_queue
struct wined3d_cs_ops
{
@ -169,5 +171,5 @@ index 6920b29329f..b6f0dd3a90c 100644
void (*submit)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
void (*finish)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
--
2.12.2
2.13.0

View File

@ -47,7 +47,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
};
struct wined3d_cs_add_dirty_texture_region
@@ -2138,22 +2141,78 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2138,22 +2141,80 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
unsigned int slice_pitch)
{
struct wined3d_cs_update_sub_resource *op;
@ -75,6 +75,8 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
+ case WINED3D_RTYPE_BUFFER:
+ data_size = box->right - box->left;
+ break;
+ case WINED3D_RTYPE_NONE:
+ return;
+ }
+
+ size = FIELD_OFFSET(struct wined3d_cs_update_sub_resource, copy_data[data_size]);
@ -126,7 +128,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
}
static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data)
@@ -2279,6 +2338,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2279,6 +2340,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW */ wined3d_cs_exec_clear_unordered_access_view,
};
@ -140,7 +142,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
{
if (size > (cs->data_size - cs->end))
@@ -2332,6 +2398,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2332,6 +2400,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
static const struct wined3d_cs_ops wined3d_cs_st_ops =
{
@ -150,7 +152,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
wined3d_cs_st_finish,
@@ -2364,6 +2433,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2364,6 +2435,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
wined3d_cs_queue_submit(&cs->queue[queue_id], cs);
}
@ -172,7 +174,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs)
{
size_t queue_size = ARRAY_SIZE(queue->data);
@@ -2425,6 +2509,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
@@ -2425,6 +2511,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
return packet->data;
}
@ -189,7 +191,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
{
if (cs->thread_id == GetCurrentThreadId())
@@ -2444,6 +2538,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2444,6 +2540,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
static const struct wined3d_cs_ops wined3d_cs_mt_ops =
{
@ -212,7 +214,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_device_delete_opengl_contexts(device);
if (device->fb.depth_stencil)
@@ -4241,6 +4244,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4165,6 +4168,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
return WINED3DERR_INVALIDCALL;
}
@ -220,7 +222,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
{
WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
@@ -4251,6 +4255,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4175,6 +4179,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
{
WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
return WINED3DERR_INVALIDCALL;
@ -240,7 +242,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
if (!src_box)
@@ -5292,3 +5309,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -5216,3 +5233,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}

View File

@ -1,29 +0,0 @@
From ddf59a2c4bed6165d79c2cc7655c8151d99e7965 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 14 Feb 2016 19:32:45 +0100
Subject: wined3d: Display FIXME for cmp function 0 only once.
---
dlls/wined3d/state.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 21e49eb..8f7c9bd 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -241,8 +241,11 @@ GLenum wined3d_gl_compare_func(enum wined3d_cmp_func f)
case WINED3D_CMP_ALWAYS:
return GL_ALWAYS;
default:
- FIXME("Unrecognized compare function %#x.\n", f);
+ {
+ static int once;
+ if (f || !once++) FIXME("Unrecognized compare function %#x.\n", f);
return GL_NONE;
+ }
}
}
--
2.7.1

View File

@ -1,164 +0,0 @@
From 77435a91bb511b8d6eec9f5ca503ce6049395673 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 28 Aug 2016 04:07:01 +0200
Subject: wined3d: Add wined3d_check_device_format_support.
---
dlls/wined3d/device.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/wined3d.spec | 1 +
include/wine/wined3d.h | 33 ++++++++++++++++++++
3 files changed, 110 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2005341960c..b0ed1ea6b4a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3243,6 +3243,82 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
return device->state.textures[stage];
}
+void CDECL wined3d_check_device_format_support(struct wined3d_device *device,
+ enum wined3d_format_id check_format_id, UINT *support)
+{
+ const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, check_format_id, 0);
+ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
+
+ UINT support_flags = 0;
+
+ if (format->flags[WINED3D_GL_RES_TYPE_BUFFER] & WINED3DFMT_FLAG_TEXTURE)
+ {
+ support_flags |= WINED3D_FORMAT_SUPPORT_BUFFER;
+ support_flags |= WINED3D_FORMAT_SUPPORT_IA_VERTEX_BUFFER;
+ support_flags |= WINED3D_FORMAT_SUPPORT_IA_INDEX_BUFFER;
+ support_flags |= WINED3D_FORMAT_SUPPORT_SO_BUFFER;
+ }
+
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_1D] & WINED3DFMT_FLAG_TEXTURE)
+ support_flags |= WINED3D_FORMAT_SUPPORT_TEXTURE1D;
+
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_TEXTURE)
+ {
+ support_flags |= WINED3D_FORMAT_SUPPORT_TEXTURE2D;
+
+ if (gl_info->supported[EXT_TEXTURE_ARRAY])
+ support_flags |= WINED3D_FORMAT_SUPPORT_TEXTURECUBE;
+
+ /* OpenGL requires that all officially supported formats support mip mapping */
+ support_flags |= WINED3D_FORMAT_SUPPORT_MIP;
+
+ if (support_flags & gl_info->supported[SGIS_GENERATE_MIPMAP])
+ support_flags |= WINED3D_FORMAT_SUPPORT_MIP_AUTOGEN;
+
+ /* For the following flags it should be sufficient to check only 2d textures */
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_RENDERTARGET)
+ support_flags |= WINED3D_FORMAT_SUPPORT_RENDER_TARGET;
+
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)
+ support_flags |= WINED3D_FORMAT_SUPPORT_BLENDABLE;
+
+ if ((format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_DEPTH) &&
+ (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_STENCIL))
+ support_flags |= WINED3D_FORMAT_SUPPORT_DEPTH_STENCIL;
+
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)
+ support_flags |= WINED3D_FORMAT_SUPPORT_BLENDABLE;
+
+ /* not sure how to test the following flags - assuming yes */
+ support_flags |= WINED3D_FORMAT_SUPPORT_SHADER_LOAD;
+ support_flags |= WINED3D_FORMAT_SUPPORT_SHADER_SAMPLE;
+ support_flags |= WINED3D_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON;
+ support_flags |= WINED3D_FORMAT_SUPPORT_SHADER_GATHER;
+ support_flags |= WINED3D_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON;
+
+ support_flags |= WINED3D_FORMAT_SUPPORT_CPU_LOCKABLE;
+ support_flags |= WINED3D_FORMAT_SUPPORT_DISPLAY;
+ support_flags |= WINED3D_FORMAT_SUPPORT_BACK_BUFFER_CAST;
+ support_flags |= WINED3D_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW;
+ support_flags |= WINED3D_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON;
+ }
+
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_3D] & WINED3DFMT_FLAG_TEXTURE)
+ support_flags |= WINED3D_FORMAT_SUPPORT_TEXTURE3D;
+
+ if (gl_info->supported[ARB_MULTISAMPLE])
+ {
+ /* TODO: check if multisampling for this format is supported */
+ support_flags |= WINED3D_FORMAT_SUPPORT_MULTISAMPLE_LOAD;
+ support_flags |= WINED3D_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE;
+
+ if (support_flags & WINED3D_FORMAT_SUPPORT_RENDER_TARGET)
+ support_flags |= WINED3D_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET;
+ }
+
+ *support = support_flags;
+}
+
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps)
{
TRACE("device %p, caps %p.\n", device, caps);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index af3878ea9d0..f3c826e4f04 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -5,6 +5,7 @@
@ cdecl wined3d_check_depth_stencil_match(ptr long long long long long)
@ cdecl wined3d_check_device_format(ptr long long long long long long)
@ cdecl wined3d_check_device_format_conversion(ptr long long long long)
+@ cdecl wined3d_check_device_format_support(ptr long ptr)
@ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr)
@ cdecl wined3d_check_device_type(ptr long long long long long)
@ cdecl wined3d_create(long)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index b511955388e..308b5fb07ec 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -806,6 +806,37 @@ enum wined3d_shader_byte_code_format
WINED3D_SHADER_BYTE_CODE_FORMAT_SM4 = 1,
};
+enum wined3d_format_support
+{
+ WINED3D_FORMAT_SUPPORT_BUFFER = 0x0000001,
+ WINED3D_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x0000002,
+ WINED3D_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x0000004,
+ WINED3D_FORMAT_SUPPORT_SO_BUFFER = 0x0000008,
+ WINED3D_FORMAT_SUPPORT_TEXTURE1D = 0x0000010,
+ WINED3D_FORMAT_SUPPORT_TEXTURE2D = 0x0000020,
+ WINED3D_FORMAT_SUPPORT_TEXTURE3D = 0x0000040,
+ WINED3D_FORMAT_SUPPORT_TEXTURECUBE = 0x0000080,
+ WINED3D_FORMAT_SUPPORT_SHADER_LOAD = 0x0000100,
+ WINED3D_FORMAT_SUPPORT_SHADER_SAMPLE = 0x0000200,
+ WINED3D_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x0000400,
+ WINED3D_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x0000800,
+ WINED3D_FORMAT_SUPPORT_MIP = 0x0001000,
+ WINED3D_FORMAT_SUPPORT_MIP_AUTOGEN = 0x0002000,
+ WINED3D_FORMAT_SUPPORT_RENDER_TARGET = 0x0004000,
+ WINED3D_FORMAT_SUPPORT_BLENDABLE = 0x0008000,
+ WINED3D_FORMAT_SUPPORT_DEPTH_STENCIL = 0x0010000,
+ WINED3D_FORMAT_SUPPORT_CPU_LOCKABLE = 0x0020000,
+ WINED3D_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x0040000,
+ WINED3D_FORMAT_SUPPORT_DISPLAY = 0x0080000,
+ WINED3D_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x0100000,
+ WINED3D_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x0200000,
+ WINED3D_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x0400000,
+ WINED3D_FORMAT_SUPPORT_SHADER_GATHER = 0x0800000,
+ WINED3D_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000,
+ WINED3D_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000,
+ WINED3D_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x4000000,
+};
+
#define WINED3DCOLORWRITEENABLE_RED (1u << 0)
#define WINED3DCOLORWRITEENABLE_GREEN (1u << 1)
#define WINED3DCOLORWRITEENABLE_BLUE (1u << 2)
@@ -2081,6 +2112,8 @@ HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT
HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_device_type device_type, enum wined3d_format_id source_format_id,
enum wined3d_format_id target_format_id);
+void CDECL wined3d_check_device_format_support(struct wined3d_device *device,
+ enum wined3d_format_id check_format_id, UINT *support);
HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed,
enum wined3d_multisample_type multisample_type, DWORD *quality_levels);
--
2.11.0

View File

@ -1,117 +0,0 @@
From ce5eb9e41f77ae797dcc4d653cdc99e4ff9351f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 28 Aug 2016 04:08:38 +0200
Subject: d3d11: Implement ID3D11Device_CheckFormatSupport.
FIXME: Add flag conversion in d3d11_device_CheckFormatSupport.
---
dlls/d3d11/device.c | 19 +++++++++++++++++--
dlls/d3d11/tests/d3d11.c | 31 ++++++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 72e6a71..131cb9d 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -2701,9 +2701,24 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device *i
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device *iface, DXGI_FORMAT format,
UINT *format_support)
{
- FIXME("iface %p, format %u, format_support %p stub!\n", iface, format, format_support);
+ struct d3d_device *device = impl_from_ID3D11Device(iface);
+ enum wined3d_format_id d3d_format;
- return E_NOTIMPL;
+ FIXME("iface %p, format %s, format_support %p semi-stub!\n",
+ iface, debug_dxgi_format(format), format_support);
+
+ if (!format_support)
+ return E_INVALIDARG;
+
+ d3d_format = wined3dformat_from_dxgi_format(format);
+ if (d3d_format == WINED3DFMT_UNKNOWN)
+ return E_FAIL;
+
+ wined3d_mutex_lock();
+ wined3d_check_device_format_support(device->wined3d_device, d3d_format, format_support);
+ wined3d_mutex_unlock();
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels(ID3D11Device *iface,
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 123676d..84a51ff 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -10515,6 +10515,7 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
if (formats[i].fl_required <= feature_level)
{
+ todo_wine_if(formats[i].format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM)
ok(supported, "Format %#x - %s not supported, feature_level %#x, format support %#x.\n",
format, feature_name, feature_level, format_support[format]);
continue;
@@ -10528,6 +10529,9 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
continue;
}
+ todo_wine_if(formats[i].format == DXGI_FORMAT_R16G16B16A16_FLOAT ||
+ formats[i].format == DXGI_FORMAT_R10G10B10A2_UNORM ||
+ formats[i].format == DXGI_FORMAT_R32_UINT)
ok(!supported, "Format %#x - %s supported, feature level %#x, format support %#x.\n",
format, feature_name, feature_level, format_support[format]);
}
@@ -10535,11 +10539,18 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
static void test_required_format_support(const D3D_FEATURE_LEVEL feature_level)
{
+ static const UINT expected = D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER | D3D11_FORMAT_SUPPORT_TEXTURE2D |
+ D3D11_FORMAT_SUPPORT_TEXTURE3D | D3D11_FORMAT_SUPPORT_TEXTURECUBE | D3D11_FORMAT_SUPPORT_SHADER_LOAD |
+ D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | D3D11_FORMAT_SUPPORT_MIP | D3D11_FORMAT_SUPPORT_MIP_AUTOGEN |
+ D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_BLENDABLE | D3D11_FORMAT_SUPPORT_CPU_LOCKABLE |
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE | D3D11_FORMAT_SUPPORT_DISPLAY |
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET | D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST;
unsigned int format_support[DXGI_FORMAT_B4G4R4A4_UNORM + 1];
struct device_desc device_desc;
ID3D11Device *device;
DXGI_FORMAT format;
ULONG refcount;
+ UINT supported;
HRESULT hr;
static const struct format_support index_buffers[] =
@@ -10556,11 +10567,29 @@ static void test_required_format_support(const D3D_FEATURE_LEVEL feature_level)
return;
}
+ /* crashes on Windows, even though MSDN states the function returns E_INVALIDARG */
+ if (0)
+ {
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_R8G8B8A8_UNORM, NULL);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %#x.\n", hr);
+ }
+
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_UNKNOWN, &supported);
+ ok(hr == E_FAIL, "Expected E_FAIL, got %#x.\n", hr);
+
+ hr = ID3D11Device_CheckFormatSupport(device, 0xdeadbeef, &supported);
+ ok(hr == E_FAIL, "Expected E_FAIL, got %#x.\n", hr);
+
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_R8G8B8A8_UNORM, &supported);
+ ok(hr == S_OK, "Expected S_OK, got %#x.\n", hr);
+ ok((supported & expected) == expected, "Expected the following features to be supported: %#x.\n",
+ (supported ^ expected) & expected);
+
memset(format_support, 0, sizeof(format_support));
for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
{
hr = ID3D11Device_CheckFormatSupport(device, format, &format_support[format]);
- todo_wine ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
+ ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
"Got unexpected result for format %#x: hr %#x, format_support %#x.\n",
format, hr, format_support[format]);
}
--
2.9.0

View File

@ -1,58 +0,0 @@
From 1ec823158412e5250d763c6b2550781a3127e59a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 28 Feb 2017 23:04:04 +0100
Subject: d3d11: Implement ID3D10Device_CheckFormatSupport.
---
dlls/d3d10core/tests/device.c | 2 +-
dlls/d3d11/device.c | 20 +++++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 7b27d9f6a4c..21dd1bc8dbf 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -10076,7 +10076,7 @@ static void test_required_format_support(void)
for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
{
hr = ID3D10Device_CheckFormatSupport(device, format, &format_support[format]);
- todo_wine ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
+ ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
"Got unexpected result for format %#x: hr %#x, format_support %#x.\n",
format, hr, format_support[format]);
}
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index ef8d01696e7..5a1c28a4857 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -7274,10 +7274,24 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateCounter(ID3D10Device1 *iface
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device1 *iface,
DXGI_FORMAT format, UINT *format_support)
{
- FIXME("iface %p, format %s, format_support %p stub!\n",
- iface, debug_dxgi_format(format), format_support);
+ struct d3d_device *device = impl_from_ID3D10Device(iface);
+ enum wined3d_format_id d3d_format;
- return E_NOTIMPL;
+ FIXME("iface %p, format %s, format_support %p semi-stub!\n",
+ iface, debug_dxgi_format(format), format_support);
+
+ if (!format_support)
+ return E_INVALIDARG;
+
+ d3d_format = wined3dformat_from_dxgi_format(format);
+ if (d3d_format == WINED3DFMT_UNKNOWN)
+ return E_FAIL;
+
+ wined3d_mutex_lock();
+ wined3d_check_device_format_support(device->wined3d_device, d3d_format, format_support);
+ wined3d_mutex_unlock();
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device1 *iface,
--
2.11.0

View File

@ -1 +0,0 @@
Fixes: Implement semi-stub for d3d11_device_CheckFormatSupport

View File

@ -1,4 +1,4 @@
From 766c2610e0be47ab4fb30d0fb0782dec26e2a13d Mon Sep 17 00:00:00 2001
From 1d24995332c39743760ca0f978fe040761631bc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 29 Mar 2017 03:05:05 +0200
Subject: wininet: Return failure when handling http redirect without hostname.
@ -9,10 +9,10 @@ Subject: wininet: Return failure when handling http redirect without hostname.
2 files changed, 35 insertions(+)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index f01081843b..b5acc59fdf 100644
index e15a284fb63..06b8e3dac77 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -4057,6 +4057,9 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
@@ -4070,6 +4070,9 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
if(!InternetCrackUrlW(lpszUrl, strlenW(lpszUrl), 0, &urlComponents))
return INTERNET_GetLastError();
@ -23,10 +23,10 @@ index f01081843b..b5acc59fdf 100644
if(request->hdr.dwFlags & INTERNET_FLAG_SECURE) {
TRACE("redirect from secure page to non-secure page\n");
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 940765c5b6..7a5691a816 100644
index 478d983f7db..d32120f2307 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -2062,6 +2062,12 @@ static const char ok_with_length2[] =
@@ -2088,6 +2088,12 @@ static const char ok_with_length2[] =
"Content-Length: 19\r\n\r\n"
"HTTP/1.1 211 OK\r\n\r\n";
@ -39,7 +39,7 @@ index 940765c5b6..7a5691a816 100644
struct server_info {
HANDLE hEvent;
int port;
@@ -2472,6 +2478,10 @@ static DWORD CALLBACK server_thread(LPVOID param)
@@ -2498,6 +2504,10 @@ static DWORD CALLBACK server_thread(LPVOID param)
else
send(c, noauthmsg, sizeof noauthmsg-1, 0);
}
@ -50,11 +50,11 @@ index 940765c5b6..7a5691a816 100644
shutdown(c, 2);
closesocket(c);
c = -1;
@@ -5492,6 +5502,27 @@ static void test_remove_dot_segments(int port)
@@ -5536,6 +5546,27 @@ static void test_remove_dot_segments(int port)
close_request(&req);
}
+static void test_redirect(int port)
+static void test_redirect_no_host(int port)
+{
+ test_request_t req;
+ BOOL ret;
@ -78,14 +78,14 @@ index 940765c5b6..7a5691a816 100644
static void test_http_connection(void)
{
struct server_info si;
@@ -5545,6 +5576,7 @@ static void test_http_connection(void)
test_connection_break(si.port);
@@ -5590,6 +5621,7 @@ static void test_http_connection(void)
test_long_url(si.port);
test_redirect(si.port);
test_remove_dot_segments(si.port);
+ test_redirect(si.port);
+ test_redirect_no_host(si.port);
/* send the basic request again to shutdown the server thread */
test_basic_request(si.port, "GET", "/quit");
--
2.11.0
2.12.2