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
July 2019
- 65 participants
- 633 messages
Re: [PATCH v2 3/6] server: Add request for sending native raw-input messages.
by Rémi Bernon
On Sat, 2019-06-29 at 22:26 -0400, Derek Lesho wrote:
> Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com>
> ---
> server/protocol.def | 28 ++++++++++++++++++++++++++++
> server/queue.c | 41 +++++++++++++++++++++++++++++++++++++++++
> server/trace.c | 21 +++++++++++++++++++++
> tools/make_requests | 1 +
> 4 files changed, 91 insertions(+)
>
> diff --git a/server/protocol.def b/server/protocol.def
> index 8b8a8a1512..3a6a202f49 100644
> --- a/server/protocol.def
> +++ b/server/protocol.def
> @@ -358,6 +358,29 @@ typedef union
> } hw;
> } hw_input_t;
>
> +typedef union
> +{
> + int type;
> + struct
> + {
> + int type; /* RIM_TYPEMOUSE */
> + int x; /* relative x movement */
> + int y; /* relative y movement */
> + unsigned short button_flags; /* mouse button */
> + unsigned short button_data; /* event details */
> + } mouse;
> + struct
> + {
> + int type; /* RIM_TYPEKEYBOARD */
> + /* TODO: fill this in if/when necessary */
> + } kbd;
> + struct
> + {
> + int type; /* RIM_TYPEHID */
> + /* TODO: fill this in if/when necessary */
> + } hid;
> +} hw_rawinput_t;
I'm still wondering if it should be merged with hw_input_t or not and
use the same send_hardware_message request for raw inputs and normal
inputs, but in any case this union should at least be used for the
rawinput field in struct hardware_msg_data (with the kbd fields added)
instead of duplicating it.
--
Rémi Bernon <rbernon(a)codeweavers.com>
July 23, 2019
Re: [PATCH v7 6/7] winex11.drv: Implement native mouse-movement raw-input using RawMotion.
by Rémi Bernon
On Mon, 2019-07-22 at 22:16 -0400, Derek Lesho wrote:
> Thank you for looking into this, would the solution to this problem be to
> preserve the event from the slave pointer in merge_raw_events?
>
> On Mon, Jul 22, 2019 at 10:06 AM Rémi Bernon <rbernon(a)codeweavers.com>
> wrote:
>
> > It looks like that if the cursor isn't clipped by the application (or
> > by wine in fullscreen), then both master and slave XI2 device events
> > are received (on the contrary, when the cursor is clipped then for some
> > unclear reason only the slave device events are received).
> >
> > In this case, one of the events is then discarded by
> > merge_raw_motion_events in dlls/winex11.drv/event.c and as
> > X11DRV_RawMotion is designed to track only slave devices (one per
> > thread with the xi2_current_slave field AFAICS?), depending on which
> > comes first, the event might not be processed and no raw input be sent.
> > --
> > Rémi Bernon <rbernon(a)codeweavers.com>
> >
I'm still not sure how everything works in winex11.drv, but I believe
raw input implementation could use some cleanup. For instance, I don't
understand why a single slave device is selected rather than listening
to the master device events, I find it a bit unreliable that the first
slave device that sends events is selected over the others.
I would say that, for simplicity, only the master device events should
be translated, but that would require to make it send events even when
the cursor is clipped, and first understand why it doesn't (AFAICS with
some Xlib test app, there's no differences before and after calling
XGrabPointer so there's something else going on).
If that's not possible, or for a "better" implementation, then all and
only slave devices should be listened to, and their inputs translated
to the corresponding Windows raw input messages. Also, it may be useful
to implement WM_INPUT_DEVICE_CHANGE messages on the corresponding
XInput2 events (but that may be done later and only if deemed useful).
--
Rémi Bernon <rbernon(a)codeweavers.com>
July 23, 2019
[PATCH vkd3d v2] tests: Add tests for sample_b and sample_d instructions.
by Jactry Zeng
Superseded patch 167731.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
tests/d3d12.c | 285 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 285 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index bd055fb..01c2fdb 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -31335,6 +31335,290 @@ static void test_conditional_rendering(void)
destroy_test_context(&context);
}
+static void test_sample_instructions(void)
+{
+ static const float red[] = {1.0f, 0.0f, 0.0f, 0.5f};
+ ID3D12GraphicsCommandList *command_list;
+ D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle;
+ D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle;
+ D3D12_STATIC_SAMPLER_DESC sampler_desc;
+ struct test_context_desc desc;
+ struct resource_readback rb;
+ struct test_context context;
+ unsigned int x_step, y_step;
+ ID3D12DescriptorHeap *heap;
+ ID3D12CommandQueue *queue;
+ ID3D12Resource *texture;
+ ID3D12Device *device;
+ unsigned int i, x, y;
+ static const DWORD ps_sample_b_code[] =
+ {
+#if 0
+ Texture2D t;
+ SamplerState s;
+
+ float bias;
+
+ float4 main(float4 position : SV_POSITION) : SV_Target
+ {
+ float2 p;
+
+ p.x = position.x / 640.0f;
+ p.y = position.y / 480.0f;
+ return t.SampleBias(s, p, bias);
+ }
+#endif
+ 0x43425844, 0xc39b0686, 0x8244a7fc, 0x14c0b97a, 0x2900b3b7, 0x00000001, 0x00000150, 0x00000003,
+ 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49,
+ 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000000b4, 0x00000040,
+ 0x0000002d, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300005a, 0x00106000, 0x00000000,
+ 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, 0x00000001,
+ 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032, 0x00000000,
+ 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, 0x3b088889, 0x00000000, 0x00000000, 0x0c00004a,
+ 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000,
+ 0x0020800a, 0x00000000, 0x00000000, 0x0100003e,
+ };
+ static const D3D12_SHADER_BYTECODE ps_sample_b = {ps_sample_b_code, sizeof(ps_sample_b_code)};
+ static const DWORD ps_sample_d_code[] =
+ {
+#if 0
+ Texture2D t;
+ SamplerState s;
+
+ float4 dd;
+
+ float4 main(float4 position : SV_POSITION) : SV_Target
+ {
+ float2 p;
+
+ p.x = position.x / 640.0f;
+ p.y = position.y / 480.0f;
+ return t.SampleGrad(s, p, float2(dd.x, dd.y), float2(dd.z, dd.w));
+ }
+#endif
+ 0x43425844, 0xecc423bc, 0x3742699c, 0xf08f6dd7, 0x9976ad55, 0x00000001, 0x00000168, 0x00000003,
+ 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49,
+ 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x000000cc, 0x00000050,
+ 0x00000033, 0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300005a, 0x00106000,
+ 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000,
+ 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032,
+ 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, 0x3b088889, 0x00000000, 0x00000000,
+ 0x91000049, 0x800000c2, 0x00155543, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46,
+ 0x00000000, 0x00106000, 0x00000000, 0x00208046, 0x00000000, 0x00000000, 0x00208ae6, 0x00000000,
+ 0x00000000, 0x0100003e,
+ };
+ static const D3D12_SHADER_BYTECODE ps_sample_d = {ps_sample_d_code, sizeof(ps_sample_d_code)};
+ static const unsigned int r8g8b8a8_data[] =
+ {
+ 0xff0000ff, 0xff00ffff, 0xff00ff00, 0xffffff00,
+ 0xffff0000, 0xffff00ff, 0xff000000, 0xff7f7f7f,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000,
+ 0xffffffff, 0xff000000, 0xff000000, 0xff000000,
+ };
+ static const uint8_t a8_data[] =
+ {
+ 0x00, 0xff, 0x7f, 0xf0,
+ 0x0f, 0x11, 0x00, 0x00,
+ 0xff, 0xf0, 0x0f, 0xff,
+ 0xfa, 0xfe, 0xaa, 0xcc,
+ };
+ static const unsigned int a8_expected_data[] =
+ {
+ 0x00000000, 0xff000000, 0x7f000000, 0xf0000000,
+ 0x0f000000, 0x11000000, 0x00000000, 0x00000000,
+ 0xff000000, 0xf0000000, 0x0f000000, 0xff000000,
+ 0xfa000000, 0xfe000000, 0xaa000000, 0xcc000000,
+ };
+ static const unsigned int rgba_level_0[] =
+ {
+ 0xff0000ff, 0xff00ffff, 0xff00ff00, 0xffffff00,
+ 0xffff0000, 0xffff00ff, 0xff000000, 0xff7f7f7f,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000,
+ 0xffffffff, 0xff000000, 0xff000000, 0xff000000,
+ };
+ static const unsigned int rgba_level_1[] =
+ {
+ 0xffffffff, 0xff0000ff,
+ 0xff000000, 0xff00ff00,
+ };
+ static const unsigned int rgba_level_2[] =
+ {
+ 0xffff0000,
+ };
+ static const unsigned int level_1_colors[] =
+ {
+ 0xffffffff, 0xffffffff, 0xff0000ff, 0xff0000ff,
+ 0xffffffff, 0xffffffff, 0xff0000ff, 0xff0000ff,
+ 0xff000000, 0xff000000, 0xff00ff00, 0xff00ff00,
+ 0xff000000, 0xff000000, 0xff00ff00, 0xff00ff00,
+ };
+ static const unsigned int level_2_colors[] =
+ {
+ 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000,
+ 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000,
+ 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000,
+ 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000,
+ };
+ struct texture
+ {
+ unsigned int width;
+ unsigned int height;
+ unsigned int miplevel_count;
+ unsigned int array_size;
+ DXGI_FORMAT format;
+ D3D12_SUBRESOURCE_DATA data[3];
+ };
+ static const struct texture r8g8b8a8_texture =
+ {
+ 4, 4, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
+ {
+ {r8g8b8a8_data, 4 * sizeof(*r8g8b8a8_data), 16 * sizeof(*r8g8b8a8_data)},
+ },
+ };
+ static const struct texture a8_texture =
+ {
+ 4, 4, 1, 1, DXGI_FORMAT_A8_UNORM,
+ {
+ {a8_data, 4 * sizeof(*a8_data), 16 * sizeof(*a8_data)},
+ },
+ };
+ static const struct texture rgba_texture =
+ {
+ 4, 4, 3, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
+ {
+ {rgba_level_0, 4 * sizeof(*rgba_level_0), 0},
+ {rgba_level_1, 2 * sizeof(*rgba_level_1), 0},
+ {rgba_level_2, sizeof(*rgba_level_2), 0},
+ },
+ };
+ static const struct
+ {
+ const D3D12_SHADER_BYTECODE *ps_code;
+ const struct texture *texture;
+ float lod_bias;
+ float min_lod;
+ float max_lod;
+ unsigned int ps_constants_count;
+ float ps_constants[4];
+ const unsigned int *expected_data;
+ }
+ tests[] =
+ {
+#define MIP_MAX D3D12_FLOAT32_MAX
+ {&ps_sample_b, &r8g8b8a8_texture, 0.0f, 0.0f, MIP_MAX, 1, {0.0f}, r8g8b8a8_data},
+ {&ps_sample_b, &a8_texture, 0.0f, 0.0f, MIP_MAX, 1, {0.0f}, a8_expected_data},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 1, {0.0f}, rgba_level_0},
+ {&ps_sample_b, &rgba_texture, 8.0f, 0.0f, MIP_MAX, 1, {0.0f}, level_1_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 1, {8.0f}, level_1_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 1, {8.4f}, level_1_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 1, {8.5f}, level_2_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 1, {9.0f}, level_2_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, 2.0f, 1, {1.0f}, rgba_level_0},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, 2.0f, 1, {9.0f}, level_2_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, 1.0f, 1, {9.0f}, level_1_colors},
+ {&ps_sample_b, &rgba_texture, 0.0f, 0.0f, 0.0f, 1, {9.0f}, rgba_level_0},
+ {&ps_sample_d, &r8g8b8a8_texture, 0.0f, 0.0f, MIP_MAX, 4, {0.0f, 0.0f, 0.0f, 0.0f}, r8g8b8a8_data},
+ {&ps_sample_d, &a8_texture, 0.0f, 0.0f, MIP_MAX, 4, {0.0f, 0.0f, 0.0f, 0.0f}, a8_expected_data},
+ {&ps_sample_d, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 4, {0.0f, 0.0f, 0.0f, 0.0f}, rgba_level_0},
+ {&ps_sample_d, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 4, {0.3f, 0.0f, 0.0f, 0.0f}, rgba_level_0},
+ {&ps_sample_d, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 4, {0.4f, 0.0f, 0.0f, 0.0f}, level_1_colors},
+ {&ps_sample_d, &rgba_texture, 0.0f, 0.0f, MIP_MAX, 4, {1.0f, 0.0f, 0.0f, 0.0f}, level_2_colors},
+ };
+
+ memset(&desc, 0, sizeof(desc));
+ desc.rt_width = 640.0f;
+ desc.rt_height = 480.0f;
+ desc.no_root_signature = true;
+ if (!init_test_context(&context, &desc))
+ return;
+ device = context.device;
+ command_list = context.list;
+ queue = context.queue;
+
+ heap = create_gpu_descriptor_heap(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 1);
+ cpu_handle = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
+ gpu_handle = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap);
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ vkd3d_test_set_context("Test %u", i);
+
+ memset(&sampler_desc, 0, sizeof(sampler_desc));
+ sampler_desc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
+ sampler_desc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
+ sampler_desc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
+ sampler_desc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
+ sampler_desc.MipLODBias = tests[i].lod_bias;
+ sampler_desc.MinLOD = tests[i].min_lod;
+ sampler_desc.MaxLOD = tests[i].max_lod;
+ context.root_signature = create_texture_root_signature_(__LINE__, context.device,
+ D3D12_SHADER_VISIBILITY_PIXEL, tests[i].ps_constants_count + 1, 0, &sampler_desc);
+ context.pipeline_state = create_pipeline_state(device, context.root_signature,
+ context.render_target_desc.Format, NULL, tests[i].ps_code, NULL);
+
+ texture = create_default_texture2d(device, tests[i].texture->width, tests[i].texture->height,
+ tests[i].texture->array_size, tests[i].texture->miplevel_count, tests[i].texture->format,
+ D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST);
+ upload_texture_data(texture, tests[i].texture->data,
+ tests[i].texture->miplevel_count * tests[i].texture->array_size, queue, command_list);
+ reset_command_list(command_list, context.allocator);
+ transition_resource_state(command_list, texture,
+ D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
+
+ ID3D12Device_CreateShaderResourceView(device, texture, NULL, cpu_handle);
+
+ ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, red, 0, NULL);
+
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
+ ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
+ ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
+ ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
+ ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 0, gpu_handle);
+ ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
+ ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
+ ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 1,
+ tests[i].ps_constants_count, tests[i].ps_constants, 0);
+ ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
+
+ transition_resource_state(command_list, context.render_target,
+ D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
+
+ x_step = desc.rt_width / tests[i].texture->width;
+ y_step = desc.rt_height / tests[i].texture->height;
+ get_texture_readback_with_command_list(context.render_target, 0, &rb, queue, command_list);
+ for (y = 0; y < tests[i].texture->height; ++y)
+ {
+ for (x = 0; x < tests[i].texture->width; ++x)
+ {
+ unsigned int color = get_readback_uint(&rb, x * x_step + x_step / 2, y * y_step + y_step / 2, 0);
+ ok(compare_color(color, tests[i].expected_data[tests[i].texture->width * y + x], 0),
+ "Got color 0x%08x, expected 0x%08x at (%u, %u).\n",
+ color, tests[i].expected_data[tests[i].texture->width * y + x], x, y);
+ }
+ }
+ release_resource_readback(&rb);
+
+ ID3D12Resource_Release(texture);
+ reset_command_list(command_list, context.allocator);
+ transition_resource_state(command_list, context.render_target,
+ D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
+
+ ID3D12PipelineState_Release(context.pipeline_state);
+ context.pipeline_state = NULL;
+ ID3D12RootSignature_Release(context.root_signature);
+ context.root_signature = NULL;
+ }
+ vkd3d_test_set_context(NULL);
+
+ ID3D12DescriptorHeap_Release(heap);
+ destroy_test_context(&context);
+}
+
START_TEST(d3d12)
{
parse_args(argc, argv);
@@ -31496,4 +31780,5 @@ START_TEST(d3d12)
run_test(test_graphics_compute_queue_synchronization);
run_test(test_early_depth_stencil_tests);
run_test(test_conditional_rendering);
+ run_test(test_sample_instructions);
}
--
2.20.1
July 23, 2019
Re: Proposal: Build System Change (autotools->mesonbuild)?
by Chris Robinson
On 7/22/19 6:44 PM, Derek Lesho wrote:
> I think it would be very interesting to see how a meson wine build would
> perform and affect the workflow. One benefit I don't see mentioned is the
> ability to generate compile_commands.json, which allows IDEs to perform
> intelli-sense on the codebase. Right now I use bear (
> https://github.com/rizsotto/Bear) but this requires you to regenerate the
> compile_commands.json whenever you add a file to wine.
>
> If you can get past the technical hurdles mentioned above and more, I think
> many people would be interested in having it as an option alongside
> autotools.
CMake projects integrate pretty well with IDEs too, letting them figure
out what files are part of which (sub-)project and build target, what
macros are used with the build, and what's defined/declared where, using
the pre-build cache. It also works fine on Windows and generates VS
projects. How well does Meson work compared to CMake, and what are its
benefits/drawbacks compared to other build systems?
July 23, 2019
Re: [PATCH v7 6/7] winex11.drv: Implement native mouse-movement raw-input using RawMotion.
by Derek Lesho
Thank you for looking into this, would the solution to this problem be to
preserve the event from the slave pointer in merge_raw_events?
On Mon, Jul 22, 2019 at 10:06 AM Rémi Bernon <rbernon(a)codeweavers.com>
wrote:
> It looks like that if the cursor isn't clipped by the application (or
> by wine in fullscreen), then both master and slave XI2 device events
> are received (on the contrary, when the cursor is clipped then for some
> unclear reason only the slave device events are received).
>
> In this case, one of the events is then discarded by
> merge_raw_motion_events in dlls/winex11.drv/event.c and as
> X11DRV_RawMotion is designed to track only slave devices (one per
> thread with the xi2_current_slave field AFAICS?), depending on which
> comes first, the event might not be processed and no raw input be sent.
> --
> Rémi Bernon <rbernon(a)codeweavers.com>
>
>
>
>
July 23, 2019
Re: Proposal: Build System Change (autotools->mesonbuild)?
by Derek Lesho
I think it would be very interesting to see how a meson wine build would
perform and affect the workflow. One benefit I don't see mentioned is the
ability to generate compile_commands.json, which allows IDEs to perform
intelli-sense on the codebase. Right now I use bear (
https://github.com/rizsotto/Bear) but this requires you to regenerate the
compile_commands.json whenever you add a file to wine.
If you can get past the technical hurdles mentioned above and more, I think
many people would be interested in having it as an option alongside
autotools.
On Mon, Jul 22, 2019 at 12:46 AM Nathan Singer <dundir(a)gmail.com> wrote:
> Good Afternoon,
>
> Over the last few days, I've been toying with the idea of converting the
> existing build system for wine from autotools over to mesonbuild for the
> additional flexibility in dependency compilation (i.e. autobuilding
> dependencies as subprojects via wrapdb if shared libraries are not
> present).
>
> Several other large projects are starting or have recently finished
> similar conversion projects (Mesa3D) and if I move forward with this
> task to completion, I'd like to clarify beforehand whether a pull
> request for this would be considered?
>
> Best Regards,
> Nathan Singer
>
>
>
>
July 23, 2019
[PATCH v2] windowscodecs: Move from_sRGB_component into the same section as its sole sole user.
by Gerald Pfeifer
This quells one compiler warning I've been getting (with Clang, but
GCC should warn as well).
Right now there are so many warnings, it's hard to find new or more
serious ones.
This updated version of the patch takes a request by Dmitry into account
to leave the comment with the w3.org reference at its orginal location.
Thanks,
Gerald
---
dlls/windowscodecs/converter.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c
index 0d7a3b745f..dcc2f05693 100644
--- a/dlls/windowscodecs/converter.c
+++ b/dlls/windowscodecs/converter.c
@@ -85,12 +85,6 @@ typedef struct FormatConverter {
} FormatConverter;
/* https://www.w3.org/Graphics/Color/srgb */
-static inline float from_sRGB_component(float f)
-{
- if (f <= 0.04045f) return f / 12.92f;
- return powf((f + 0.055f) / 1.055f, 2.4f);
-}
-
static inline float to_sRGB_component(float f)
{
if (f <= 0.0031308f) return 12.92f * f;
@@ -98,6 +92,12 @@ static inline float to_sRGB_component(float f)
}
#if 0 /* FIXME: enable once needed */
+static inline float from_sRGB_component(float f)
+{
+ if (f <= 0.04045f) return f / 12.92f;
+ return powf((f + 0.055f) / 1.055f, 2.4f);
+}
+
static void from_sRGB(BYTE *bgr)
{
float r, g, b;
--
2.21.0
July 22, 2019
[PATCH 2/2] msctf: Accept ITfInputProcessorProfileActivationSink in ThreadMgr AdviseSink
by Andrew Eikum
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
---
dlls/msctf/msctf_internal.h | 1 +
dlls/msctf/tests/inputprocessor.c | 50 ++++++++++++++++++++++++++++++-
dlls/msctf/threadmgr.c | 13 +++++++-
3 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h
index 71ed10bb8dd..584bb1044ed 100644
--- a/dlls/msctf/msctf_internal.h
+++ b/dlls/msctf/msctf_internal.h
@@ -33,6 +33,7 @@
#define COOKIE_MAGIC_THREADFOCUSSINK 0x0080
#define COOKIE_MAGIC_KEYTRACESINK 0x0090
#define COOKIE_MAGIC_UIELEMENTSINK 0x00a0
+#define COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK 0x00b0
extern DWORD tlsIndex DECLSPEC_HIDDEN;
extern TfClientId processId DECLSPEC_HIDDEN;
diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index d440b536764..c5125827827 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -64,7 +64,7 @@ static DWORD tmSinkCookie;
static DWORD tmSinkRefCount;
static DWORD dmSinkCookie;
static DWORD documentStatus;
-static DWORD key_trace_sink_cookie, ui_element_sink_cookie;
+static DWORD key_trace_sink_cookie, ui_element_sink_cookie, profile_activation_sink_cookie;
static ITfDocumentMgr *test_CurrentFocus = NULL;
static ITfDocumentMgr *test_PrevFocus = NULL;
static ITfDocumentMgr *test_LastCurrentFocus = FOCUS_SAVE;
@@ -725,6 +725,47 @@ static const ITfUIElementSinkVtbl TfUIElementSinkVtbl = {
static ITfUIElementSink TfUIElementSink = { &TfUIElementSinkVtbl };
+static HRESULT WINAPI ProfileActivationSink_QueryInterface(ITfInputProcessorProfileActivationSink *iface,
+ REFIID riid, void **ppvObject)
+{
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ITfInputProcessorProfileActivationSink, riid)){
+ *ppvObject = iface;
+ return S_OK;
+ }
+
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ProfileActivationSink_AddRef(ITfInputProcessorProfileActivationSink *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI ProfileActivationSink_Release(ITfInputProcessorProfileActivationSink *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI ProfileActivationSink_OnActivated(ITfInputProcessorProfileActivationSink *iface,
+ DWORD dwProfileType, LANGID langid, REFCLSID clsid, REFGUID catid,
+ REFGUID guidProfile, HKL hkl, DWORD dwFlags)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static const ITfInputProcessorProfileActivationSinkVtbl TfInputProcessorProfileActivationSinkVtbl = {
+ ProfileActivationSink_QueryInterface,
+ ProfileActivationSink_AddRef,
+ ProfileActivationSink_Release,
+ ProfileActivationSink_OnActivated
+};
+
+static ITfInputProcessorProfileActivationSink TfInputProcessorProfileActivationSink = {
+ &TfInputProcessorProfileActivationSinkVtbl
+};
+
static HRESULT WINAPI TfTransitoryExtensionSink_QueryInterface(ITfTransitoryExtensionSink *iface, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ITfTransitoryExtensionSink, riid)) {
@@ -1198,6 +1239,10 @@ static void test_ThreadMgrAdviseSinks(void)
&ui_element_sink_cookie);
ok(hr == S_OK, "Failed to Advise ITfUIElementSink\n");
+ hr = ITfSource_AdviseSink(source, &IID_ITfInputProcessorProfileActivationSink, (IUnknown*)&TfInputProcessorProfileActivationSink,
+ &profile_activation_sink_cookie);
+ ok(hr == S_OK, "Failed to Advise ITfInputProcessorProfileActivationSink\n");
+
ITfSource_Release(source);
}
@@ -1221,6 +1266,9 @@ static void test_ThreadMgrUnadviseSinks(void)
hr = ITfSource_UnadviseSink(source, ui_element_sink_cookie);
ok(hr == S_OK, "Failed to unadvise ITfUIElementSink\n");
+ hr = ITfSource_UnadviseSink(source, profile_activation_sink_cookie);
+ ok(hr == S_OK, "Failed to unadvise ITfInputProcessorProfileActivationSink\n");
+
ITfSource_Release(source);
}
diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c
index 7afef3cdd53..2c208fbc04f 100644
--- a/dlls/msctf/threadmgr.c
+++ b/dlls/msctf/threadmgr.c
@@ -97,6 +97,7 @@ typedef struct tagACLMulti {
struct list ThreadFocusSink;
struct list ThreadMgrEventSink;
struct list UIElementSink;
+ struct list InputProcessorProfileActivationSink;
} ThreadMgr;
typedef struct tagEnumTfDocumentMgr {
@@ -174,6 +175,7 @@ static void ThreadMgr_Destructor(ThreadMgr *This)
free_sinks(&This->ThreadFocusSink);
free_sinks(&This->ThreadMgrEventSink);
free_sinks(&This->UIElementSink);
+ free_sinks(&This->InputProcessorProfileActivationSink);
LIST_FOR_EACH_SAFE(cursor, cursor2, &This->CurrentPreservedKeys)
{
@@ -633,6 +635,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
COOKIE_MAGIC_UIELEMENTSINK, punk, pdwCookie);
}
+ if (IsEqualIID(riid, &IID_ITfInputProcessorProfileActivationSink))
+ {
+ WARN("semi-stub for ITfInputProcessorProfileActivationSink: sink won't be used.\n");
+ return advise_sink(&This->InputProcessorProfileActivationSink, &IID_ITfInputProcessorProfileActivationSink,
+ COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK, punk, pdwCookie);
+ }
+
FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
return E_NOTIMPL;
}
@@ -646,7 +655,8 @@ static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCo
magic = get_Cookie_magic(pdwCookie);
if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
- && magic != COOKIE_MAGIC_KEYTRACESINK && magic != COOKIE_MAGIC_UIELEMENTSINK)
+ && magic != COOKIE_MAGIC_KEYTRACESINK && magic != COOKIE_MAGIC_UIELEMENTSINK
+ && magic != COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK)
return E_INVALIDARG;
return unadvise_sink(pdwCookie);
@@ -1364,6 +1374,7 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
list_init(&This->ThreadFocusSink);
list_init(&This->ThreadMgrEventSink);
list_init(&This->UIElementSink);
+ list_init(&This->InputProcessorProfileActivationSink);
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)&This->ITfThreadMgrEx_iface;
--
2.22.0
July 22, 2019
[PATCH 1/2] msctf: Accept ITfUIElementSink in ThreadMgr AdviseSink
by Andrew Eikum
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
---
dlls/msctf/msctf_internal.h | 1 +
dlls/msctf/tests/inputprocessor.c | 71 ++++++++++++++++++++++++++++---
dlls/msctf/threadmgr.c | 12 +++++-
include/msctf.idl | 19 +++++++++
4 files changed, 97 insertions(+), 6 deletions(-)
diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h
index 9d375483616..71ed10bb8dd 100644
--- a/dlls/msctf/msctf_internal.h
+++ b/dlls/msctf/msctf_internal.h
@@ -32,6 +32,7 @@
#define COOKIE_MAGIC_DMSINK 0x0070
#define COOKIE_MAGIC_THREADFOCUSSINK 0x0080
#define COOKIE_MAGIC_KEYTRACESINK 0x0090
+#define COOKIE_MAGIC_UIELEMENTSINK 0x00a0
extern DWORD tlsIndex DECLSPEC_HIDDEN;
extern TfClientId processId DECLSPEC_HIDDEN;
diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index 0d03ce3a8a1..d440b536764 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -64,7 +64,7 @@ static DWORD tmSinkCookie;
static DWORD tmSinkRefCount;
static DWORD dmSinkCookie;
static DWORD documentStatus;
-static DWORD key_trace_sink_cookie;
+static DWORD key_trace_sink_cookie, ui_element_sink_cookie;
static ITfDocumentMgr *test_CurrentFocus = NULL;
static ITfDocumentMgr *test_PrevFocus = NULL;
static ITfDocumentMgr *test_LastCurrentFocus = FOCUS_SAVE;
@@ -671,6 +671,60 @@ static const ITfKeyTraceEventSinkVtbl TfKeyTraceEventSinkVtbl = {
static ITfKeyTraceEventSink TfKeyTraceEventSink = { &TfKeyTraceEventSinkVtbl };
+static HRESULT WINAPI TfUIElementSink_QueryInterface(ITfUIElementSink *iface,
+ REFIID riid, void **ppvObject)
+{
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ITfUIElementSink, riid)){
+ *ppvObject = iface;
+ return S_OK;
+ }
+
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI TfUIElementSink_AddRef(ITfUIElementSink *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI TfUIElementSink_Release(ITfUIElementSink *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI TfUIElementSink_BeginUIElement(ITfUIElementSink *iface,
+ DWORD id, BOOL *show)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TfUIElementSink_UpdateUIElement(ITfUIElementSink *iface,
+ DWORD id)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TfUIElementSink_EndUIElement(ITfUIElementSink *iface,
+ DWORD id)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static const ITfUIElementSinkVtbl TfUIElementSinkVtbl = {
+ TfUIElementSink_QueryInterface,
+ TfUIElementSink_AddRef,
+ TfUIElementSink_Release,
+ TfUIElementSink_BeginUIElement,
+ TfUIElementSink_UpdateUIElement,
+ TfUIElementSink_EndUIElement
+};
+
+static ITfUIElementSink TfUIElementSink = { &TfUIElementSinkVtbl };
+
static HRESULT WINAPI TfTransitoryExtensionSink_QueryInterface(ITfTransitoryExtensionSink *iface, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ITfTransitoryExtensionSink, riid)) {
@@ -1128,7 +1182,7 @@ static void test_ThreadMgrAdviseSinks(void)
tmSinkRefCount = 1;
tmSinkCookie = 0;
hr = ITfSource_AdviseSink(source,&IID_ITfThreadMgrEventSink, sink, &tmSinkCookie);
- ok(hr == S_OK, "Failed to Advise Sink\n");
+ ok(hr == S_OK, "Failed to Advise ITfThreadMgrEventSink\n");
ok(tmSinkCookie!=0,"Failed to get sink cookie\n");
/* Advising the sink adds a ref, Releasing here lets the object be deleted
@@ -1138,7 +1192,11 @@ static void test_ThreadMgrAdviseSinks(void)
hr = ITfSource_AdviseSink(source, &IID_ITfKeyTraceEventSink, (IUnknown*)&TfKeyTraceEventSink,
&key_trace_sink_cookie);
- ok(hr == S_OK, "Failed to Advise Sink\n");
+ ok(hr == S_OK, "Failed to Advise ITfKeyTraceEventSink\n");
+
+ hr = ITfSource_AdviseSink(source, &IID_ITfUIElementSink, (IUnknown*)&TfUIElementSink,
+ &ui_element_sink_cookie);
+ ok(hr == S_OK, "Failed to Advise ITfUIElementSink\n");
ITfSource_Release(source);
}
@@ -1155,10 +1213,13 @@ static void test_ThreadMgrUnadviseSinks(void)
tmSinkRefCount = 1;
hr = ITfSource_UnadviseSink(source, tmSinkCookie);
- ok(hr == S_OK, "Failed to unadvise Sink\n");
+ ok(hr == S_OK, "Failed to unadvise ITfThreadMgrEventSink\n");
hr = ITfSource_UnadviseSink(source, key_trace_sink_cookie);
- ok(hr == S_OK, "Failed to unadvise Sink\n");
+ ok(hr == S_OK, "Failed to unadvise ITfKeyTraceEventSink\n");
+
+ hr = ITfSource_UnadviseSink(source, ui_element_sink_cookie);
+ ok(hr == S_OK, "Failed to unadvise ITfUIElementSink\n");
ITfSource_Release(source);
}
diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c
index a9fcb5cd15c..7afef3cdd53 100644
--- a/dlls/msctf/threadmgr.c
+++ b/dlls/msctf/threadmgr.c
@@ -96,6 +96,7 @@ typedef struct tagACLMulti {
struct list PreservedKeyNotifySink;
struct list ThreadFocusSink;
struct list ThreadMgrEventSink;
+ struct list UIElementSink;
} ThreadMgr;
typedef struct tagEnumTfDocumentMgr {
@@ -172,6 +173,7 @@ static void ThreadMgr_Destructor(ThreadMgr *This)
free_sinks(&This->PreservedKeyNotifySink);
free_sinks(&This->ThreadFocusSink);
free_sinks(&This->ThreadMgrEventSink);
+ free_sinks(&This->UIElementSink);
LIST_FOR_EACH_SAFE(cursor, cursor2, &This->CurrentPreservedKeys)
{
@@ -624,6 +626,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
COOKIE_MAGIC_KEYTRACESINK, punk, pdwCookie);
}
+ if (IsEqualIID(riid, &IID_ITfUIElementSink))
+ {
+ WARN("semi-stub for ITfUIElementSink: sink won't be used.\n");
+ return advise_sink(&This->UIElementSink, &IID_ITfUIElementSink,
+ COOKIE_MAGIC_UIELEMENTSINK, punk, pdwCookie);
+ }
+
FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
return E_NOTIMPL;
}
@@ -637,7 +646,7 @@ static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCo
magic = get_Cookie_magic(pdwCookie);
if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
- && magic != COOKIE_MAGIC_KEYTRACESINK)
+ && magic != COOKIE_MAGIC_KEYTRACESINK && magic != COOKIE_MAGIC_UIELEMENTSINK)
return E_INVALIDARG;
return unadvise_sink(pdwCookie);
@@ -1354,6 +1363,7 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
list_init(&This->PreservedKeyNotifySink);
list_init(&This->ThreadFocusSink);
list_init(&This->ThreadMgrEventSink);
+ list_init(&This->UIElementSink);
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)&This->ITfThreadMgrEx_iface;
diff --git a/include/msctf.idl b/include/msctf.idl
index 01e944cf5df..5ef33119fd8 100644
--- a/include/msctf.idl
+++ b/include/msctf.idl
@@ -1136,6 +1136,25 @@ interface ITfKeyTraceEventSink : IUnknown
[in] LPARAM lParam);
}
+[
+ object,
+ local,
+ uuid(ea1ea136-19df-11d7-a6d2-00065b84435c),
+ pointer_default(unique)
+]
+interface ITfUIElementSink : IUnknown
+{
+ HRESULT BeginUIElement(
+ [in] DWORD id,
+ [in, out] BOOL *show);
+
+ HRESULT UpdateUIElement(
+ [in] DWORD id);
+
+ HRESULT EndUIElement(
+ [in] DWORD id);
+}
+
[
object,
local,
--
2.22.0
July 22, 2019
Re: Proposal: Build System Change (autotools->mesonbuild)?
by Henri Verbeet
On Mon, 22 Jul 2019 at 19:53, Simon Richter <Simon.Richter(a)hogyros.de> wrote:
> Pulling in dependencies automatically is less of an interesting use case
> than you think. Most users will get Wine through their Linux distribution,
> and the very first thing distribution maintainers do is turn off all of
> that automation, and remove any copies of third-party libraries to avoid
> accidentally linking against them instead of the "official" version that
> receives security support.
>
I'm sure some people disagree with me, but in fact, that particular
kind of pulling in dependencies is something that I think should
actively be discouraged.
Henri
July 22, 2019