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
January 2022
- 86 participants
- 2418 messages
[PATCH vkd3d 1/3] vkd3d-shader: Consistently use uint32_t for pointers to shader data.
by Alexandre Julliard
Mixing uint32_t and DWORD pointers causes warnings on Windows.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
libs/vkd3d-shader/dxbc.c | 50 ++++++++++++------------
libs/vkd3d-shader/vkd3d_shader_private.h | 4 +-
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index 4d3773190875..d28c303ab7ac 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -87,7 +87,7 @@ struct vkd3d_shader_src_param_entry
struct vkd3d_shader_sm4_parser
{
- const DWORD *start, *end;
+ const uint32_t *start, *end;
unsigned int output_map[MAX_REG_OUTPUT];
@@ -252,7 +252,7 @@ static void shader_sm4_read_dcl_resource(struct vkd3d_shader_instruction *ins, u
{
struct vkd3d_shader_semantic *semantic = &ins->declaration.semantic;
enum vkd3d_sm4_resource_type resource_type;
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
enum vkd3d_sm4_data_type data_type;
enum vkd3d_data_type reg_data_type;
DWORD components;
@@ -297,7 +297,7 @@ static void shader_sm4_read_dcl_resource(struct vkd3d_shader_instruction *ins, u
static void shader_sm4_read_dcl_constant_buffer(struct vkd3d_shader_instruction *ins, uint32_t opcode,
uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
shader_sm4_read_src_param(priv, &tokens, end, VKD3D_DATA_FLOAT, &ins->declaration.cb.src);
shader_sm4_set_descriptor_register_range(priv, &ins->declaration.cb.src.reg, &ins->declaration.cb.range);
@@ -323,7 +323,7 @@ static void shader_sm4_read_dcl_constant_buffer(struct vkd3d_shader_instruction
static void shader_sm4_read_dcl_sampler(struct vkd3d_shader_instruction *ins, uint32_t opcode, uint32_t opcode_token,
const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
ins->flags = (opcode_token & VKD3D_SM4_SAMPLER_MODE_MASK) >> VKD3D_SM4_SAMPLER_MODE_SHIFT;
if (ins->flags & ~VKD3D_SM4_SAMPLER_COMPARISON)
@@ -342,7 +342,7 @@ static void shader_sm4_read_dcl_index_range(struct vkd3d_shader_instruction *ins
}
static void shader_sm4_read_dcl_output_topology(struct vkd3d_shader_instruction *ins, uint32_t opcode,
- uint32_t opcode_token, const DWORD *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
+ uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
enum vkd3d_sm4_output_primitive_type primitive_type;
@@ -495,7 +495,7 @@ static void shader_sm5_read_dcl_hs_max_tessfactor(struct vkd3d_shader_instructio
}
static void shader_sm5_read_dcl_thread_group(struct vkd3d_shader_instruction *ins, uint32_t opcode,
- uint32_t opcode_token, const DWORD *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
+ uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
ins->declaration.thread_group_size.x = *tokens++;
ins->declaration.thread_group_size.y = *tokens++;
@@ -506,7 +506,7 @@ static void shader_sm5_read_dcl_uav_raw(struct vkd3d_shader_instruction *ins, ui
const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
struct vkd3d_shader_raw_resource *resource = &ins->declaration.raw_resource;
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
shader_sm4_read_dst_param(priv, &tokens, end, VKD3D_DATA_UAV, &resource->resource.reg);
shader_sm4_set_descriptor_register_range(priv, &resource->resource.reg.reg, &resource->resource.range);
@@ -518,7 +518,7 @@ static void shader_sm5_read_dcl_uav_structured(struct vkd3d_shader_instruction *
uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
struct vkd3d_shader_structured_resource *resource = &ins->declaration.structured_resource;
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
shader_sm4_read_dst_param(priv, &tokens, end, VKD3D_DATA_UAV, &resource->resource.reg);
shader_sm4_set_descriptor_register_range(priv, &resource->resource.reg.reg, &resource->resource.range);
@@ -553,7 +553,7 @@ static void shader_sm5_read_dcl_resource_structured(struct vkd3d_shader_instruct
uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
struct vkd3d_shader_structured_resource *resource = &ins->declaration.structured_resource;
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
shader_sm4_read_dst_param(priv, &tokens, end, VKD3D_DATA_RESOURCE, &resource->resource.reg);
shader_sm4_set_descriptor_register_range(priv, &resource->resource.reg.reg, &resource->resource.range);
@@ -567,7 +567,7 @@ static void shader_sm5_read_dcl_resource_raw(struct vkd3d_shader_instruction *in
uint32_t opcode_token, const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv)
{
struct vkd3d_shader_raw_resource *resource = &ins->declaration.raw_resource;
- const DWORD *end = &tokens[token_count];
+ const uint32_t *end = &tokens[token_count];
shader_sm4_read_dst_param(priv, &tokens, end, VKD3D_DATA_RESOURCE, &resource->resource.reg);
shader_sm4_set_descriptor_register_range(priv, &resource->resource.reg.reg, &resource->resource.range);
@@ -1465,7 +1465,7 @@ static void shader_sm4_read_instruction(struct vkd3d_shader_parser *parser, stru
const uint32_t **ptr = &parser->ptr;
unsigned int i, len;
size_t remaining;
- const DWORD *p;
+ const uint32_t *p;
DWORD precise;
list_move_head(&sm4->src_free, &sm4->src);
@@ -1692,7 +1692,7 @@ static bool require_space(size_t offset, size_t count, size_t size, size_t data_
return !count || (data_size - offset) / count >= size;
}
-static void read_dword(const char **ptr, DWORD *d)
+static void read_dword(const char **ptr, uint32_t *d)
{
memcpy(d, *ptr, sizeof(*d));
*ptr += sizeof(*d);
@@ -1700,14 +1700,14 @@ static void read_dword(const char **ptr, DWORD *d)
static void read_float(const char **ptr, float *f)
{
- STATIC_ASSERT(sizeof(float) == sizeof(DWORD));
- read_dword(ptr, (DWORD *)f);
+ STATIC_ASSERT(sizeof(float) == sizeof(uint32_t));
+ read_dword(ptr, (uint32_t *)f);
}
static void skip_dword_unknown(const char **ptr, unsigned int count)
{
unsigned int i;
- DWORD d;
+ uint32_t d;
WARN("Skipping %u unknown DWORDs:\n", count);
for (i = 0; i < count; ++i)
@@ -1744,11 +1744,11 @@ static int parse_dxbc(const char *data, size_t data_size,
uint32_t checksum[4], calculated_checksum[4];
const char *ptr = data;
int ret = VKD3D_OK;
- DWORD chunk_count;
- DWORD total_size;
+ uint32_t chunk_count;
+ uint32_t total_size;
unsigned int i;
- DWORD version;
- DWORD tag;
+ uint32_t version;
+ uint32_t tag;
if (data_size < VKD3D_DXBC_HEADER_SIZE)
{
@@ -1803,9 +1803,9 @@ static int parse_dxbc(const char *data, size_t data_size,
for (i = 0; i < chunk_count; ++i)
{
- DWORD chunk_tag, chunk_size;
+ uint32_t chunk_tag, chunk_size;
const char *chunk_ptr;
- DWORD chunk_offset;
+ uint32_t chunk_offset;
read_dword(&ptr, &chunk_offset);
TRACE("chunk %u at offset %#x\n", i, chunk_offset);
@@ -1847,7 +1847,7 @@ static int shader_parse_signature(DWORD tag, const char *data, DWORD data_size,
struct vkd3d_shader_signature_element *e;
const char *ptr = data;
unsigned int i;
- DWORD count;
+ uint32_t count;
if (!require_space(0, 2, sizeof(DWORD), data_size))
{
@@ -1877,7 +1877,7 @@ static int shader_parse_signature(DWORD tag, const char *data, DWORD data_size,
for (i = 0; i < count; ++i)
{
- DWORD name_offset, mask;
+ uint32_t name_offset, mask;
if (has_stream_index)
read_dword(&ptr, &e[i].stream_index);
@@ -1998,7 +1998,7 @@ static int shdr_handler(const char *data, DWORD data_size, DWORD tag, void *cont
case TAG_SHEX:
if (desc->byte_code)
FIXME("Multiple shader code chunks.\n");
- desc->byte_code = (const DWORD *)data;
+ desc->byte_code = (const uint32_t *)data;
desc->byte_code_size = data_size;
break;
@@ -2355,7 +2355,7 @@ static int shader_parse_root_parameters(struct root_signature_parser_context *co
}
static int shader_parse_root_parameters1(struct root_signature_parser_context *context,
- DWORD offset, DWORD count, struct vkd3d_shader_root_parameter1 *parameters)
+ uint32_t offset, DWORD count, struct vkd3d_shader_root_parameter1 *parameters)
{
const char *ptr;
unsigned int i;
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 9cd26d7f91a9..1de67f45461a 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -638,7 +638,7 @@ struct vkd3d_shader_version
struct vkd3d_shader_immediate_constant_buffer
{
unsigned int vec4_count;
- DWORD data[MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE];
+ uint32_t data[MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE];
};
struct vkd3d_shader_indexable_temp
@@ -762,7 +762,7 @@ enum vkd3d_shader_input_sysval_semantic
struct vkd3d_shader_desc
{
- const DWORD *byte_code;
+ const uint32_t *byte_code;
size_t byte_code_size;
struct vkd3d_shader_signature input_signature;
struct vkd3d_shader_signature output_signature;
--
2.34.1
Jan. 31, 2022
Re: [PATCH 2/5] user32/tests: Stop relying on pre-existing windows.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=106582
Your paranoid android.
=== w1064v1809 (32 bit report) ===
user32:
win.c:9977: Test failed: WindowFromPoint returned 000301D4, expected 000202CE
win.c:9984: Test failed: WindowFromPoint returned 000301D4, expected 000302B6
win.c:10068: Test failed: WindowFromPoint returned 000301D4, expected 000C0074
win.c:10076: Test failed: WindowFromPoint returned 000301D4, expected 000302B6
win.c:10005: Test failed: transparent window didn't get WM_NCHITTEST message
win.c:10006: Test failed: button under static window didn't get WM_LBUTTONUP
=== w10pro64_ja (64 bit report) ===
user32:
win.c:10578: Test failed: pos = 00c800c8
win.c:10582: Test failed: pos = 00c800c8
win.c:10586: Test failed: pos = 00c800c8
=== w10pro64_zh_CN (64 bit report) ===
user32:
win.c:10578: Test failed: pos = 00c800c8
win.c:10582: Test failed: pos = 00c800c8
win.c:10586: Test failed: pos = 00c800c8
=== debian11 (32 bit report) ===
user32:
win.c:10772: Test failed: Expected foreground window 00FF00C8, got 008400B4
win.c:10774: Test failed: GetActiveWindow() = 00000000
win.c:10774: Test failed: GetFocus() = 00000000
win.c:10775: Test failed: Received WM_ACTIVATEAPP(1), did not expect it.
win.c:10776: Test failed: Received WM_ACTIVATEAPP(0), did not expect it.
win.c:10784: Test failed: Expected foreground window 00FF00C8, got 00000000
win.c:10786: Test failed: GetActiveWindow() = 00000000
win.c:10786: Test failed: GetFocus() = 00000000
win.c:10794: Test failed: Received WM_ACTIVATEAPP(1), did not expect it.
Jan. 31, 2022
Re: [PATCH 4/4] d3d8/tests: Skip test_cursor_pos if we can't move the cursor.
by Stefan Dösinger
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Jan. 31, 2022
Re: [PATCH 1/5] user32/tests: Tweak window size to fix Win10 results.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=106581
Your paranoid android.
=== w1064_tsign (32 bit report) ===
user32:
win.c:4003: Test failed: message 0200 available
Jan. 31, 2022
[PATCH 4/4] d3d8/tests: Skip test_cursor_pos if we can't move the cursor.
by Stefan Dösinger
---
dlls/d3d8/tests/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index f30e0784e8b..cb1e83b64b3 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -1218,6 +1218,7 @@ static void test_cursor_pos(void)
HWND window;
HRESULT hr;
BOOL ret;
+ POINT pt;
/* Note that we don't check for movement we're not supposed to receive.
* That's because it's hard to distinguish from the user accidentally
@@ -1249,6 +1250,18 @@ static void test_cursor_pos(void)
ok(ret, "Failed to set cursor position.\n");
flush_events();
+ /* Check if we can move the cursor. If we're running in a virtual desktop
+ * that does not have focus or the mouse is outside the desktop window, some
+ * window managers (e.g. kwin) will refuse to let us steal the pointer. That
+ * is reasonable, but breaks the test. */
+ ret = GetCursorPos(&pt);
+ ok(ret, "Failed to get cursor position.\n");
+ if (pt.x != 99 || pt.y != 99)
+ {
+ skip("Could not warp the cursor (cur pos %ux%u), skipping test.\n", pt.x, pt.y);
+ return;
+ }
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d8_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
--
2.34.1
Jan. 31, 2022
[PATCH 3/4] d3d9/tests: Skip test_cursor_pos if we can't move the cursor.
by Stefan Dösinger
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
---
There is another failure more of this test inside a virtual desktop that
happens in situations where we can move the mouse around. I am still
investigating this.
---
dlls/d3d9/tests/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 9c2e94cc694..7abf9ea3df2 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5188,6 +5188,7 @@ static void test_cursor_pos(void)
HWND window;
HRESULT hr;
BOOL ret;
+ POINT pt;
/* Note that we don't check for movement we're not supposed to receive.
* That's because it's hard to distinguish from the user accidentally
@@ -5219,6 +5220,18 @@ static void test_cursor_pos(void)
ok(ret, "Failed to set cursor position.\n");
flush_events();
+ /* Check if we can move the cursor. If we're running in a virtual desktop
+ * that does not have focus or the mouse is outside the desktop window, some
+ * window managers (e.g. kwin) will refuse to let us steal the pointer. That
+ * is reasonable, but breaks the test. */
+ ret = GetCursorPos(&pt);
+ ok(ret, "Failed to get cursor position.\n");
+ if (pt.x != 99 || pt.y != 99)
+ {
+ skip("Could not warp the cursor (cur pos %ux%u), skipping test.\n", pt.x, pt.y);
+ return;
+ }
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d9_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
--
2.34.1
Jan. 31, 2022
[PATCH 2/4] d3d8/tests: Try to make test_cursor_pos more reliable.
by Stefan Dösinger
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
---
dlls/d3d8/tests/device.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index c288e1ef557..f30e0784e8b 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -1235,6 +1235,20 @@ static void test_cursor_pos(void)
{0, 0},
};
+ /* Windows 10 1709 is unreliable. One or more of the cursor movements we
+ * expect don't show up. Moving the mouse to a defined position beforehand
+ * seems to get it into better shape - only the final 150x150 move we do
+ * below is missing - it looks as if this Windows version filters redundant
+ * SetCursorPos calls on the user32 level, although I am not entirely sure.
+ *
+ * The weird thing is that the previous test leaves the cursor position
+ * reliably at 512x384 on the testbot. So the 50x50 mouse move shouldn't
+ * be stripped away anyway, but it might be a difference between moving the
+ * cursor through SetCursorPos vs moving it by changing the display mode. */
+ ret = SetCursorPos(99, 99);
+ ok(ret, "Failed to set cursor position.\n");
+ flush_events();
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d8_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
@@ -1267,7 +1281,8 @@ static void test_cursor_pos(void)
IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0);
flush_events();
- /* SetCursorPosition() eats duplicates. */
+ /* SetCursorPosition() eats duplicates. FIXME: Since we accept unexpected
+ * mouse moves the test doesn't actually demonstrate that. */
IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0);
flush_events();
@@ -1288,13 +1303,14 @@ static void test_cursor_pos(void)
IDirect3DDevice8_SetCursorPosition(device, 150, 150, 0);
flush_events();
- /* SetCursorPos() doesn't. */
+ /* SetCursorPos() doesn't. Except for Win10 1709. */
ret = SetCursorPos(150, 150);
ok(ret, "Failed to set cursor position.\n");
flush_events();
- ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n",
- (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
+ ok((!expect_pos->x && !expect_pos->y) || broken(expect_pos - points == 7),
+ "Didn't receive MOUSEMOVE %u (%d, %d).\n",
+ (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
refcount = IDirect3DDevice8_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
--
2.34.1
Jan. 31, 2022
[PATCH 1/4] d3d9/tests: Try to make test_cursor_pos more reliable.
by Stefan Dösinger
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
---
The Win10 1709 behavior and apparent workaround of moving the pointer
before the test don't quite make sense. In past testbot runs there have
been cases where e.g. move 3 doesn't produce a message, or any other
move. This patch has worked so far in all of my manual testbot
submissions. The only way to know is to wait and see...
I have sent this series on top of 225041 and 225042, but it should apply
independently as well.
---
dlls/d3d9/tests/device.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 7effd0f28b8..9c2e94cc694 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5205,6 +5205,20 @@ static void test_cursor_pos(void)
{0, 0},
};
+ /* Windows 10 1709 is unreliable. One or more of the cursor movements we
+ * expect don't show up. Moving the mouse to a defined position beforehand
+ * seems to get it into better shape - only the final 150x150 move we do
+ * below is missing - it looks as if this Windows version filters redundant
+ * SetCursorPos calls on the user32 level, although I am not entirely sure.
+ *
+ * The weird thing is that the previous test leaves the cursor position
+ * reliably at 512x384 on the testbot. So the 50x50 mouse move shouldn't
+ * be stripped away anyway, but it might be a difference between moving the
+ * cursor through SetCursorPos vs moving it by changing the display mode. */
+ ret = SetCursorPos(99, 99);
+ ok(ret, "Failed to set cursor position.\n");
+ flush_events();
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d9_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
@@ -5239,7 +5253,8 @@ static void test_cursor_pos(void)
IDirect3DDevice9_SetCursorPosition(device, 75, 75, 0);
flush_events();
- /* SetCursorPosition() eats duplicates. */
+ /* SetCursorPosition() eats duplicates. FIXME: Since we accept unexpected
+ * mouse moves the test doesn't actually demonstrate that. */
IDirect3DDevice9_SetCursorPosition(device, 75, 75, 0);
flush_events();
@@ -5260,13 +5275,14 @@ static void test_cursor_pos(void)
IDirect3DDevice9_SetCursorPosition(device, 150, 150, 0);
flush_events();
- /* SetCursorPos() doesn't. */
+ /* SetCursorPos() doesn't. Except for Win10 1709. */
ret = SetCursorPos(150, 150);
ok(ret, "Failed to set cursor position.\n");
flush_events();
- ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n",
- (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
+ ok((!expect_pos->x && !expect_pos->y) || broken(expect_pos - points == 7),
+ "Didn't receive MOUSEMOVE %u (%d, %d).\n",
+ (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
--
2.34.1
Jan. 31, 2022
Re: [PATCH 1/4] windows.foundation.metadata: Add stub dll
by Rémi Bernon
On 1/31/22 11:04, Rémi Bernon wrote:
>> +
>> +#ifdef __WIDL__
>> +#pragma winrt ns_prefix
>> +#endif
>> +
>> +import "inspectable.idl";
>> +import "asyncinfo.idl";
>> +import "eventtoken.idl";
>> +import "windowscontracts.idl";
>> +import "windows.foundation.idl";
>> +
>> +namespace Windows {
>> + namespace Foundation {
>> + namespace Metadata {
>> + interface IApiInformationStatics;
>> + runtimeclass ApiInformation;
>> + }
>> + }
>> +}
>> +
>> +namespace Windows {
>> + namespace Foundation {
>> + namespace Metadata {
>> + [
>> + contract(Windows.Foundation.UniversalApiContract, 1.0),
>> + marshaling_behavior(agile),
>> +
>> static(Windows.Foundation.Metadata.IApiInformationStatics,
>> Windows.Foundation.UniversalApiContract, 1.0),
>> + threading(both)
>> + ]
I missed it but FWIW i think this uses the
Windows.Foundation.FoundationContract contract, not UniversalApiContract.
--
Rémi Bernon <rbernon(a)codeweavers.com>
Jan. 31, 2022
Re: [PATCH 1/4] windows.foundation.metadata: Add stub dll
by Rémi Bernon
Hi Fabian,
On 1/30/22 18:23, Fabian Maurer wrote:
> Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
> ---
> configure | 2 +
> configure.ac | 1 +
> dlls/windows.foundation.metadata/Makefile.in | 8 +
> dlls/windows.foundation.metadata/classes.idl | 23 +++
> dlls/windows.foundation.metadata/main.c | 157 ++++++++++++++++++
> .../windows.foundation.metadata.spec | 3 +
> include/Makefile.in | 1 +
> include/windows.foundation.metadata.idl | 52 ++++++
> 8 files changed, 247 insertions(+)
> create mode 100644 dlls/windows.foundation.metadata/Makefile.in
> create mode 100644 dlls/windows.foundation.metadata/classes.idl
> create mode 100644 dlls/windows.foundation.metadata/main.c
> create mode 100644 dlls/windows.foundation.metadata/windows.foundation.metadata.spec
> create mode 100644 include/windows.foundation.metadata.idl
>
> diff --git a/configure b/configure
> index 425d267ec50..f7f8cb581ef 100755
> --- a/configure
> +++ b/configure
> @@ -1704,6 +1704,7 @@ enable_wiaservc
> enable_wimgapi
> enable_win32u
> enable_windows_devices_enumeration
> +enable_windows_foundation_metadata
> enable_windows_gaming_input
> enable_windows_globalization
> enable_windows_media_devices
> @@ -22470,6 +22471,7 @@ wine_fn_config_makefile dlls/win87em.dll16 enable_win16
> wine_fn_config_makefile dlls/winaspi.dll16 enable_win16
> wine_fn_config_makefile dlls/windebug.dll16 enable_win16
> wine_fn_config_makefile dlls/windows.devices.enumeration enable_windows_devices_enumeration
> +wine_fn_config_makefile dlls/windows.foundation.metadata enable_windows_foundation_metadata
> wine_fn_config_makefile dlls/windows.gaming.input enable_windows_gaming_input
> wine_fn_config_makefile dlls/windows.gaming.input/tests enable_tests
> wine_fn_config_makefile dlls/windows.globalization enable_windows_globalization
You don't need to include configure changes in your patches, they will
be regenerated and added when patch is commited.
> diff --git a/configure.ac b/configure.ac
> index fed12f61036..c66c6fd462f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3366,6 +3366,7 @@ WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16)
> WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16)
> WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16)
> WINE_CONFIG_MAKEFILE(dlls/windows.devices.enumeration)
> +WINE_CONFIG_MAKEFILE(dlls/windows.foundation.metadata)
> WINE_CONFIG_MAKEFILE(dlls/windows.gaming.input)
> WINE_CONFIG_MAKEFILE(dlls/windows.gaming.input/tests)
> WINE_CONFIG_MAKEFILE(dlls/windows.globalization)
> diff --git a/dlls/windows.foundation.metadata/Makefile.in b/dlls/windows.foundation.metadata/Makefile.in
> new file mode 100644
> index 00000000000..311cfb0a845
> --- /dev/null
> +++ b/dlls/windows.foundation.metadata/Makefile.in
> @@ -0,0 +1,8 @@
> +EXTRADEFS = -DWINE_NO_LONG_TYPES
> +MODULE = windows.foundation.metadata.dll
> +IMPORTS = combase uuid
> +
> +C_SRCS = \
> + main.c
> +
> +IDL_SRCS = classes.idl
> diff --git a/dlls/windows.foundation.metadata/classes.idl b/dlls/windows.foundation.metadata/classes.idl
> new file mode 100644
> index 00000000000..405fa9f1133
> --- /dev/null
> +++ b/dlls/windows.foundation.metadata/classes.idl
> @@ -0,0 +1,23 @@
> +/*
> + * Runtime Classes for windows.foundation.metadata.dll
> + *
> + * Copyright 2022 Fabian Maurer
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
> + */
> +
> +#pragma makedep register
> +
> +#include "windows.foundation.metadata.idl"
> diff --git a/dlls/windows.foundation.metadata/main.c b/dlls/windows.foundation.metadata/main.c
> new file mode 100644
> index 00000000000..18a19ad1bca
> --- /dev/null
> +++ b/dlls/windows.foundation.metadata/main.c
> @@ -0,0 +1,157 @@
> +/* WinRT Windows.Foundation.Metadata implementation
> + *
> + * Copyright 2022 Fabian Maurer
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
> + */
> +
> +#include <stdarg.h>
> +
> +#define COBJMACROS
> +#include "windef.h"
> +#include "winbase.h"
> +#include "winstring.h"
> +#include "wine/debug.h"
> +#include "objbase.h"
> +
> +#include "initguid.h"
> +#include "activation.h"
> +
> +#define WIDL_using_Windows_Foundation
> +#define WIDL_using_Windows_Foundation_Collections
> +#include "windows.foundation.h"
> +#define WIDL_using_Windows_Foundation_Metadata
> +#include "windows.foundation.metadata.h"
> +
> +WINE_DEFAULT_DEBUG_CHANNEL(metadata);
> +
> +static const char *debugstr_hstring(HSTRING hstr)
> +{
> + const WCHAR *str;
> + UINT32 len;
> + if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)";
> + str = WindowsGetStringRawBuffer(hstr, &len);
> + return wine_dbgstr_wn(str, len);
> +}
> +
> +struct windows_foundation_metadata
> +{
> + IActivationFactory IActivationFactory_iface;
> + LONG ref;
> +};
> +
> +static inline struct windows_foundation_metadata *impl_from_IActivationFactory(IActivationFactory *iface)
> +{
> + return CONTAINING_RECORD(iface, struct windows_foundation_metadata, IActivationFactory_iface);
> +}
> +
> +static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_QueryInterface(
> + IActivationFactory *iface, REFIID iid, void **out)
> +{
> + TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
> +
> + if (IsEqualGUID(iid, &IID_IUnknown) ||
> + IsEqualGUID(iid, &IID_IInspectable) ||
> + IsEqualGUID(iid, &IID_IAgileObject) ||
> + IsEqualGUID(iid, &IID_IActivationFactory))
> + {
> + IUnknown_AddRef(iface);
> + *out = iface;
> + return S_OK;
> + }
> +
> + FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
> + *out = NULL;
> + return E_NOINTERFACE;
> +}
> +
> +static ULONG STDMETHODCALLTYPE windows_foundation_metadata_AddRef(
> + IActivationFactory *iface)
> +{
> + struct windows_foundation_metadata *impl = impl_from_IActivationFactory(iface);
> + ULONG ref = InterlockedIncrement(&impl->ref);
> + TRACE("iface %p, ref %u.\n", iface, ref);
> + return ref;
> +}
> +
> +static ULONG STDMETHODCALLTYPE windows_foundation_metadata_Release(
> + IActivationFactory *iface)
> +{
> + struct windows_foundation_metadata *impl = impl_from_IActivationFactory(iface);
> + ULONG ref = InterlockedDecrement(&impl->ref);
> + TRACE("iface %p, ref %u.\n", iface, ref);
> + return ref;
> +}
> +
> +static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_GetIids(
> + IActivationFactory *iface, ULONG *iid_count, IID **iids)
> +{
> + FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
> + return E_NOTIMPL;
> +}
> +
> +static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_GetRuntimeClassName(
> + IActivationFactory *iface, HSTRING *class_name)
> +{
> + FIXME("iface %p, class_name %p stub!\n", iface, class_name);
> + return E_NOTIMPL;
> +}
> +
> +static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_GetTrustLevel(
> + IActivationFactory *iface, TrustLevel *trust_level)
> +{
> + FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
> + return E_NOTIMPL;
> +}
> +
> +static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_ActivateInstance(
> + IActivationFactory *iface, IInspectable **instance)
> +{
> + FIXME("iface %p, instance %p stub!\n", iface, instance);
> + return E_NOTIMPL;
> +}
> +
> +static const struct IActivationFactoryVtbl activation_factory_vtbl =
> +{
> + windows_foundation_metadata_QueryInterface,
> + windows_foundation_metadata_AddRef,
> + windows_foundation_metadata_Release,
> + /* IInspectable methods */
> + windows_foundation_metadata_GetIids,
> + windows_foundation_metadata_GetRuntimeClassName,
> + windows_foundation_metadata_GetTrustLevel,
> + /* IActivationFactory methods */
> + windows_foundation_metadata_ActivateInstance,
> +};
> +
> +static struct windows_foundation_metadata windows_foundation_metadata =
> +{
> + {&activation_factory_vtbl},
> + 1
> +};
> +
> +HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out)
> +{
> + FIXME("clsid %s, riid %s, out %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), out);
> + return CLASS_E_CLASSNOTAVAILABLE;
> +}
> +
> +HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
> +{
> + TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory);
> + *factory = &windows_foundation_metadata.IActivationFactory_iface;
> + IUnknown_AddRef(*factory);
> + return S_OK;
> +}
As far as I understand from Bernhard Kölbl work on windows.media.speech,
each runtimeclass probably has its own activation factory (although it's
just my assumption and it would need to be confirmed with tests).
Although for a stub with only one runtimeclass it probably doesn't
matter much, maybe you can already have the factory here named and
organised accordingly? Like for instance it would be named
api_information_factory, and the file api_information.c maybe.
I know it's not done in existing Wine WinRT libs, but probably it will
have to be changed in the future.
> diff --git a/dlls/windows.foundation.metadata/windows.foundation.metadata.spec b/dlls/windows.foundation.metadata/windows.foundation.metadata.spec
> new file mode 100644
> index 00000000000..20a8bfa98ea
> --- /dev/null
> +++ b/dlls/windows.foundation.metadata/windows.foundation.metadata.spec
> @@ -0,0 +1,3 @@
> +@ stdcall -private DllCanUnloadNow()
> +@ stdcall -private DllGetActivationFactory(ptr ptr)
> +@ stdcall -private DllGetClassObject(ptr ptr ptr)
> diff --git a/include/Makefile.in b/include/Makefile.in
> index 7fcf5f0ba7b..24c2b3fb448 100644
> --- a/include/Makefile.in
> +++ b/include/Makefile.in
> @@ -777,6 +777,7 @@ SOURCES = \
> windows.devices.enumeration.idl \
> windows.foundation.collections.idl \
> windows.foundation.idl \
> + windows.foundation.metadata.idl \
> windows.gaming.input.forcefeedback.idl \
> windows.gaming.input.idl \
> windows.globalization.idl \
> diff --git a/include/windows.foundation.metadata.idl b/include/windows.foundation.metadata.idl
> new file mode 100644
> index 00000000000..7673777e658
> --- /dev/null
> +++ b/include/windows.foundation.metadata.idl
> @@ -0,0 +1,52 @@
> +/*
> + * Copyright 2022 Fabian Maurer
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
> + */
> +
> +#ifdef __WIDL__
> +#pragma winrt ns_prefix
> +#endif
> +
> +import "inspectable.idl";
> +import "asyncinfo.idl";
> +import "eventtoken.idl";
> +import "windowscontracts.idl";
> +import "windows.foundation.idl";
> +
> +namespace Windows {
> + namespace Foundation {
> + namespace Metadata {
> + interface IApiInformationStatics;
> + runtimeclass ApiInformation;
> + }
> + }
> +}
> +
> +namespace Windows {
> + namespace Foundation {
> + namespace Metadata {
> + [
> + contract(Windows.Foundation.UniversalApiContract, 1.0),
> + marshaling_behavior(agile),
> + static(Windows.Foundation.Metadata.IApiInformationStatics, Windows.Foundation.UniversalApiContract, 1.0),
> + threading(both)
> + ]
> + runtimeclass ApiInformation
> + {
> + }
> + }
> + }
> +}
> --
I think include changes are nice to add in a separate, earlier, patch.
Same for the IApiInformationStatics definition.
It would also be nice to already have a few tests to check the factory
creation, its interfaces and the few functions you are stubbing too, a
bit like it's already done in windows.gaming.input or other WinRT stubs.
Cheers,
--
Rémi Bernon <rbernon(a)codeweavers.com>
Jan. 31, 2022