Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2020
- 79 participants
- 2102 messages
Re: [PATCH] makefiles: Optionally emit automake-style "silent" output.
by Zebediah Figura
On 9/30/20 3:08 AM, Rémi Bernon wrote:
> On 9/30/20 9:12 AM, Jeff Smith wrote:
>> FWIW, when I attempted a similar patch last September,
>> I got pushback from Alexandre due to him not considering
>> nested macro expansion as portable.
>> I also got pushback against enabling by default.
>>
>> It seems that the conservative approach would be to
>> 1. make the default for silent rules disabled, and
>> 2. only output the WINE_V_ rules to the Makefile
>> if silent rules are enabled.
>>
>> On Mon, Sep 14, 2020 at 10:42 PM Zebediah Figura <z.figura12(a)gmail.com> wrote:
>>>
>>> The subject line of this patch may be a little misleading, upon
>>> reflection, since it's enabled by default. That fact could easily be
>>> changed; I only did so since automake also enables its silent output by
>>> default.
>>>
>>
>
> Note that you can also enable fully silent build by defining a .SILENT:
> rule, in a wrapper Makefile for instance. I'm personally not really sure
> how useful a semi-silent build is.
>
Unfortunate. I would have appreciated a patch like this, as it helps me
gauge build progress, but if there's no way to do it portably then I'll
just drop it.
Sept. 30, 2020
[PATCH v2 3/3] d3d9/tests: Add interactive test for window pos messages received when restoring a window after device lost.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/d3d9/tests/device.c | 55 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 53a83ad..4501feb 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -11404,6 +11404,35 @@ static void test_writeonly_resource(void)
DestroyWindow(window);
}
+static BOOL test_lost_device_focus_set, test_lost_device_pos_changed_ok;
+static WNDPROC test_lost_device_orig_proc;
+
+static LRESULT CALLBACK test_lost_device_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg)
+ {
+ case WM_SETFOCUS:
+ test_lost_device_focus_set = TRUE;
+ break;
+ case WM_WINDOWPOSCHANGED:
+ if (!IsIconic(hwnd))
+ {
+ WINDOWPOS *p = (WINDOWPOS*)lParam;
+ MONITORINFO mi;
+
+ mi.cbSize = sizeof(mi);
+ GetMonitorInfoA(MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST), &mi);
+
+ if (p->x == mi.rcMonitor.left && p->y == mi.rcMonitor.top &&
+ p->cx == registry_mode.dmPelsWidth && p->cy == registry_mode.dmPelsHeight &&
+ !(p->flags & (SWP_NOMOVE | SWP_NOSIZE)))
+ test_lost_device_pos_changed_ok = TRUE;
+ }
+ break;
+ }
+ return CallWindowProcA(test_lost_device_orig_proc, hwnd, msg, wParam, lParam);
+}
+
static void test_lost_device(void)
{
struct device_desc device_desc;
@@ -11440,6 +11469,32 @@ static void test_lost_device(void)
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3DERR_DEVICELOST, "Got unexpected hr %#x.\n", hr);
+ if (winetest_interactive)
+ {
+ MSG msg;
+
+ test_lost_device_focus_set = FALSE;
+ test_lost_device_orig_proc = (WNDPROC)SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)test_lost_device_proc);
+
+ trace("Please restore the minimized d3d9_test by clicking on it.\n");
+ while (GetMessageA(&msg, NULL, 0, 0) > 0 && !test_lost_device_focus_set)
+ {
+ TranslateMessage(&msg);
+ DispatchMessageA(&msg);
+ }
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessageA(&msg);
+ }
+ SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)test_lost_device_orig_proc);
+
+ ok(test_lost_device_pos_changed_ok,
+ "WM_WINDOWPOSCHANGED was never sent with swapchain fullscreen size while window was not minimized.\n");
+ ret = SetForegroundWindow(GetDesktopWindow());
+ ok(ret, "Failed to set foreground window.\n");
+ }
+
ret = ShowWindow(window, SW_RESTORE);
ok(ret, "Failed to restore window.\n");
ret = SetForegroundWindow(window);
--
2.21.0
Sept. 30, 2020
[PATCH v2 2/3] wined3d: Update the swapchain windows' sizes after it has been unminimized.
by Gabriel Ivăncescu
Fixes a regression introduced by commit
82c6ec3a32f44e8b3e0cc88b7f10e0c0d7fa1b89, which caused the WM_ACTIVATEAPP
to be sent while the window is minimized, if it has been clicked on in the
taskbar to be restored. The behavior is correct wrt Windows, but some games
expect the window pos change messages to be sent while they are unminimized,
but we only sent it during the WM_ACTIVATEAPP hook.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
I've added an interactive test in the next patch that the game depends on,
and will fail without this patch.
dlls/wined3d/device.c | 11 ++++++++---
dlls/wined3d/swapchain.c | 3 ++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b077d53..343df46 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5845,6 +5845,8 @@ void device_invalidate_state(const struct wined3d_device *device, unsigned int s
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode,
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
{
+ unsigned int i;
+
if (message == WM_DESTROY)
{
TRACE("unregister window %p.\n", window);
@@ -5859,13 +5861,11 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
}
else if (message == WM_ACTIVATEAPP)
{
- unsigned int i = device->swapchain_count;
-
/* Deactivating the implicit swapchain may cause the application
* (e.g. Deus Ex: GOTY) to destroy the device, so take care to
* deactivate the implicit swapchain last, and to avoid accessing the
* "device" pointer afterwards. */
- while (i--)
+ for (i = device->swapchain_count; i--;)
wined3d_swapchain_activate(device->swapchains[i], wparam);
}
else if (message == WM_SYSCOMMAND)
@@ -5876,6 +5876,11 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
DefWindowProcW(window, message, wparam, lparam);
else
DefWindowProcA(window, message, wparam, lparam);
+
+ /* Heroes of Might and Magic V depends on this being
+ done after the window has been unminimized. */
+ for (i = device->swapchain_count; i--;)
+ wined3d_swapchain_update_window_size(device->swapchains[i]);
}
}
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 8741ed2..32f52b1 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -1839,7 +1839,8 @@ void wined3d_swapchain_update_window_size(struct wined3d_swapchain *swapchain)
struct wined3d_output *output;
HRESULT hr;
- if (swapchain->device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES)
+ if (swapchain->device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES ||
+ IsIconic(swapchain->state.device_window))
return;
output = wined3d_swapchain_get_output(swapchain);
--
2.21.0
Sept. 30, 2020
[PATCH v2 1/3] wined3d: Move the window resize during swapchain activation to a separate function.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/wined3d/swapchain.c | 49 ++++++++++++++++++++++------------
dlls/wined3d/wined3d_private.h | 1 +
2 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 6270c36..8741ed2 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -1763,7 +1763,6 @@ void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activa
{
struct wined3d_device *device = swapchain->device;
HWND window = swapchain->state.device_window;
- struct wined3d_output_desc output_desc;
unsigned int screensaver_active;
struct wined3d_output *output;
BOOL focus_messages, filter;
@@ -1790,22 +1789,7 @@ void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activa
if ((device->restore_screensaver = !!screensaver_active))
SystemParametersInfoW(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0);
- if (!(device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES))
- {
- /* The d3d versions do not agree on the exact messages here. D3d8 restores
- * the window but leaves the size untouched, d3d9 sets the size on an
- * invisible window, generates messages but doesn't change the window
- * properties. The implementation follows d3d9.
- *
- * Guild Wars 1 wants a WINDOWPOSCHANGED message on the device window to
- * resume drawing after a focus loss. */
- if (SUCCEEDED(hr = wined3d_output_get_desc(output, &output_desc)))
- SetWindowPos(window, NULL, output_desc.desktop_rect.left,
- output_desc.desktop_rect.top, swapchain->state.desc.backbuffer_width,
- swapchain->state.desc.backbuffer_height, SWP_NOACTIVATE | SWP_NOZORDER);
- else
- ERR("Failed to get output description, hr %#x.\n", hr);
- }
+ wined3d_swapchain_update_window_size(swapchain);
if (device->wined3d->flags & WINED3D_RESTORE_MODE_ON_ACTIVATE)
{
@@ -1849,6 +1833,37 @@ void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activa
wined3d_filter_messages(window, filter);
}
+void wined3d_swapchain_update_window_size(struct wined3d_swapchain *swapchain)
+{
+ struct wined3d_output_desc output_desc;
+ struct wined3d_output *output;
+ HRESULT hr;
+
+ if (swapchain->device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES)
+ return;
+
+ output = wined3d_swapchain_get_output(swapchain);
+ if (!output)
+ {
+ ERR("Failed to get output from swapchain %p.\n", swapchain);
+ return;
+ }
+
+ /* The d3d versions do not agree on the exact messages here. D3d8 restores
+ * the window but leaves the size untouched, d3d9 sets the size on an
+ * invisible window, generates messages but doesn't change the window
+ * properties. The implementation follows d3d9.
+ *
+ * Guild Wars 1 wants a WINDOWPOSCHANGED message on the device window to
+ * resume drawing after a focus loss. */
+ if (SUCCEEDED(hr = wined3d_output_get_desc(output, &output_desc)))
+ SetWindowPos(swapchain->state.device_window, NULL, output_desc.desktop_rect.left,
+ output_desc.desktop_rect.top, swapchain->state.desc.backbuffer_width,
+ swapchain->state.desc.backbuffer_height, SWP_NOACTIVATE | SWP_NOZORDER);
+ else
+ ERR("Failed to get output description, hr %#x.\n", hr);
+}
+
HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapchain, unsigned int buffer_count,
unsigned int width, unsigned int height, enum wined3d_format_id format_id,
enum wined3d_multisample_type multisample_type, unsigned int multisample_quality)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index abc6e0e..2cf4aa6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -5104,6 +5104,7 @@ struct wined3d_swapchain
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
void wined3d_swapchain_cleanup(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
+void wined3d_swapchain_update_window_size(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
struct wined3d_output * wined3d_swapchain_get_output(const struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain,
--
2.21.0
Sept. 30, 2020
[PATCH v2 4/4] server: Remove redundant calls to sock_reselect().
by Zebediah Figura
These are already done in accept_socket() and accept_into_socket() respectively.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
server/sock.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/server/sock.c b/server/sock.c
index 4bafe35b890..f165e86b129 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1427,7 +1427,6 @@ DECL_HANDLER(accept_socket)
{
reply->handle = alloc_handle( current->process, &sock->obj, req->access, req->attributes );
sock->wparam = reply->handle; /* wparam for message is the socket handle */
- sock_reselect( sock );
release_object( &sock->obj );
}
}
@@ -1450,10 +1449,7 @@ DECL_HANDLER(accept_into_socket)
}
if (accept_into_socket( sock, acceptsock ))
- {
acceptsock->wparam = req->ahandle; /* wparam for message is the socket handle */
- sock_reselect( acceptsock );
- }
release_object( acceptsock );
release_object( sock );
}
--
2.28.0
Sept. 30, 2020
[PATCH v2 3/4] server: Return Win32 socket types from get_socket_info.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/ws2_32/socket.c | 6 +++---
server/sock.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index a187d2de8e7..bc61b56667b 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2306,9 +2306,9 @@ static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, i
status = wine_server_call( req );
if (!status)
{
- address_family = convert_af_u2w(reply->family);
- socket_type = convert_socktype_u2w(reply->type);
- protocol = convert_proto_u2w(reply->protocol);
+ address_family = reply->family;
+ socket_type = reply->type;
+ protocol = reply->protocol;
}
}
SERVER_END_REQ;
diff --git a/server/sock.c b/server/sock.c
index 52e85b1e518..4bafe35b890 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -456,7 +456,7 @@ static void sock_poll_event( struct fd *fd, int event )
else
{
/* normal data flow */
- if ( sock->type == SOCK_STREAM && ( event & POLLIN ) )
+ if (sock->type == WS_SOCK_STREAM && (event & POLLIN))
{
char dummy;
int nr;
@@ -546,8 +546,8 @@ static int sock_get_poll_events( struct fd *fd )
else if (smask & FD_READ || (sock->state & FD_WINE_LISTENING && mask & FD_ACCEPT))
ev |= POLLIN | POLLPRI;
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication for stream sockets. */
- else if ( sock->type == SOCK_STREAM && sock->state & FD_READ && mask & FD_CLOSE &&
- !(sock->hmask & FD_READ) )
+ else if (sock->type == WS_SOCK_STREAM && (sock->state & FD_READ) && (mask & FD_CLOSE) &&
+ !(sock->hmask & FD_READ))
ev |= POLLIN;
if (async_queued( &sock->write_q ))
@@ -813,9 +813,9 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u
sock->state = (type != SOCK_STREAM) ? (FD_READ|FD_WRITE) : 0;
sock->flags = flags;
- sock->proto = unix_protocol;
- sock->type = unix_type;
- sock->family = unix_family;
+ sock->proto = protocol;
+ sock->type = type;
+ sock->family = family;
if (sock->fd)
{
@@ -1540,7 +1540,7 @@ DECL_HANDLER(enable_socket_event)
sock->hmask &= ~req->mask;
sock->state |= req->sstate;
sock->state &= ~req->cstate;
- if ( sock->type != SOCK_STREAM ) sock->state &= ~STREAM_FLAG_MASK;
+ if (sock->type != WS_SOCK_STREAM) sock->state &= ~STREAM_FLAG_MASK;
sock_reselect( sock );
--
2.28.0
Sept. 30, 2020
[PATCH v2 2/4] ws2_32: Set default socket options in the server.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
v2: remove diagnostic messages
dlls/ws2_32/socket.c | 39 --------------------------
server/sock.c | 65 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 39 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index d7802cc9cd8..a187d2de8e7 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -7519,7 +7519,6 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
HANDLE handle;
SOCKET ret;
DWORD err;
- int unixaf, unixtype, ipxptype = -1;
/*
FIXME: The "advanced" parameters of WSASocketW (lpProtocolInfo,
@@ -7590,18 +7589,6 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
}
}
- /*
- Windows has an extension to the IPX protocol that allows one to create sockets
- and set the IPX packet type at the same time, to do that a caller will use
- a protocol like NSPROTO_IPX + <PACKET TYPE>
- */
- if (IS_IPX_PROTO(protocol))
- ipxptype = protocol - WS_NSPROTO_IPX;
-
- /* convert the socket family, type and protocol */
- unixaf = convert_af_w2u(af);
- unixtype = convert_socktype_w2u(type);
-
RtlInitUnicodeString(&string, afdW);
InitializeObjectAttributes(&attr, &string, (flags & WSA_FLAG_NO_HANDLE_INHERIT) ? 0 : OBJ_INHERIT, NULL, NULL);
if ((status = NtOpenFile(&handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr,
@@ -7636,32 +7623,6 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
ret = HANDLE2SOCKET(handle);
TRACE("\tcreated %04lx\n", ret );
- if (ipxptype > 0)
- set_ipx_packettype(ret, ipxptype);
-
- if (unixaf == AF_INET || unixaf == AF_INET6)
- {
- /* ensure IP_DONTFRAGMENT is disabled for SOCK_DGRAM and SOCK_RAW, enabled for SOCK_STREAM */
- if (unixtype == SOCK_DGRAM || unixtype == SOCK_RAW) /* in Linux the global default can be enabled */
- set_dont_fragment(ret, unixaf == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, FALSE);
- else if (unixtype == SOCK_STREAM)
- set_dont_fragment(ret, unixaf == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, TRUE);
- }
-
-#ifdef IPV6_V6ONLY
- if (unixaf == AF_INET6)
- {
- int fd = get_sock_fd(ret, 0, NULL);
- if (fd != -1)
- {
- /* IPV6_V6ONLY is set by default on Windows */
- int enable = 1;
- if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &enable, sizeof(enable)))
- WARN("\tsetting IPV6_V6ONLY failed - errno = %i\n", errno);
- release_sock_fd(ret, fd);
- }
- }
-#endif
if (!socket_list_add(ret))
{
CloseHandle(handle);
diff --git a/server/sock.c b/server/sock.c
index f0227c59067..52e85b1e518 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -712,6 +712,36 @@ static int get_unix_protocol( int protocol )
}
}
+static void set_dont_fragment( int fd, int level, int value )
+{
+ int optname;
+
+ if (level == IPPROTO_IP)
+ {
+#ifdef IP_DONTFRAG
+ optname = IP_DONTFRAG;
+#elif defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DO) && defined(IP_PMTUDISC_DONT)
+ optname = IP_MTU_DISCOVER;
+ value = value ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
+#else
+ return;
+#endif
+ }
+ else
+ {
+#ifdef IPV6_DONTFRAG
+ optname = IPV6_DONTFRAG;
+#elif defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO) && defined(IPV6_PMTUDISC_DONT)
+ optname = IPV6_MTU_DISCOVER;
+ value = value ? IPV6_PMTUDISC_DO : IPV6_PMTUDISC_DONT;
+#else
+ return;
+#endif
+ }
+
+ setsockopt( fd, level, optname, &value, sizeof(value) );
+}
+
static int init_socket( struct sock *sock, int family, int type, int protocol, unsigned int flags )
{
unsigned int options = 0;
@@ -746,6 +776,41 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u
return -1;
}
fcntl(sockfd, F_SETFL, O_NONBLOCK); /* make socket nonblocking */
+
+ if (family == WS_AF_IPX && protocol >= WS_NSPROTO_IPX && protocol <= WS_NSPROTO_IPX + 255)
+ {
+#ifdef HAS_IPX
+ int ipx_type = protocol - WS_NSPROTO_IPX;
+
+#ifdef SOL_IPX
+ setsockopt( sockfd, SOL_IPX, IPX_TYPE, &ipx_type, sizeof(ipx_type) );
+#else
+ struct ipx val;
+ /* Should we retrieve val using a getsockopt call and then
+ * set the modified one? */
+ val.ipx_pt = ipx_type;
+ setsockopt( sockfd, 0, SO_DEFAULT_HEADERS, &val, sizeof(val) );
+#endif
+#endif
+ }
+
+ if (unix_family == AF_INET || unix_family == AF_INET6)
+ {
+ /* ensure IP_DONTFRAGMENT is disabled for SOCK_DGRAM and SOCK_RAW, enabled for SOCK_STREAM */
+ if (unix_type == SOCK_DGRAM || unix_type == SOCK_RAW) /* in Linux the global default can be enabled */
+ set_dont_fragment( sockfd, unix_family == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, FALSE );
+ else if (unix_type == SOCK_STREAM)
+ set_dont_fragment( sockfd, unix_family == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, TRUE );
+ }
+
+#ifdef IPV6_V6ONLY
+ if (unix_family == AF_INET6)
+ {
+ static const int enable = 1;
+ setsockopt( sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &enable, sizeof(enable) );
+ }
+#endif
+
sock->state = (type != SOCK_STREAM) ? (FD_READ|FD_WRITE) : 0;
sock->flags = flags;
sock->proto = unix_protocol;
--
2.28.0
Sept. 30, 2020
[PATCH v2 1/4] ws2_32: Pass Win32 socket types to the server.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/ws2_32/socket.c | 39 +---------------
server/sock.c | 105 ++++++++++++++++++++++++++++++++++++++++---
2 files changed, 102 insertions(+), 42 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 36215cc6eff..d7802cc9cd8 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -7601,41 +7601,6 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
/* convert the socket family, type and protocol */
unixaf = convert_af_w2u(af);
unixtype = convert_socktype_w2u(type);
- protocol = convert_proto_w2u(protocol);
-
- /* filter invalid parameters */
- if (protocol < 0)
- {
- /* the type could not be converted */
- if (type && unixtype < 0)
- {
- err = WSAESOCKTNOSUPPORT;
- goto done;
- }
-
- err = WSAEPROTONOSUPPORT;
- goto done;
- }
- if (unixaf < 0)
- {
- /* both family and protocol can't be invalid */
- if (protocol <= 0)
- {
- err = WSAEINVAL;
- goto done;
- }
-
- /* family could not be converted and neither socket type */
- if (unixtype < 0 && af >= 0)
- {
-
- err = WSAESOCKTNOSUPPORT;
- goto done;
- }
-
- err = WSAEAFNOSUPPORT;
- goto done;
- }
RtlInitUnicodeString(&string, afdW);
InitializeObjectAttributes(&attr, &string, (flags & WSA_FLAG_NO_HANDLE_INHERIT) ? 0 : OBJ_INHERIT, NULL, NULL);
@@ -7647,8 +7612,8 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
return INVALID_SOCKET;
}
- create_params.family = unixaf;
- create_params.type = unixtype;
+ create_params.family = af;
+ create_params.type = type;
create_params.protocol = protocol;
create_params.flags = flags & ~(WSA_FLAG_NO_HANDLE_INHERIT | WSA_FLAG_OVERLAPPED);
if ((status = NtDeviceIoControlFile(handle, NULL, NULL, NULL, &io,
diff --git a/server/sock.c b/server/sock.c
index 3bc4780f943..f0227c59067 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -30,6 +30,9 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
#ifdef HAVE_POLL_H
# include <poll.h>
#endif
@@ -51,6 +54,29 @@
# include <linux/rtnetlink.h>
#endif
+#ifdef HAVE_NETIPX_IPX_H
+# include <netipx/ipx.h>
+#elif defined(HAVE_LINUX_IPX_H)
+# ifdef HAVE_ASM_TYPES_H
+# include <asm/types.h>
+# endif
+# ifdef HAVE_LINUX_TYPES_H
+# include <linux/types.h>
+# endif
+# include <linux/ipx.h>
+#endif
+#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS)
+# define HAS_IPX
+#endif
+
+#ifdef HAVE_LINUX_IRDA_H
+# ifdef HAVE_LINUX_TYPES_H
+# include <linux/types.h>
+# endif
+# include <linux/irda.h>
+# define HAS_IRDA
+#endif
+
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
@@ -58,6 +84,7 @@
#include "winerror.h"
#define USE_WS_PREFIX
#include "winsock2.h"
+#include "wsipx.h"
#include "wine/afd.h"
#include "process.h"
@@ -638,12 +665,80 @@ static struct sock *create_socket(void)
return sock;
}
+static int get_unix_family( int family )
+{
+ switch (family)
+ {
+ case WS_AF_INET: return AF_INET;
+ case WS_AF_INET6: return AF_INET6;
+#ifdef HAS_IPX
+ case WS_AF_IPX: return AF_IPX;
+#endif
+#ifdef AF_IRDA
+ case WS_AF_IRDA: return AF_IRDA;
+#endif
+ case WS_AF_UNSPEC: return AF_UNSPEC;
+ default: return -1;
+ }
+}
+
+static int get_unix_type( int type )
+{
+ switch (type)
+ {
+ case WS_SOCK_DGRAM: return SOCK_DGRAM;
+ case WS_SOCK_RAW: return SOCK_RAW;
+ case WS_SOCK_STREAM: return SOCK_STREAM;
+ default: return -1;
+ }
+}
+
+static int get_unix_protocol( int protocol )
+{
+ if (protocol >= WS_NSPROTO_IPX && protocol <= WS_NSPROTO_IPX + 255)
+ return protocol;
+
+ switch (protocol)
+ {
+ case WS_IPPROTO_ICMP: return IPPROTO_ICMP;
+ case WS_IPPROTO_IGMP: return IPPROTO_IGMP;
+ case WS_IPPROTO_IP: return IPPROTO_IP;
+ case WS_IPPROTO_IPIP: return IPPROTO_IPIP;
+ case WS_IPPROTO_IPV6: return IPPROTO_IPV6;
+ case WS_IPPROTO_RAW: return IPPROTO_RAW;
+ case WS_IPPROTO_TCP: return IPPROTO_TCP;
+ case WS_IPPROTO_UDP: return IPPROTO_UDP;
+ default: return -1;
+ }
+}
+
static int init_socket( struct sock *sock, int family, int type, int protocol, unsigned int flags )
{
unsigned int options = 0;
- int sockfd;
+ int sockfd, unix_type, unix_family, unix_protocol;
+
+ unix_family = get_unix_family( family );
+ unix_type = get_unix_type( type );
+ unix_protocol = get_unix_protocol( protocol );
+
+ if (unix_protocol < 0)
+ {
+ if (type && unix_type < 0)
+ set_win32_error( WSAESOCKTNOSUPPORT );
+ else
+ set_win32_error( WSAEPROTONOSUPPORT );
+ return -1;
+ }
+ if (unix_family < 0)
+ {
+ if (family >= 0 && unix_type < 0)
+ set_win32_error( WSAESOCKTNOSUPPORT );
+ else
+ set_win32_error( WSAEAFNOSUPPORT );
+ return -1;
+ }
- sockfd = socket( family, type, protocol );
+ sockfd = socket( unix_family, unix_type, unix_protocol );
if (sockfd == -1)
{
if (errno == EINVAL) set_win32_error( WSAESOCKTNOSUPPORT );
@@ -653,9 +748,9 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u
fcntl(sockfd, F_SETFL, O_NONBLOCK); /* make socket nonblocking */
sock->state = (type != SOCK_STREAM) ? (FD_READ|FD_WRITE) : 0;
sock->flags = flags;
- sock->proto = protocol;
- sock->type = type;
- sock->family = family;
+ sock->proto = unix_protocol;
+ sock->type = unix_type;
+ sock->family = unix_family;
if (sock->fd)
{
--
2.28.0
Sept. 30, 2020
[PATCH] vbscript: Implement redim preserve
by Kevin Puetz
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
---
dlls/vbscript/compile.c | 14 +++++----
dlls/vbscript/interp.c | 57 ++++++++++++++++++++++++++++++++++++
dlls/vbscript/tests/lang.vbs | 56 +++++++++++++++++++++++++++++++++++
dlls/vbscript/vbscript.h | 1 +
4 files changed, 122 insertions(+), 6 deletions(-)
diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c
index 164c2d15cf..2e991b0c0a 100644
--- a/dlls/vbscript/compile.c
+++ b/dlls/vbscript/compile.c
@@ -1128,16 +1128,18 @@ static HRESULT compile_redim_statement(compile_ctx_t *ctx, redim_statement_t *st
unsigned arg_cnt;
HRESULT hres;
- if(stat->preserve) {
- FIXME("Preserving redim not supported\n");
- return E_NOTIMPL;
- }
-
hres = compile_args(ctx, stat->dims, &arg_cnt);
if(FAILED(hres))
return hres;
- return push_instr_bstr_uint(ctx, OP_redim, stat->identifier, arg_cnt);
+ hres = push_instr_bstr_uint(ctx, stat->preserve ? OP_redim_preserve : OP_redim, stat->identifier, arg_cnt);
+ if(FAILED(hres))
+ return hres;
+
+ if(!emit_catch(ctx, 0))
+ return E_OUTOFMEMORY;
+
+ return S_OK;
}
static HRESULT compile_const_statement(compile_ctx_t *ctx, const_statement_t *stat)
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c
index 342b7820ec..4f861ad5d8 100644
--- a/dlls/vbscript/interp.c
+++ b/dlls/vbscript/interp.c
@@ -1291,6 +1291,63 @@ static HRESULT interp_redim(exec_ctx_t *ctx)
return S_OK;
}
+static HRESULT interp_redim_preserve(exec_ctx_t *ctx)
+{
+ BSTR identifier = ctx->instr->arg1.bstr;
+ const unsigned dim_cnt = ctx->instr->arg2.uint;
+ unsigned i;
+ SAFEARRAYBOUND *bounds;
+ SAFEARRAY *array;
+ ref_t ref;
+ HRESULT hres;
+
+ TRACE("%s %u\n", debugstr_w(identifier), dim_cnt);
+
+ hres = lookup_identifier(ctx, identifier, VBDISP_LET, &ref);
+ if(FAILED(hres)) {
+ FIXME("lookup %s failed: %08x\n", debugstr_w(identifier), hres);
+ return hres;
+ }
+
+ if(ref.type != REF_VAR) {
+ FIXME("got ref.type = %d\n", ref.type);
+ return E_FAIL;
+ }
+
+ if(!(V_VT(ref.u.v) & VT_ARRAY)) {
+ FIXME("ReDim Preserve not valid on type %d\n", V_VT(ref.u.v));
+ return E_FAIL;
+ }
+
+ array = V_ARRAY(ref.u.v);
+
+ hres = array_bounds_from_stack(ctx, dim_cnt, &bounds);
+ if(FAILED(hres))
+ return hres;
+
+ if(array == NULL || array->cDims == 0) {
+ /* can initially allocate the array */
+ array = SafeArrayCreate(VT_VARIANT, dim_cnt, bounds);
+ VariantClear(ref.u.v);
+ V_VT(ref.u.v) = VT_ARRAY|VT_VARIANT;
+ V_ARRAY(ref.u.v) = array;
+ return S_OK;
+ } else if(array->cDims != dim_cnt) {
+ /* can't otherwise change the number of dimensions */
+ TRACE("Can't resize %s, cDims %d != %d\n", debugstr_w(identifier), array->cDims, dim_cnt);
+ return MAKE_VBSERROR(VBSE_OUT_OF_BOUNDS);
+ } else {
+ /* can resize the last dimensions (if others match */
+ for(i = 0; i+1 < dim_cnt; ++i) {
+ if(array->rgsabound[array->cDims - 1 - i].cElements != bounds[i].cElements) {
+ TRACE("Can't resize %s, bound[%d] %d != %d\n", debugstr_w(identifier), i, array->rgsabound[i].cElements, bounds[i].cElements);
+ return MAKE_VBSERROR(VBSE_OUT_OF_BOUNDS);
+ }
+ }
+ return SafeArrayRedim(array, &bounds[dim_cnt-1]);
+ }
+}
+
static HRESULT interp_step(exec_ctx_t *ctx)
{
const BSTR ident = ctx->instr->arg2.bstr;
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs
index dc16c50fae..fc762450a3 100644
--- a/dlls/vbscript/tests/lang.vbs
+++ b/dlls/vbscript/tests/lang.vbs
@@ -1412,6 +1412,28 @@ x = 1
redim x(3)
ok ubound(x) = 3, "ubound(x) = " & ubound(x)
+x(0) = 1
+x(1) = 2
+x(2) = 3
+x(2) = 4
+
+redim preserve x(1)
+ok ubound(x) = 1, "ubound(x) = " & ubound(x)
+ok x(0) = 1, "x(0) = " & x(1)
+ok x(1) = 2, "x(1) = " & x(1)
+
+redim preserve x(2)
+ok ubound(x) = 2, "ubound(x) = " & ubound(x)
+ok x(0) = 1, "x(0) = " & x(0)
+ok x(1) = 2, "x(1) = " & x(1)
+ok x(2) = vbEmpty, "x(2) = " & x(2)
+
+on error resume next
+redim preserve x(2,2)
+e = err.number
+on error goto 0
+ok e = 9, "e = " & e ' VBSE_OUT_OF_BOUNDS, cannot change cDims
+
x = Array(1, 2)
redim x(-1)
ok lbound(x) = 0, "lbound(x) = " & lbound(x)
@@ -1422,6 +1444,40 @@ ok ubound(x) = 3, "ubound(x) = " & ubound(x)
ok ubound(x, 1) = 3, "ubound(x, 1) = " & ubound(x, 1)
ok ubound(x, 2) = 2, "ubound(x, 2) = " & ubound(x, 2) & " expected 2"
+redim x(1, 3)
+x(0,0) = 1.1
+x(0,1) = 1.2
+x(0,2) = 1.3
+x(0,3) = 1.4
+x(1,0) = 2.1
+x(1,1) = 2.2
+x(1,2) = 2.3
+x(1,3) = 2.4
+
+redim preserve x(1,1)
+ok ubound(x, 1) = 1, "ubound(x, 1) = " & ubound(x, 1)
+ok ubound(x, 2) = 1, "ubound(x, 2) = " & ubound(x, 2)
+ok x(0,0) = 1.1, "x(0,0) = " & x(0,0)
+ok x(0,1) = 1.2, "x(0,1) = " & x(0,1)
+ok x(1,0) = 2.1, "x(1,0) = " & x(1,0)
+ok x(1,1) = 2.2, "x(1,1) = " & x(1,1)
+
+redim preserve x(1,2)
+ok ubound(x, 1) = 1, "ubound(x, 1) = " & ubound(x, 1)
+ok ubound(x, 2) = 2, "ubound(x, 2) = " & ubound(x, 2)
+ok x(0,0) = 1.1, "x(0,0) = " & x(0,0)
+ok x(0,1) = 1.2, "x(0,1) = " & x(0,1)
+ok x(1,0) = 2.1, "x(1,0) = " & x(1,0)
+ok x(1,1) = 2.2, "x(1,1) = " & x(1,1)
+ok x(0,2) = vbEmpty, "x(0,2) = " & x(0,2)
+ok x(1,2) = vbEmpty, "x(1,2) = " & x(1,1)
+
+on error resume next
+redim preserve x(2,2)
+e = err.number
+on error goto 0
+ok e = 9, "e = " & e ' VBSE_OUT_OF_BOUNDS, can only change rightmost dimension
+
dim staticarray(4)
on error resume next
redim staticarray(3)
diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h
index 1edf7906af..869fb05b6e 100644
--- a/dlls/vbscript/vbscript.h
+++ b/dlls/vbscript/vbscript.h
@@ -265,6 +265,7 @@ typedef enum {
X(or, 1, 0, 0) \
X(pop, 1, ARG_UINT, 0) \
X(redim, 1, ARG_BSTR, ARG_UINT) \
+ X(redim_preserve, 1, ARG_BSTR, ARG_UINT) \
X(ret, 0, 0, 0) \
X(retval, 1, 0, 0) \
X(set_ident, 1, ARG_BSTR, ARG_UINT) \
Sept. 30, 2020
[PATCH v3 2/2] d3d11/tests: Add a test for rendering with deferred contexts.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/d3d11/tests/d3d11.c | 103 +++++++++++++++++++++++++++++++++++++++
1 file changed, 103 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 82a165c62d7..e1a6dd6159b 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -30237,6 +30237,108 @@ static void test_deferred_context_state(void)
release_test_context(&test_context);
}
+static void test_deferred_context_rendering(void)
+{
+ ID3D11DeviceContext *immediate, *deferred;
+ struct d3d11_test_context test_context;
+ D3D11_TEXTURE2D_DESC texture_desc;
+ ID3D11CommandList *list1, *list2;
+ ID3D11RenderTargetView *rtv;
+ ID3D11Texture2D *texture;
+ ID3D11Device *device;
+ DWORD color;
+ HRESULT hr;
+
+ static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ static const float green[] = {0.0f, 1.0f, 0.0f, 1.0f};
+ static const float blue[] = {0.0f, 0.0f, 1.0f, 1.0f};
+
+ if (!init_test_context(&test_context, NULL))
+ return;
+
+ device = test_context.device;
+ immediate = test_context.immediate_context;
+
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, test_context.backbuffer_rtv, white);
+
+ hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred);
+ todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
+ if (hr != S_OK)
+ {
+ release_test_context(&test_context);
+ return;
+ }
+
+ ID3D11DeviceContext_ClearRenderTargetView(deferred, test_context.backbuffer_rtv, green);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, TRUE, &list1);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, TRUE, &list2);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xffffffff, "Got unexpected color %#08x.\n", color);
+
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list1, TRUE);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xff00ff00, "Got unexpected color %#08x.\n", color);
+
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, test_context.backbuffer_rtv, white);
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list1, TRUE);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xff00ff00, "Got unexpected color %#08x.\n", color);
+
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, test_context.backbuffer_rtv, white);
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list2, TRUE);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xffffffff, "Got unexpected color %#08x.\n", color);
+
+ ID3D11CommandList_Release(list2);
+
+ ID3D11DeviceContext_ExecuteCommandList(deferred, list1, TRUE);
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, TRUE, &list2);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, test_context.backbuffer_rtv, white);
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list2, TRUE);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xff00ff00, "Got unexpected color %#08x.\n", color);
+
+ ID3D11CommandList_Release(list2);
+ ID3D11CommandList_Release(list1);
+ ID3D11DeviceContext_Release(deferred);
+
+ ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc);
+ hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture);
+ ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr);
+ hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv);
+ ok(hr == S_OK, "Failed to create view, hr %#x.\n", hr);
+
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, test_context.backbuffer_rtv, white);
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, rtv, green);
+
+ hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred);
+ ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
+
+ ID3D11DeviceContext_CopyResource(deferred, (ID3D11Resource *)test_context.backbuffer, (ID3D11Resource *)texture);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, TRUE, &list1);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ ID3D11DeviceContext_ClearRenderTargetView(immediate, rtv, blue);
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list1, TRUE);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xffff0000, "Got unexpected color %#08x.\n", color);
+
+ ID3D11CommandList_Release(list1);
+ ID3D11DeviceContext_Release(deferred);
+
+ ID3D11RenderTargetView_Release(rtv);
+ ID3D11Texture2D_Release(texture);
+ release_test_context(&test_context);
+}
+
START_TEST(d3d11)
{
unsigned int argc, i;
@@ -30401,6 +30503,7 @@ START_TEST(d3d11)
queue_test(test_independent_blend);
queue_test(test_dual_source_blend);
queue_test(test_deferred_context_state);
+ queue_test(test_deferred_context_rendering);
run_queued_tests();
}
--
2.28.0
Sept. 30, 2020