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
August 2023
----- 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
667 discussions
Start a n
N
ew thread
Zebediah Figura : vkd3d-shader/hlsl: Use hlsl_block_add_instr() in clone_block().
by Alexandre Julliard
08 Aug '23
08 Aug '23
Module: vkd3d Branch: master Commit: cf6bc95a3d23df42618bb289038e301195a7dbed URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/cf6bc95a3d23df42618bb289038e3…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Jun 25 18:09:34 2023 -0500 vkd3d-shader/hlsl: Use hlsl_block_add_instr() in clone_block(). --- libs/vkd3d-shader/hlsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 8f2c740a..8b706e1e 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -1544,7 +1544,7 @@ static bool clone_block(struct hlsl_ctx *ctx, struct hlsl_block *dst_block, hlsl_block_cleanup(dst_block); return false; } - list_add_tail(&dst_block->instrs, &dst->entry); + hlsl_block_add_instr(dst_block, dst); if (!list_empty(&src->uses)) {
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Clean up the static_initializers block when the context is destroyed (Valgrind).
by Alexandre Julliard
08 Aug '23
08 Aug '23
Module: vkd3d Branch: master Commit: 4ae00cea439e9c84a9109fc0e4c01791a4b18415 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/4ae00cea439e9c84a9109fc0e4c01…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Jun 30 17:41:20 2023 -0500 vkd3d-shader/hlsl: Clean up the static_initializers block when the context is destroyed (Valgrind). This is currently leaked if we fail parsing before reaching codegen. --- libs/vkd3d-shader/hlsl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 6b1ded64..8f2c740a 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -3377,6 +3377,8 @@ static void hlsl_ctx_cleanup(struct hlsl_ctx *ctx) struct hlsl_type *type, *next_type; unsigned int i; + hlsl_block_cleanup(&ctx->static_initializers); + for (i = 0; i < ctx->source_files_count; ++i) vkd3d_free((void *)ctx->source_files[i]); vkd3d_free(ctx->source_files);
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Pass a hlsl_block pointer to dump_instr_list().
by Alexandre Julliard
08 Aug '23
08 Aug '23
Module: vkd3d Branch: master Commit: b22e2113a69443dece6d659b478dda8773f42dde URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/b22e2113a69443dece6d659b478dd…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Dec 9 13:45:57 2022 -0600 vkd3d-shader/hlsl: Pass a hlsl_block pointer to dump_instr_list(). --- libs/vkd3d-shader/hlsl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index e5f66043..6b1ded64 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -2244,11 +2244,11 @@ const char *hlsl_jump_type_to_string(enum hlsl_ir_jump_type type) static void dump_instr(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_node *instr); -static void dump_instr_list(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct list *list) +static void dump_block(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_block *block) { struct hlsl_ir_node *instr; - LIST_FOR_EACH_ENTRY(instr, list, struct hlsl_ir_node, entry) + LIST_FOR_EACH_ENTRY(instr, &block->instrs, struct hlsl_ir_node, entry) { dump_instr(ctx, buffer, instr); vkd3d_string_buffer_printf(buffer, "\n"); @@ -2490,9 +2490,9 @@ static void dump_ir_if(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, vkd3d_string_buffer_printf(buffer, "if ("); dump_src(buffer, &if_node->condition); vkd3d_string_buffer_printf(buffer, ") {\n"); - dump_instr_list(ctx, buffer, &if_node->then_block.instrs); + dump_block(ctx, buffer, &if_node->then_block); vkd3d_string_buffer_printf(buffer, " %10s } else {\n", ""); - dump_instr_list(ctx, buffer, &if_node->else_block.instrs); + dump_block(ctx, buffer, &if_node->else_block); vkd3d_string_buffer_printf(buffer, " %10s }", ""); } @@ -2525,7 +2525,7 @@ static void dump_ir_jump(struct vkd3d_string_buffer *buffer, const struct hlsl_i static void dump_ir_loop(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_loop *loop) { vkd3d_string_buffer_printf(buffer, "for (;;) {\n"); - dump_instr_list(ctx, buffer, &loop->body.instrs); + dump_block(ctx, buffer, &loop->body); vkd3d_string_buffer_printf(buffer, " %10s }", ""); } @@ -2713,7 +2713,7 @@ void hlsl_dump_function(struct hlsl_ctx *ctx, const struct hlsl_ir_function_decl vkd3d_string_buffer_printf(&buffer, "\n"); } if (func->has_body) - dump_instr_list(ctx, &buffer, &func->body.instrs); + dump_block(ctx, &buffer, &func->body); vkd3d_string_buffer_trace(&buffer); vkd3d_string_buffer_cleanup(&buffer);
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Store the "instrs" field of struct hlsl_attribute as a hlsl_block.
by Alexandre Julliard
08 Aug '23
08 Aug '23
Module: vkd3d Branch: master Commit: 0652bb1950e90eeae576cc2c937db552c08b3374 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/0652bb1950e90eeae576cc2c937db…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Nov 14 20:50:17 2022 -0600 vkd3d-shader/hlsl: Store the "instrs" field of struct hlsl_attribute as a hlsl_block. --- libs/vkd3d-shader/hlsl.c | 2 +- libs/vkd3d-shader/hlsl.h | 2 +- libs/vkd3d-shader/hlsl.y | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 4ed7712b..e5f66043 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -2922,7 +2922,7 @@ void hlsl_free_attribute(struct hlsl_attribute *attr) for (i = 0; i < attr->args_count; ++i) hlsl_src_remove(&attr->args[i]); - hlsl_free_instr_list(&attr->instrs); + hlsl_block_cleanup(&attr->instrs); vkd3d_free((void *)attr->name); vkd3d_free(attr); } diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 597d3fda..e78602e8 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -337,7 +337,7 @@ struct hlsl_src struct hlsl_attribute { const char *name; - struct list instrs; + struct hlsl_block instrs; struct vkd3d_shader_location loc; unsigned int args_count; struct hlsl_src args[]; diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 858d1aee..0d994673 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -5001,7 +5001,7 @@ attribute: YYABORT; } $$->name = $2; - list_init(&$$->instrs); + hlsl_block_init(&$$->instrs); $$->loc = @$; $$->args_count = 0; } @@ -5016,8 +5016,8 @@ attribute: YYABORT; } $$->name = $2; - list_init(&$$->instrs); - list_move_tail(&$$->instrs, &$4.instrs->instrs); + hlsl_block_init(&$$->instrs); + hlsl_block_add_block(&$$->instrs, $4.instrs); vkd3d_free($4.instrs); $$->loc = @$; $$->args_count = $4.args_count;
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Pass an hlsl_block pointer to add_load_component().
by Alexandre Julliard
08 Aug '23
08 Aug '23
Module: vkd3d Branch: master Commit: 372ddd1f2933007c60d0b20cb41f5dfd02566fb5 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/372ddd1f2933007c60d0b20cb41f5…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Nov 14 20:44:44 2022 -0600 vkd3d-shader/hlsl: Pass an hlsl_block pointer to add_load_component(). --- libs/vkd3d-shader/hlsl.h | 2 +- libs/vkd3d-shader/hlsl.y | 40 ++++++++++++++++------------------------ libs/vkd3d-shader/hlsl_codegen.c | 2 +- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index b1427c1d..597d3fda 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -1150,7 +1150,7 @@ struct hlsl_ir_load *hlsl_new_load_parent(struct hlsl_ctx *ctx, const struct hls const struct vkd3d_shader_location *loc); struct hlsl_ir_node *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, const struct hlsl_deref *deref, unsigned int comp, const struct vkd3d_shader_location *loc); -struct hlsl_ir_node *hlsl_add_load_component(struct hlsl_ctx *ctx, struct list *instrs, +struct hlsl_ir_node *hlsl_add_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, struct hlsl_ir_node *var_instr, unsigned int comp, const struct vkd3d_shader_location *loc); struct hlsl_ir_node *hlsl_new_simple_store(struct hlsl_ctx *ctx, struct hlsl_ir_var *lhs, struct hlsl_ir_node *rhs); diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 0695f786..858d1aee 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -138,14 +138,6 @@ static struct hlsl_ir_node *node_from_block(struct hlsl_block *block) return LIST_ENTRY(list_tail(&block->instrs), struct hlsl_ir_node, entry); } -static struct list *block_to_list(struct hlsl_block *block) -{ - /* This is a temporary hack to ease the transition from lists to blocks. - * It takes advantage of the fact that an allocated hlsl_block pointer is - * byte-compatible with an allocated list pointer. */ - return &block->instrs; -} - static struct hlsl_block *make_empty_block(struct hlsl_ctx *ctx) { struct hlsl_block *block; @@ -351,7 +343,7 @@ static struct hlsl_ir_node *add_cast(struct hlsl_ctx *ctx, struct hlsl_block *bl dst_comp_type = hlsl_type_get_component_type(ctx, dst_type, dst_idx); - if (!(component_load = hlsl_add_load_component(ctx, block_to_list(block), node, src_idx, loc))) + if (!(component_load = hlsl_add_load_component(ctx, block, node, src_idx, loc))) return NULL; if (!(cast = hlsl_new_cast(ctx, component_load, dst_comp_type, loc))) @@ -677,11 +669,11 @@ static bool add_return(struct hlsl_ctx *ctx, struct hlsl_block *block, return true; } -struct hlsl_ir_node *hlsl_add_load_component(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_node *var_instr, - unsigned int comp, const struct vkd3d_shader_location *loc) +struct hlsl_ir_node *hlsl_add_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, + struct hlsl_ir_node *var_instr, unsigned int comp, const struct vkd3d_shader_location *loc) { struct hlsl_ir_node *load, *store; - struct hlsl_block block; + struct hlsl_block load_block; struct hlsl_ir_var *var; struct hlsl_deref src; @@ -690,12 +682,12 @@ struct hlsl_ir_node *hlsl_add_load_component(struct hlsl_ctx *ctx, struct list * if (!(store = hlsl_new_simple_store(ctx, var, var_instr))) return NULL; - list_add_tail(instrs, &store->entry); + hlsl_block_add_instr(block, store); hlsl_init_simple_deref_from_var(&src, var); - if (!(load = hlsl_new_load_component(ctx, &block, &src, comp, loc))) + if (!(load = hlsl_new_load_component(ctx, &load_block, &src, comp, loc))) return NULL; - list_move_tail(instrs, &block.instrs); + hlsl_block_add_block(block, &load_block); return load; } @@ -1340,7 +1332,7 @@ static struct hlsl_ir_node *add_expr(struct hlsl_ctx *ctx, struct hlsl_block *bl { if (operands[j]) { - if (!(load = hlsl_add_load_component(ctx, block_to_list(block), operands[j], i, loc))) + if (!(load = hlsl_add_load_component(ctx, block, operands[j], i, loc))) return NULL; cell_operands[j] = load; @@ -1822,7 +1814,7 @@ static struct hlsl_ir_node *add_assignment(struct hlsl_ctx *ctx, struct hlsl_blo return NULL; hlsl_block_add_instr(block, cell); - if (!(load = hlsl_add_load_component(ctx, block_to_list(block), rhs, k++, &rhs->loc))) + if (!(load = hlsl_add_load_component(ctx, block, rhs, k++, &rhs->loc))) return NULL; if (!hlsl_init_deref_from_index_chain(ctx, &deref, cell)) @@ -1911,7 +1903,7 @@ static void initialize_var_components(struct hlsl_ctx *ctx, struct hlsl_block *i struct hlsl_type *dst_comp_type; struct hlsl_block block; - if (!(load = hlsl_add_load_component(ctx, block_to_list(instrs), src, k, &src->loc))) + if (!(load = hlsl_add_load_component(ctx, instrs, src, k, &src->loc))) return; dst_comp_type = hlsl_type_get_component_type(ctx, dst->data_type, *store_index); @@ -2469,7 +2461,7 @@ static bool intrinsic_all(struct hlsl_ctx *ctx, count = hlsl_type_component_count(arg->data_type); for (i = 0; i < count; ++i) { - if (!(load = hlsl_add_load_component(ctx, block_to_list(params->instrs), arg, i, loc))) + if (!(load = hlsl_add_load_component(ctx, params->instrs, arg, i, loc))) return false; if (!(mul = add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_MUL, load, mul, loc))) @@ -2513,7 +2505,7 @@ static bool intrinsic_any(struct hlsl_ctx *ctx, count = hlsl_type_component_count(arg->data_type); for (i = 0; i < count; ++i) { - if (!(load = hlsl_add_load_component(ctx, block_to_list(params->instrs), arg, i, loc))) + if (!(load = hlsl_add_load_component(ctx, params->instrs, arg, i, loc))) return false; if (!(or = add_binary_bitwise_expr(ctx, params->instrs, HLSL_OP2_BIT_OR, or, load, loc))) @@ -3170,11 +3162,11 @@ static bool intrinsic_mul(struct hlsl_ctx *ctx, { struct hlsl_ir_node *value1, *value2, *mul; - if (!(value1 = hlsl_add_load_component(ctx, block_to_list(params->instrs), + if (!(value1 = hlsl_add_load_component(ctx, params->instrs, cast1, j * cast1->data_type->dimx + k, loc))) return false; - if (!(value2 = hlsl_add_load_component(ctx, block_to_list(params->instrs), + if (!(value2 = hlsl_add_load_component(ctx, params->instrs, cast2, k * cast2->data_type->dimx + i, loc))) return false; @@ -3531,7 +3523,7 @@ static bool intrinsic_transpose(struct hlsl_ctx *ctx, { struct hlsl_block block; - if (!(load = hlsl_add_load_component(ctx, block_to_list(params->instrs), arg, j * arg->data_type->dimx + i, loc))) + if (!(load = hlsl_add_load_component(ctx, params->instrs, arg, j * arg->data_type->dimx + i, loc))) return false; if (!hlsl_new_store_component(ctx, &block, &var_deref, i * var->data_type->dimx + j, load)) @@ -4193,7 +4185,7 @@ static bool add_assignment_from_component(struct hlsl_ctx *ctx, struct hlsl_bloc if (!dest) return true; - if (!(load = hlsl_add_load_component(ctx, block_to_list(instrs), src, component, loc))) + if (!(load = hlsl_add_load_component(ctx, instrs, src, component, loc))) return false; if (!add_assignment(ctx, instrs, dest, ASSIGN_OP_ASSIGN, load)) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 4f5a5b02..ec21b984 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -2738,7 +2738,7 @@ static bool lower_discard_neg(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, count = hlsl_type_component_count(cmp_type); for (i = 0; i < count; ++i) { - if (!(load = hlsl_add_load_component(ctx, &block.instrs, cmp, i, &instr->loc))) + if (!(load = hlsl_add_load_component(ctx, &block, cmp, i, &instr->loc))) return false; if (!(or = hlsl_new_binary_expr(ctx, HLSL_OP2_LOGIC_OR, or, load)))
1
0
0
0
Jacek Caban : win32u: Pack input param for CB_GETCOMBOBOXINFO message.
by Alexandre Julliard
04 Aug '23
04 Aug '23
Module: wine Branch: master Commit: f1749b0808c66a0341b77409cc9338ab5624a04c URL:
https://gitlab.winehq.org/wine/wine/-/commit/f1749b0808c66a0341b77409cc9338…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Aug 4 13:11:50 2023 +0200 win32u: Pack input param for CB_GETCOMBOBOXINFO message. Based on patch by Tim Clem. --- dlls/win32u/message.c | 10 ++++++++-- dlls/win32u/tests/win32u.c | 18 +++++++++++------- dlls/wow64win/user.c | 16 ++++++++++++++++ 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 71c1017a3f0..d15f9af3f9f 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -1843,8 +1843,14 @@ void pack_user_message( void *buffer, size_t size, UINT message, return; } case CB_GETCOMBOBOXINFO: - memset( buffer, 0, size ); - return; + if (sizeof(void *) == 4) + { + COMBOBOXINFO *cbi = buffer; + memcpy( cbi, lparam_ptr, sizeof(*cbi) ); + cbi->cbSize = sizeof(*cbi); + return; + } + break; } if (size) memcpy( buffer, lparam_ptr, size ); diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index beb2050c695..25358c5d0d8 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -1362,7 +1362,7 @@ struct lparam_hook_test const void *lparam; const void *change_lparam; const void *check_lparam; - const void *default_lparam; + const void *in_lparam; size_t lparam_size; size_t lparam_init_size; size_t check_size; @@ -1425,10 +1425,12 @@ static void check_params( const struct lparam_hook_test *test, UINT message, default: if (test->check_size) { const void *expected; - if (is_ret && test->change_lparam) + if (is_ret && test->check_lparam) + expected = test->check_lparam; + else if (is_ret && test->change_lparam) expected = test->change_lparam; - else if (test->default_lparam) - expected = test->default_lparam; + else if (test->in_lparam) + expected = test->in_lparam; else expected = test->lparam; ok( !memcmp( (const void *)lparam, expected, test->check_size ), "unexpected lparam content\n" ); @@ -1686,7 +1688,9 @@ static void test_wndproc_hook(void) static const MDINEXTMENU nm_in = { .hmenuIn = (HMENU)0xdeadbeef }; static const MDINEXTMENU nm_out = { .hmenuIn = (HMENU)1 }; static const MDICREATESTRUCTW mcs_in = { .x = 1, .y = 2 }; - static const COMBOBOXINFO cbi_in = {}; + static const COMBOBOXINFO cbi_in = { .cbSize = 1, .hwndList = HWND_MESSAGE }; + static const COMBOBOXINFO cbi_check = + { .cbSize = sizeof(void *) == 4 ? sizeof(cbi_in) : 1, .hwndList = HWND_MESSAGE }; static const COMBOBOXINFO cbi_out = { .hwndList = (HWND)2 }; static const COMBOBOXINFO cbi_ret = { .hwndList = (HWND)2, .cbSize = sizeof(void *) == 4 ? sizeof(cbi_in) : 0 }; @@ -1920,8 +1924,8 @@ static void test_wndproc_hook(void) }, { "CB_GETCOMBOBOXINFO", CB_GETCOMBOBOXINFO, - .lparam_size = sizeof(cbi_in), .change_lparam = &cbi_out, .default_lparam = &cbi_in, - .check_lparam = &cbi_ret, + .lparam_size = sizeof(cbi_in), .change_lparam = &cbi_out, .lparam = &cbi_in, + .check_lparam = &cbi_ret, .check_size = sizeof(cbi_in), .in_lparam = &cbi_check, }, /* messages that don't change lparam */ { "WM_USER", WM_USER }, diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index b15f0a263cf..07143b78195 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -802,6 +802,22 @@ static size_t packed_message_64to32( UINT message, WPARAM wparam, memcpy( params32, &mcs32, sizeof(mcs32) ); return sizeof(mcs32) + size; } + + case CB_GETCOMBOBOXINFO: + { + COMBOBOXINFO32 ci32; + const COMBOBOXINFO *ci64 = params64; + + ci32.cbSize = sizeof(ci32); + ci32.rcItem = ci64->rcItem; + ci32.rcButton = ci64->rcButton; + ci32.stateButton = ci64->stateButton; + ci32.hwndCombo = HandleToLong( ci64->hwndCombo ); + ci32.hwndItem = HandleToLong( ci64->hwndItem ); + ci32.hwndList = HandleToLong( ci64->hwndList ); + memcpy( params32, &ci32, sizeof(ci32) ); + return sizeof(ci32); + } } memmove( params32, params64, size );
1
0
0
0
Gabriel Ivăncescu : mshtml: Use unlink and destructor in the vtbl for HTMLNamespaceCollection.
by Alexandre Julliard
04 Aug '23
04 Aug '23
Module: wine Branch: master Commit: 59865c9e51abd0f4bd5dbe393e8b43355692ad02 URL:
https://gitlab.winehq.org/wine/wine/-/commit/59865c9e51abd0f4bd5dbe393e8b43…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Aug 3 15:56:13 2023 +0300 mshtml: Use unlink and destructor in the vtbl for HTMLNamespaceCollection. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/omnavigator.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index d0af5e0de02..f6cf0755a74 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -2441,10 +2441,8 @@ static ULONG WINAPI HTMLNamespaceCollection_Release(IHTMLNamespaceCollection *if TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) { + if(!ref) release_dispex(&This->dispex); - free(This); - } return ref; } @@ -2520,13 +2518,28 @@ static const IHTMLNamespaceCollectionVtbl HTMLNamespaceCollectionVtbl = { HTMLNamespaceCollection_add }; +static inline HTMLNamespaceCollection *HTMLNamespaceCollection_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, HTMLNamespaceCollection, dispex); +} + +static void HTMLNamespaceCollection_destructor(DispatchEx *dispex) +{ + HTMLNamespaceCollection *This = HTMLNamespaceCollection_from_DispatchEx(dispex); + free(This); +} + +static const dispex_static_data_vtbl_t HTMLNamespaceCollection_dispex_vtbl = { + HTMLNamespaceCollection_destructor, +}; + static const tid_t HTMLNamespaceCollection_iface_tids[] = { IHTMLNamespaceCollection_tid, 0 }; static dispex_static_data_t HTMLNamespaceCollection_dispex = { L"MSNamespaceInfoCollection", - NULL, + &HTMLNamespaceCollection_dispex_vtbl, DispHTMLNamespaceCollection_tid, HTMLNamespaceCollection_iface_tids };
1
0
0
0
Gabriel Ivăncescu : mshtml: Use unlink and destructor in the vtbl for HTMLPerformance.
by Alexandre Julliard
04 Aug '23
04 Aug '23
Module: wine Branch: master Commit: 21abb999d9a39363d0d01a5f9ae65896802f3978 URL:
https://gitlab.winehq.org/wine/wine/-/commit/21abb999d9a39363d0d01a5f9ae658…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Aug 3 15:56:13 2023 +0300 mshtml: Use unlink and destructor in the vtbl for HTMLPerformance. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/omnavigator.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index fe82a1942dc..d0af5e0de02 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -2217,13 +2217,8 @@ static ULONG WINAPI HTMLPerformance_Release(IHTMLPerformance *iface) TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) { - IHTMLPerformanceTiming_Release(&This->timing->IHTMLPerformanceTiming_iface); - if(This->navigation) - IHTMLPerformanceNavigation_Release(This->navigation); + if(!ref) release_dispex(&This->dispex); - free(This); - } return ref; } @@ -2332,13 +2327,40 @@ static const IHTMLPerformanceVtbl HTMLPerformanceVtbl = { HTMLPerformance_toJSON }; +static inline HTMLPerformance *HTMLPerformance_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, HTMLPerformance, dispex); +} + +static void HTMLPerformance_unlink(DispatchEx *dispex) +{ + HTMLPerformance *This = HTMLPerformance_from_DispatchEx(dispex); + unlink_ref(&This->navigation); + if(This->timing) { + HTMLPerformanceTiming *timing = This->timing; + This->timing = NULL; + IHTMLPerformanceTiming_Release(&timing->IHTMLPerformanceTiming_iface); + } +} + +static void HTMLPerformance_destructor(DispatchEx *dispex) +{ + HTMLPerformance *This = HTMLPerformance_from_DispatchEx(dispex); + free(This); +} + +static const dispex_static_data_vtbl_t HTMLPerformance_dispex_vtbl = { + HTMLPerformance_destructor, + HTMLPerformance_unlink +}; + static const tid_t HTMLPerformance_iface_tids[] = { IHTMLPerformance_tid, 0 }; static dispex_static_data_t HTMLPerformance_dispex = { L"Performance", - NULL, + &HTMLPerformance_dispex_vtbl, IHTMLPerformance_tid, HTMLPerformance_iface_tids };
1
0
0
0
Gabriel Ivăncescu : mshtml: Use unlink and destructor in the vtbl for HTMLPerformanceNavigation.
by Alexandre Julliard
04 Aug '23
04 Aug '23
Module: wine Branch: master Commit: 8dac93e6d1edf57958611b00c9e9603c7432bdf4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8dac93e6d1edf57958611b00c9e960…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Aug 3 15:56:13 2023 +0300 mshtml: Use unlink and destructor in the vtbl for HTMLPerformanceNavigation. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/omnavigator.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index b4fd0f0540b..fe82a1942dc 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -2035,11 +2035,8 @@ static ULONG WINAPI HTMLPerformanceNavigation_Release(IHTMLPerformanceNavigation TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) { - IHTMLPerformanceTiming_Release(&This->timing->IHTMLPerformanceTiming_iface); + if(!ref) release_dispex(&This->dispex); - free(This); - } return ref; } @@ -2129,13 +2126,39 @@ static const IHTMLPerformanceNavigationVtbl HTMLPerformanceNavigationVtbl = { HTMLPerformanceNavigation_toJSON }; +static inline HTMLPerformanceNavigation *HTMLPerformanceNavigation_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, HTMLPerformanceNavigation, dispex); +} + +static void HTMLPerformanceNavigation_unlink(DispatchEx *dispex) +{ + HTMLPerformanceNavigation *This = HTMLPerformanceNavigation_from_DispatchEx(dispex); + if(This->timing) { + HTMLPerformanceTiming *timing = This->timing; + This->timing = NULL; + IHTMLPerformanceTiming_Release(&timing->IHTMLPerformanceTiming_iface); + } +} + +static void HTMLPerformanceNavigation_destructor(DispatchEx *dispex) +{ + HTMLPerformanceNavigation *This = HTMLPerformanceNavigation_from_DispatchEx(dispex); + free(This); +} + +static const dispex_static_data_vtbl_t HTMLPerformanceNavigation_dispex_vtbl = { + HTMLPerformanceNavigation_destructor, + HTMLPerformanceNavigation_unlink +}; + static const tid_t HTMLPerformanceNavigation_iface_tids[] = { IHTMLPerformanceNavigation_tid, 0 }; static dispex_static_data_t HTMLPerformanceNavigation_dispex = { L"PerformanceNavigation", - NULL, + &HTMLPerformanceNavigation_dispex_vtbl, IHTMLPerformanceNavigation_tid, HTMLPerformanceNavigation_iface_tids };
1
0
0
0
Gabriel Ivăncescu : mshtml: Use unlink and destructor in the vtbl for Navigator.
by Alexandre Julliard
04 Aug '23
04 Aug '23
Module: wine Branch: master Commit: 6306e86bfd37db4466045bf1f68c35301e29ee10 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6306e86bfd37db4466045bf1f68c35…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Aug 3 15:56:13 2023 +0300 mshtml: Use unlink and destructor in the vtbl for Navigator. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/omnavigator.c | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 6f2b2ab8524..b4fd0f0540b 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -1179,14 +1179,8 @@ static ULONG WINAPI OmNavigator_Release(IOmNavigator *iface) TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) { - if(This->plugins) - This->plugins->navigator = NULL; - if(This->mime_types) - This->mime_types->navigator = NULL; + if(!ref) release_dispex(&This->dispex); - free(This); - } return ref; } @@ -1533,13 +1527,42 @@ static const IOmNavigatorVtbl OmNavigatorVtbl = { OmNavigator_get_userProfile }; +static inline OmNavigator *OmNavigator_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, OmNavigator, dispex); +} + +static void OmNavigator_unlink(DispatchEx *dispex) +{ + OmNavigator *This = OmNavigator_from_DispatchEx(dispex); + if(This->plugins) { + This->plugins->navigator = NULL; + This->plugins = NULL; + } + if(This->mime_types) { + This->mime_types->navigator = NULL; + This->mime_types = NULL; + } +} + +static void OmNavigator_destructor(DispatchEx *dispex) +{ + OmNavigator *This = OmNavigator_from_DispatchEx(dispex); + free(This); +} + +static const dispex_static_data_vtbl_t OmNavigator_dispex_vtbl = { + OmNavigator_destructor, + OmNavigator_unlink +}; + static const tid_t OmNavigator_iface_tids[] = { IOmNavigator_tid, 0 }; static dispex_static_data_t OmNavigator_dispex = { L"Navigator", - NULL, + &OmNavigator_dispex_vtbl, DispHTMLNavigator_tid, OmNavigator_iface_tids };
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
67
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
Results per page:
10
25
50
100
200