winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
February 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
716 discussions
Start a n
N
ew thread
Conor McCarthy : vkd3d-shader/dxil: Implement DX intrinsic GetDimensions.
by Alexandre Julliard
26 Feb '24
26 Feb '24
Module: vkd3d Branch: master Commit: c083b1d0fc0dac5f7a50f763be5c1fe6b859baa4 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/c083b1d0fc0dac5f7a50f763be5c1…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Mon Feb 12 16:18:40 2024 +1000 vkd3d-shader/dxil: Implement DX intrinsic GetDimensions. --- libs/vkd3d-shader/dxil.c | 96 ++++++++++++++++++++++++++++++++++++ tests/hlsl/getdimensions.shader_test | 4 +- tests/hlsl/srv-buffers.shader_test | 2 +- 3 files changed, 99 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 582d4ff2..26a8a5c1 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -388,6 +388,7 @@ enum dx_intrinsic_opcode DX_TEXTURE_STORE = 67, DX_BUFFER_LOAD = 68, DX_BUFFER_STORE = 69, + DX_GET_DIMENSIONS = 72, DX_ATOMIC_BINOP = 78, DX_ATOMIC_CMP_XCHG = 79, DX_DERIV_COARSEX = 83, @@ -2356,6 +2357,23 @@ static void instruction_dst_param_init_ssa_vector(struct vkd3d_shader_instructio dst->u.reg = param->reg; } +static bool instruction_dst_param_init_temp_vector(struct vkd3d_shader_instruction *ins, struct sm6_parser *sm6) +{ + struct sm6_value *dst = sm6_parser_get_current_value(sm6); + struct vkd3d_shader_dst_param *param; + + if (!(param = instruction_dst_params_alloc(ins, 1, sm6))) + return false; + + vsir_dst_param_init(param, VKD3DSPR_TEMP, vkd3d_data_type_from_sm6_type(sm6_type_get_scalar_type(dst->type, 0)), 1); + param->write_mask = VKD3DSP_WRITEMASK_ALL; + param->reg.idx[0].offset = 0; + param->reg.dimension = VSIR_DIMENSION_VEC4; + dst->u.reg = param->reg; + + return true; +} + /* Recurse through the block tree while maintaining a current value count. The current * count is the sum of the global count plus all declarations within the current function. * Store into value_capacity the highest count seen. */ @@ -4047,6 +4065,80 @@ static void sm6_parser_emit_dx_create_handle(struct sm6_parser *sm6, enum dx_int ins->handler_idx = VKD3DSIH_NOP; } +static void sm6_parser_emit_dx_get_dimensions(struct sm6_parser *sm6, enum dx_intrinsic_opcode op, + const struct sm6_value **operands, struct function_emission_state *state) +{ + struct vkd3d_shader_instruction *ins = state->ins; + struct vkd3d_shader_src_param *src_params; + unsigned int is_texture, component_count; + enum dxil_resource_kind resource_kind; + struct vkd3d_shader_dst_param *dst; + const struct sm6_value *resource; + + resource = operands[0]; + if (!sm6_value_validate_is_handle(resource, sm6)) + return; + is_texture = resource->u.handle.d->resource_type != VKD3D_SHADER_RESOURCE_BUFFER; + resource_kind = resource->u.handle.d->kind; + + instruction_init_with_resource(ins, is_texture ? VKD3DSIH_RESINFO : VKD3DSIH_BUFINFO, resource, sm6); + + if (!(src_params = instruction_src_params_alloc(ins, 1 + is_texture, sm6))) + return; + src_param_init_vector_from_reg(&src_params[is_texture], &resource->u.handle.reg); + + if (is_texture) + { + ins->flags = VKD3DSI_RESINFO_UINT; + src_param_init_from_value(&src_params[0], operands[1]); + component_count = VKD3D_VEC4_SIZE; + + if (resource_kind_is_multisampled(resource_kind)) + { + instruction_dst_param_init_temp_vector(ins++, sm6); + state->temp_idx = 1; + + /* DXIL does not have an instrinsic for sample info, and resinfo is expected to return + * the sample count in .w for MS textures. The result is always a struct of 4 x uint32. */ + vsir_instruction_init(ins, &sm6->p.location, VKD3DSIH_SAMPLE_INFO); + ins->flags = VKD3DSI_SAMPLE_INFO_UINT; + + if (!(src_params = instruction_src_params_alloc(ins, 1, sm6))) + return; + src_param_init_vector_from_reg(&src_params[0], &resource->u.handle.reg); + src_params[0].swizzle = VKD3D_SHADER_SWIZZLE(X, X, X, X); + + if (!instruction_dst_param_init_temp_vector(ins, sm6)) + return; + dst = ins->dst; + dst->write_mask = VKD3DSP_WRITEMASK_3; + + /* Move the result to an SSA in case another instruction overwrites r0 before + * the components are extracted for use. */ + ++ins; + vsir_instruction_init(ins, &sm6->p.location, VKD3DSIH_MOV); + if (!(src_params = instruction_src_params_alloc(ins, 1, sm6))) + return; + src_param_init_vector_from_reg(&src_params[0], &dst->reg); + + state->ins = ins; + state->code_block->instruction_count += 2; + } + } + else + { + if (!operands[1]->is_undefined) + { + WARN("Ignoring unexpected operand.\n"); + vkd3d_shader_parser_warning(&sm6->p, VKD3D_SHADER_WARNING_DXIL_IGNORING_OPERANDS, + "Ignoring an unexpected defined LOD value for buffer GetDimensions."); + } + component_count = 1 + (resource_kind == RESOURCE_KIND_STRUCTUREDBUFFER); + } + + instruction_dst_param_init_ssa_vector(ins, component_count, sm6); +} + static enum vkd3d_shader_opcode sm6_dx_map_tertiary_op(enum dx_intrinsic_opcode op) { switch (op) @@ -4636,6 +4728,7 @@ struct sm6_dx_opcode_info e -> half/float g -> half/float/double H -> handle + D -> Dimensions S -> splitdouble v -> void o -> overloaded @@ -4666,6 +4759,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] = [DX_FMAX ] = {"g", "RR", sm6_parser_emit_dx_binary}, [DX_FMIN ] = {"g", "RR", sm6_parser_emit_dx_binary}, [DX_FRC ] = {"g", "R", sm6_parser_emit_dx_unary}, + [DX_GET_DIMENSIONS ] = {"D", "Hi", sm6_parser_emit_dx_get_dimensions}, [DX_IBFE ] = {"m", "iiR", sm6_parser_emit_dx_tertiary}, [DX_HCOS ] = {"g", "R", sm6_parser_emit_dx_unary}, [DX_HSIN ] = {"g", "R", sm6_parser_emit_dx_unary}, @@ -4743,6 +4837,8 @@ static bool sm6_parser_validate_operand_type(struct sm6_parser *sm6, const struc return sm6_type_is_floating_point(type); case 'H': return (is_return || sm6_value_is_handle(value)) && type == sm6->handle_type; + case 'D': + return sm6_type_is_struct(type) && !strcmp(type->u.struc->name, "dx.types.Dimensions"); case 'S': return sm6_type_is_struct(type) && !strcmp(type->u.struc->name, "dx.types.splitdouble"); case 'v': diff --git a/tests/hlsl/getdimensions.shader_test b/tests/hlsl/getdimensions.shader_test index 0528d141..5676f361 100644 --- a/tests/hlsl/getdimensions.shader_test +++ b/tests/hlsl/getdimensions.shader_test @@ -28,7 +28,7 @@ float4 main() : sv_target } [test] -todo(sm>=6) draw quad +draw quad probe all rgba (2.0, 3.0, 2.0, 3.0) [srv 1] @@ -53,5 +53,5 @@ float4 main() : sv_target } [test] -todo(sm>=6) draw quad +draw quad probe all rgba (2.0, 2.0, 1.0, 2.0) diff --git a/tests/hlsl/srv-buffers.shader_test b/tests/hlsl/srv-buffers.shader_test index 8ba73cc8..de4ac90f 100644 --- a/tests/hlsl/srv-buffers.shader_test +++ b/tests/hlsl/srv-buffers.shader_test @@ -185,5 +185,5 @@ float4 main() : sv_target return width; } [test] -todo draw quad +todo(sm<6) draw quad probe all rgba (4.0, 4.0, 4.0, 4.0)
1
0
0
0
Conor McCarthy : vkd3d-shader/dxil: Move the resource kind helper functions up.
by Alexandre Julliard
26 Feb '24
26 Feb '24
Module: vkd3d Branch: master Commit: 292bbdefbf9cbaf092702f8621352430444107c6 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/292bbdefbf9cbaf092702f8621352…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Mon Feb 12 16:17:08 2024 +1000 vkd3d-shader/dxil: Move the resource kind helper functions up. --- libs/vkd3d-shader/dxil.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index ac688e85..582d4ff2 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -1937,6 +1937,16 @@ static const struct sm6_type *sm6_parser_get_type(struct sm6_parser *sm6, uint64 return &sm6->types[type_id]; } +static bool resource_kind_is_texture(enum dxil_resource_kind kind) +{ + return kind >= RESOURCE_KIND_TEXTURE1D && kind <= RESOURCE_KIND_TEXTURECUBEARRAY; +} + +static bool resource_kind_is_multisampled(enum dxil_resource_kind kind) +{ + return kind == RESOURCE_KIND_TEXTURE2DMS || kind == RESOURCE_KIND_TEXTURE2DMSARRAY; +} + static int global_symbol_compare(const void *a, const void *b) { return vkd3d_u32_compare(((const struct sm6_symbol *)a)->id, ((const struct sm6_symbol *)b)->id); @@ -6778,16 +6788,6 @@ static bool sm6_parser_resources_load_register_range(struct sm6_parser *sm6, return true; } -static bool resource_kind_is_texture(enum dxil_resource_kind kind) -{ - return kind >= RESOURCE_KIND_TEXTURE1D && kind <= RESOURCE_KIND_TEXTURECUBEARRAY; -} - -static bool resource_kind_is_multisampled(enum dxil_resource_kind kind) -{ - return kind == RESOURCE_KIND_TEXTURE2DMS || kind == RESOURCE_KIND_TEXTURE2DMSARRAY; -} - static enum vkd3d_shader_resource_type shader_resource_type_from_dxil_resource_kind(enum dxil_resource_kind kind) { if (resource_kind_is_texture(kind))
1
0
0
0
Sven Baars : oleaut32: Use scientific notation if it prevents a loss of accuracy.
by Alexandre Julliard
26 Feb '24
26 Feb '24
Module: wine Branch: master Commit: 8a8d1dedcf1229abb0fd90b93a8beae7765af5fd URL:
https://gitlab.winehq.org/wine/wine/-/commit/8a8d1dedcf1229abb0fd90b93a8bea…
Author: Sven Baars <sbaars(a)codeweavers.com> Date: Sat Feb 24 21:11:17 2024 +0100 oleaut32: Use scientific notation if it prevents a loss of accuracy. --- dlls/oleaut32/tests/vartype.c | 22 ++++++++++++++++------ dlls/oleaut32/vartype.c | 14 +++++++++++--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 795446d0987..8516689d1bd 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -4679,12 +4679,22 @@ static void test_VarBstrFromR8(void) { static const struct r8_test tests_en[] = { - { 0.5, L"0.5" }, - { 0.05, L"0.05" }, - { 0.005, L"0.005" }, - { 0.0005, L"0.0005" }, - { 0.00005, L"0.00005" }, - { 0.000005, L"0.000005" }, + { 0.56789, L"0.56789" }, + { 5.6789e-2, L"0.056789" }, + { 5.6789e-3, L"0.0056789" }, + { 5.6789e-4, L"0.00056789" }, + { 5.6789e-5, L"0.000056789" }, + { 5.6789e-6, L"0.0000056789" }, + { 5.6789e-7, L"0.00000056789" }, + { 5.6789e-8, L"0.000000056789" }, + { 5.6789e-9, L"0.0000000056789" }, + { 5.6789e-10, L"0.00000000056789" }, + { 5.6789e-11, L"0.000000000056789" }, + { 5.6789e-12, L"5.6789E-12" }, + { 5.6789e-13, L"5.6789E-13" }, + { 5.6789e-14, L"5.6789E-14" }, + { 5.6789e-15, L"5.6789E-15" }, + { 5.6789e-16, L"5.6789E-16" }, { 1.0e8, L"100000000" }, { 1.0e12, L"1000000000000" }, diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index d11fb41d1b3..747705f94e2 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -6550,10 +6550,18 @@ static HRESULT VARIANT_BstrFromReal(DOUBLE dblIn, LCID lcid, ULONG dwFlags, if (!(locale = _create_locale(LC_ALL, "C"))) return E_OUTOFMEMORY; len = _swprintf_l(buff, ARRAY_SIZE(buff), L"%.*G", locale, ndigits, dblIn); e = wcschr(buff, 'E'); - if (e && labs(wcstol(e+1, NULL, 10)) < ndigits) + if (e) { - len = _swprintf_l(buff, ARRAY_SIZE(buff), L"%.*f", locale, ndigits, dblIn); - while (len > 0 && (buff[len-1] == '0')) len--; + int extra_decimals; + WCHAR *dot; + + dot = wcschr(buff, '.'); + extra_decimals = dot ? e - dot - 2 : 0; + if (labs(wcstol(e+1, NULL, 10)) + extra_decimals < ndigits) + { + len = _swprintf_l(buff, ARRAY_SIZE(buff), L"%.*f", locale, ndigits, dblIn); + while (len > 0 && (buff[len-1] == '0')) len--; + } } buff[len] = 0; _free_locale(locale);
1
0
0
0
Tag wine-9.3 : Alexandre Julliard : Release 9.3
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: refs/tags/wine-9.3 Tag: 17e60d639d0261596b736e1bf82b6f611b87fbf1 URL:
https://gitlab.winehq.org/wine/wine/-/tags/17e60d639d0261596b736e1bf82b6f61…
Tagger: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Feb 23 22:19:13 2024 +0100 Release 9.3
1
0
0
0
Alexandre Julliard : Release 9.3.
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: master Commit: 1b32ac45f821ee1fe06a3dc4f903a81a190216c7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1b32ac45f821ee1fe06a3dc4f903a8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Feb 23 22:19:13 2024 +0100 Release 9.3. --- ANNOUNCE.md | 695 ++++++++++++++++++++++++++++++++++-------------------------- AUTHORS | 5 + VERSION | 2 +- configure | 18 +- 4 files changed, 411 insertions(+), 309 deletions(-)
1
0
0
0
Hans Leidekker : wbemprox: Protect tables with a critical section.
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: master Commit: 9015eebf87e3de8f9c541299e529c9667cc4847b URL:
https://gitlab.winehq.org/wine/wine/-/commit/9015eebf87e3de8f9c541299e529c9…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Feb 22 16:35:12 2024 +0100 wbemprox: Protect tables with a critical section. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56334
--- dlls/wbemprox/class.c | 2 +- dlls/wbemprox/query.c | 5 +++-- dlls/wbemprox/table.c | 25 +++++++++++++++++++++---- dlls/wbemprox/wbemprox_private.h | 4 ++-- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index 1570a5e534a..8e585c2f360 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -236,7 +236,7 @@ static struct record *create_record( struct table *table ) record->fields[i].u.ival = 0; } record->count = table->num_cols; - record->table = addref_table( table ); + record->table = grab_table( table ); return record; } diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index d7990305003..a6599334f58 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -54,11 +54,12 @@ HRESULT create_view( enum view_type type, enum wbm_namespace ns, const WCHAR *pa case VIEW_TYPE_SELECT: { - struct table *table = grab_table( ns, class ); + struct table *table = find_table( ns, class ); HRESULT hr; if (table && (hr = append_table( view, table )) != S_OK) { + release_table( table ); free( view ); return hr; } @@ -631,7 +632,7 @@ static HRESULT get_antecedent_table( enum wbm_namespace ns, const WCHAR *assoccl } if ((hr = do_query( ns, str, &query )) != S_OK) goto done; - if (query->view->table_count) *table = addref_table( query->view->table[0] ); + if (query->view->table_count) *table = grab_table( query->view->table[0] ); else *table = NULL; done: diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c index ab386efa06b..67f57878ea5 100644 --- a/dlls/wbemprox/table.c +++ b/dlls/wbemprox/table.c @@ -29,6 +29,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(wbemprox); +static CRITICAL_SECTION table_cs; +static CRITICAL_SECTION_DEBUG table_debug = +{ + 0, 0, &table_cs, + { &table_debug.ProcessLocksList, &table_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": table_cs") } +}; +static CRITICAL_SECTION table_cs = { &table_debug, -1, 0, 0, 0, 0 }; + HRESULT get_column_index( const struct table *table, const WCHAR *name, UINT *column ) { UINT i; @@ -329,6 +338,7 @@ void free_table( struct table *table ) { if (!table) return; + EnterCriticalSection( &table_cs ); clear_table( table ); if (table->flags & TABLE_FLAG_DYNAMIC) { @@ -339,20 +349,23 @@ void free_table( struct table *table ) list_remove( &table->entry ); free( table ); } + LeaveCriticalSection( &table_cs ); } void release_table( struct table *table ) { if (!InterlockedDecrement( &table->refs )) free_table( table ); + LeaveCriticalSection( &table_cs ); } -struct table *addref_table( struct table *table ) +struct table *grab_table( struct table *table ) { + EnterCriticalSection( &table_cs ); InterlockedIncrement( &table->refs ); return table; } -struct table *grab_table( enum wbm_namespace ns, const WCHAR *name ) +struct table *find_table( enum wbm_namespace ns, const WCHAR *name ) { struct table *table; @@ -363,7 +376,7 @@ struct table *grab_table( enum wbm_namespace ns, const WCHAR *name ) if (name && !wcsicmp( table->name, name )) { TRACE("returning %p\n", table); - return addref_table( table ); + return grab_table( table ); } } return NULL; @@ -395,15 +408,19 @@ BOOL add_table( enum wbm_namespace ns, struct table *table ) if (ns == WBEMPROX_NAMESPACE_LAST) return FALSE; + EnterCriticalSection( &table_cs ); LIST_FOR_EACH_ENTRY( iter, table_list[ns], struct table, entry ) { if (!wcsicmp( iter->name, table->name )) { TRACE("table %s already exists\n", debugstr_w(table->name)); + LeaveCriticalSection( &table_cs ); return FALSE; } } list_add_tail( table_list[ns], &table->entry ); + LeaveCriticalSection( &table_cs ); + TRACE("added %p\n", table); return TRUE; } @@ -414,7 +431,7 @@ BSTR get_method_name( enum wbm_namespace ns, const WCHAR *class, UINT index ) UINT i, count = 0; BSTR ret; - if (!(table = grab_table( ns, class ))) return NULL; + if (!(table = find_table( ns, class ))) return NULL; for (i = 0; i < table->num_cols; i++) { diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index 3c8fa403c57..8e065bee0b9 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -215,8 +215,8 @@ HRESULT execute_view( struct view * ); struct table *get_view_table( const struct view *, UINT ); void init_table_list( void ); enum wbm_namespace get_namespace_from_string( const WCHAR *namespace ); -struct table *grab_table( enum wbm_namespace, const WCHAR * ); -struct table *addref_table( struct table * ); +struct table *find_table( enum wbm_namespace, const WCHAR * ); +struct table *grab_table( struct table * ); void release_table( struct table * ); struct table *create_table( const WCHAR *, UINT, const struct column *, UINT, UINT, BYTE *, enum fill_status (*)(struct table *, const struct expr *) );
1
0
0
0
Alex Henrie : advapi32/tests: Use CRT allocation functions.
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: master Commit: ce6e298a68b33a60ac85d1c8ecbe0580a989943a URL:
https://gitlab.winehq.org/wine/wine/-/commit/ce6e298a68b33a60ac85d1c8ecbe05…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sat Feb 17 22:16:16 2024 -0700 advapi32/tests: Use CRT allocation functions. --- dlls/advapi32/tests/crypt.c | 4 +- dlls/advapi32/tests/eventlog.c | 42 +++--- dlls/advapi32/tests/lsa.c | 12 +- dlls/advapi32/tests/registry.c | 20 +-- dlls/advapi32/tests/security.c | 322 ++++++++++++++++++++--------------------- dlls/advapi32/tests/service.c | 86 +++++------ 6 files changed, 243 insertions(+), 243 deletions(-)
1
0
0
0
Rémi Bernon : server: Use the startup info to connect the process winstation.
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: master Commit: 74bf784b29ae03d97bc4b527526b3345f5335838 URL:
https://gitlab.winehq.org/wine/wine/-/commit/74bf784b29ae03d97bc4b527526b33…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Feb 21 20:11:55 2024 +0100 server: Use the startup info to connect the process winstation. This changes the todos in the tests as it fixes the thread input not being attached, but then exposes a different todo. --- dlls/dinput/tests/joystick8.c | 23 +++++++++-------------- dlls/user32/tests/input.c | 8 ++++---- server/process.c | 6 ++++-- server/user.h | 5 +++-- server/winstation.c | 27 +++++++++++++++++++++++++-- 5 files changed, 45 insertions(+), 24 deletions(-) diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index 0553cb96a63..428fc59c1af 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -5756,23 +5756,23 @@ static DWORD WINAPI test_rawinput_desktop_thread( void *args ) rawbuffer_size = sizeof(rawbuffer); memset( rawbuffer, 0, sizeof(rawbuffer) ); res = msg_wait_for_events( 1, &rawinput_event, 100 ); - todo_wine + todo_wine_if( params->input ) ok( res == 0, "WaitForSingleObject returned %#lx\n", res ); - todo_wine + todo_wine_if( params->input ) ok( rawinput_calls == 1, "got %u WM_INPUT messages\n", rawinput_calls ); rawinput = (RAWINPUT *)rawbuffer; - todo_wine + todo_wine_if( params->input ) ok( rawinput->header.dwType == RIM_TYPEHID, "got dwType %lu\n", rawinput->header.dwType ); - todo_wine + todo_wine_if( params->input ) ok( rawinput->header.dwSize == offsetof(RAWINPUT, data.hid.bRawData[desc.caps.InputReportByteLength * rawinput->data.hid.dwCount]), "got header.dwSize %lu\n", rawinput->header.dwSize ); - todo_wine + todo_wine_if( params->input ) ok( rawinput->header.hDevice != 0, "got hDevice %p\n", rawinput->header.hDevice ); ok( rawinput->header.wParam == 0, "got wParam %#Ix\n", rawinput->header.wParam ); - todo_wine + todo_wine_if( params->input ) ok( rawinput->data.hid.dwSizeHid == desc.caps.InputReportByteLength, "got dwSizeHid %lu\n", rawinput->data.hid.dwSizeHid ); - todo_wine + todo_wine_if( params->input ) ok( rawinput->data.hid.dwCount >= 1, "got dwCount %lu\n", rawinput->data.hid.dwCount ); @@ -5864,28 +5864,23 @@ static void test_rawinput_desktop( const char *path, BOOL input ) res = msg_wait_for_events( 1, &rawinput_event, 100 ); if (input) { - todo_wine ok( res == 0, "WaitForSingleObject returned %#lx\n", res ); - todo_wine ok( rawinput_calls == 1, "got %u WM_INPUT messages\n", rawinput_calls ); rawinput = (RAWINPUT *)rawbuffer; - todo_wine ok( rawinput->header.dwType == RIM_TYPEHID, "got dwType %lu\n", rawinput->header.dwType ); - todo_wine ok( rawinput->header.dwSize == offsetof(RAWINPUT, data.hid.bRawData[desc.caps.InputReportByteLength * rawinput->data.hid.dwCount]), "got header.dwSize %lu\n", rawinput->header.dwSize ); - todo_wine ok( rawinput->header.hDevice != 0, "got hDevice %p\n", rawinput->header.hDevice ); ok( rawinput->header.wParam == 0, "got wParam %#Ix\n", rawinput->header.wParam ); - todo_wine ok( rawinput->data.hid.dwSizeHid == desc.caps.InputReportByteLength, "got dwSizeHid %lu\n", rawinput->data.hid.dwSizeHid ); - todo_wine ok( rawinput->data.hid.dwCount >= 1, "got dwCount %lu\n", rawinput->data.hid.dwCount ); } else { + todo_wine ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res ); + todo_wine ok( rawinput_calls == 0, "got %u WM_INPUT messages\n", rawinput_calls ); } diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index be95bd150b4..a78ea3b7c43 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -3855,19 +3855,19 @@ static void test_SendInput_mouse_messages(void) ok_ne( NULL, thread, HANDLE, "%p" ); ok_ret( 0, WaitForSingleObject( params.start_event, 5000 ) ); - todo_wine ok_ret( 1, AttachThreadInput( thread_id, GetCurrentThreadId(), TRUE ) ); + ok_ret( 1, AttachThreadInput( thread_id, GetCurrentThreadId(), TRUE ) ); ok_ret( 0, SendMessageW( params.hwnd, WM_USER, 0, 0 ) ); mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 ); wait_messages( 5, FALSE ); - button_down_hwnd[1].message.hwnd = hwnd; - ok_seq( button_down_hwnd ); + button_down_hwnd_todo[1].message.hwnd = hwnd; + ok_seq( button_down_hwnd_todo ); mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 ); wait_messages( 5, FALSE ); button_up_hwnd[1].message.hwnd = hwnd; ok_seq( button_up_hwnd ); - todo_wine ok_ret( 1, AttachThreadInput( thread_id, GetCurrentThreadId(), FALSE ) ); + ok_ret( 1, AttachThreadInput( thread_id, GetCurrentThreadId(), FALSE ) ); ok_ret( 1, SetEvent( params.end_event ) ); ok_ret( 0, WaitForSingleObject( thread, 5000 ) ); ok_ret( 1, CloseHandle( thread ) ); diff --git a/server/process.c b/server/process.c index 3651696f505..b6c21d15752 100644 --- a/server/process.c +++ b/server/process.c @@ -1133,7 +1133,7 @@ DECL_HANDLER(new_process) { struct startup_info *info; const void *info_ptr; - struct unicode_str name; + struct unicode_str name, desktop_path = {0}; const struct security_descriptor *sd; const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL ); struct process *process = NULL; @@ -1276,7 +1276,9 @@ DECL_HANDLER(new_process) FIXUP_LEN( info->data->imagepath_len ); FIXUP_LEN( info->data->cmdline_len ); FIXUP_LEN( info->data->title_len ); + desktop_path.str = (WCHAR *)((char *)info->data + pos); FIXUP_LEN( info->data->desktop_len ); + desktop_path.len = info->data->desktop_len; FIXUP_LEN( info->data->shellinfo_len ); FIXUP_LEN( info->data->runtime_len ); #undef FIXUP_LEN @@ -1327,7 +1329,7 @@ DECL_HANDLER(new_process) } /* connect to the window station */ - connect_process_winstation( process, parent_thread, parent ); + connect_process_winstation( process, &desktop_path, parent_thread, parent ); /* inherit the process console, but keep pseudo handles (< 0), and 0 (= not attached to a console) as is */ if ((int)info->data->console > 0) diff --git a/server/user.h b/server/user.h index 8fa55e09b0f..bc58c93200d 100644 --- a/server/user.h +++ b/server/user.h @@ -22,6 +22,7 @@ #define __WINE_SERVER_USER_H #include "wine/server_protocol.h" +#include "unicode.h" struct thread; struct region; @@ -186,8 +187,8 @@ extern client_ptr_t get_class_client_ptr( struct window_class *class ); extern struct desktop *get_desktop_obj( struct process *process, obj_handle_t handle, unsigned int access ); extern struct winstation *get_process_winstation( struct process *process, unsigned int access ); extern struct desktop *get_thread_desktop( struct thread *thread, unsigned int access ); -extern void connect_process_winstation( struct process *process, struct thread *parent_thread, - struct process *parent_process ); +extern void connect_process_winstation( struct process *process, struct unicode_str *desktop_path, + struct thread *parent_thread, struct process *parent_process ); extern void set_process_default_desktop( struct process *process, struct desktop *desktop, obj_handle_t handle ); extern void close_process_desktop( struct process *process ); diff --git a/server/winstation.c b/server/winstation.c index 930c5c90d97..c3ea69c8a29 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -373,18 +373,37 @@ void set_process_default_desktop( struct process *process, struct desktop *deskt } /* connect a process to its window station */ -void connect_process_winstation( struct process *process, struct thread *parent_thread, - struct process *parent_process ) +void connect_process_winstation( struct process *process, struct unicode_str *desktop_path, + struct thread *parent_thread, struct process *parent_process ) { + struct unicode_str desktop_name = *desktop_path, winstation_name = {0}; + const int attributes = OBJ_CASE_INSENSITIVE | OBJ_OPENIF; struct winstation *winstation = NULL; struct desktop *desktop = NULL; + const WCHAR *wch, *end; obj_handle_t handle; + for (wch = desktop_name.str, end = wch + desktop_name.len / sizeof(WCHAR); wch != end; wch++) + { + if (*wch == '\\') + { + winstation_name.str = desktop_name.str; + winstation_name.len = (wch - winstation_name.str) * sizeof(WCHAR); + desktop_name.str = wch + 1; + desktop_name.len = (end - desktop_name.str) * sizeof(WCHAR); + break; + } + } + /* check for an inherited winstation handle (don't ask...) */ if ((handle = find_inherited_handle( process, &winstation_ops ))) { winstation = (struct winstation *)get_handle_obj( process, handle, 0, &winstation_ops ); } + else if (winstation_name.len && (winstation = open_named_object( NULL, &winstation_ops, &winstation_name, attributes ))) + { + handle = alloc_handle( process, winstation, STANDARD_RIGHTS_REQUIRED | WINSTA_ALL_ACCESS, 0 ); + } else if (parent_process->winstation) { handle = duplicate_handle( parent_process, parent_process->winstation, @@ -399,6 +418,10 @@ void connect_process_winstation( struct process *process, struct thread *parent_ desktop = get_desktop_obj( process, handle, 0 ); if (!desktop || desktop->winstation != winstation) goto done; } + else if (desktop_name.len && (desktop = open_named_object( &winstation->obj, &desktop_ops, &desktop_name, attributes ))) + { + handle = alloc_handle( process, desktop, STANDARD_RIGHTS_REQUIRED | DESKTOP_ALL_ACCESS, 0 ); + } else { if (parent_thread && parent_thread->desktop)
1
0
0
0
Paul Gofman : wininet: Force debug info in critical sections.
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: master Commit: c55f5d87dbd5574a37ac0cf8ea74fa688e6837ee URL:
https://gitlab.winehq.org/wine/wine/-/commit/c55f5d87dbd5574a37ac0cf8ea74fa…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Feb 21 22:01:19 2024 -0600 wininet: Force debug info in critical sections. --- dlls/wininet/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index ac3a1955270..9a20a877cdc 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3465,10 +3465,10 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, request->send_timeout = session->send_timeout; request->receive_timeout = session->receive_timeout; - InitializeCriticalSection( &request->headers_section ); + InitializeCriticalSectionEx( &request->headers_section, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); request->headers_section.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": http_request_t.headers_section"); - InitializeCriticalSection( &request->read_section ); + InitializeCriticalSectionEx( &request->read_section, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); request->read_section.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": http_request_t.read_section"); WININET_AddRef( &session->hdr );
1
0
0
0
Paul Gofman : windowscodecs: Force debug info in critical sections.
by Alexandre Julliard
23 Feb '24
23 Feb '24
Module: wine Branch: master Commit: 4e49c37028d2cc7822253a25ae26037102e2cd83 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4e49c37028d2cc7822253a25ae2603…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Feb 21 22:00:23 2024 -0600 windowscodecs: Force debug info in critical sections. --- dlls/windowscodecs/bitmap.c | 2 +- dlls/windowscodecs/bmpdecode.c | 2 +- dlls/windowscodecs/clipper.c | 2 +- dlls/windowscodecs/converter.c | 2 +- dlls/windowscodecs/ddsformat.c | 6 +++--- dlls/windowscodecs/decoder.c | 2 +- dlls/windowscodecs/encoder.c | 2 +- dlls/windowscodecs/fliprotate.c | 2 +- dlls/windowscodecs/gifformat.c | 4 ++-- dlls/windowscodecs/icoformat.c | 2 +- dlls/windowscodecs/info.c | 4 ++-- dlls/windowscodecs/metadatahandler.c | 2 +- dlls/windowscodecs/palette.c | 2 +- dlls/windowscodecs/scaler.c | 2 +- dlls/windowscodecs/stream.c | 4 ++-- dlls/windowscodecs/tgaformat.c | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-)
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200