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
April 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
590 discussions
Start a n
N
ew thread
Zebediah Figura : vkd3d-shader/hlsl: Use hlsl_is_numeric_type() in type_has_object_components().
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: vkd3d Branch: master Commit: 106cbc02deff1eedaafa5326393f7dcedb2b043b URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/106cbc02deff1eedaafa5326393f7…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Jan 26 16:12:27 2024 -0600 vkd3d-shader/hlsl: Use hlsl_is_numeric_type() in type_has_object_components(). --- libs/vkd3d-shader/hlsl.y | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index f6da4755..e69359f9 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2093,22 +2093,21 @@ static void initialize_var_components(struct hlsl_ctx *ctx, struct hlsl_block *i static bool type_has_object_components(const struct hlsl_type *type) { - if (type->class == HLSL_CLASS_OBJECT) - return true; if (type->class == HLSL_CLASS_ARRAY) return type_has_object_components(type->e.array.type); if (type->class == HLSL_CLASS_STRUCT) { - unsigned int i; - - for (i = 0; i < type->e.record.field_count; ++i) + for (unsigned int i = 0; i < type->e.record.field_count; ++i) { if (type_has_object_components(type->e.record.fields[i].type)) return true; } + + return false; } - return false; + + return !hlsl_is_numeric_type(type); } static bool type_has_numeric_components(struct hlsl_type *type)
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Simplify type_has_object_components().
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: vkd3d Branch: master Commit: 54f2dfe403f4be5f873e439fcd453dd4b9b5de74 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/54f2dfe403f4be5f873e439fcd453…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Jan 26 16:09:16 2024 -0600 vkd3d-shader/hlsl: Simplify type_has_object_components(). The extra argument is not very easy to intuit. Since all we're trying to do here is check whether the type is a struct with object components in it, write that out explicitly. --- libs/vkd3d-shader/hlsl.y | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 17bb565d..f6da4755 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2091,12 +2091,12 @@ static void initialize_var_components(struct hlsl_ctx *ctx, struct hlsl_block *i } } -static bool type_has_object_components(struct hlsl_type *type, bool must_be_in_struct) +static bool type_has_object_components(const struct hlsl_type *type) { if (type->class == HLSL_CLASS_OBJECT) - return !must_be_in_struct; + return true; if (type->class == HLSL_CLASS_ARRAY) - return type_has_object_components(type->e.array.type, must_be_in_struct); + return type_has_object_components(type->e.array.type); if (type->class == HLSL_CLASS_STRUCT) { @@ -2104,7 +2104,7 @@ static bool type_has_object_components(struct hlsl_type *type, bool must_be_in_s for (i = 0; i < type->e.record.field_count; ++i) { - if (type_has_object_components(type->e.record.fields[i].type, false)) + if (type_has_object_components(type->e.record.fields[i].type)) return true; } } @@ -2146,6 +2146,18 @@ static void check_invalid_in_out_modifiers(struct hlsl_ctx *ctx, unsigned int mo } } +static void check_invalid_object_fields(struct hlsl_ctx *ctx, const struct hlsl_ir_var *var) +{ + const struct hlsl_type *type = var->data_type; + + while (type->class == HLSL_CLASS_ARRAY) + type = type->e.array.type; + + if (type->class == HLSL_CLASS_STRUCT && type_has_object_components(type)) + hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, + "Target profile doesn't support objects as struct members in uniform variables."); +} + static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v) { struct hlsl_type *basic_type = v->basic_type; @@ -2271,12 +2283,8 @@ static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v) if (!(modifiers & HLSL_STORAGE_STATIC)) var->storage_modifiers |= HLSL_STORAGE_UNIFORM; - if (ctx->profile->major_version < 5 && (var->storage_modifiers & HLSL_STORAGE_UNIFORM) && - type_has_object_components(var->data_type, true)) - { - hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, - "Target profile doesn't support objects as struct members in uniform variables."); - } + if (ctx->profile->major_version < 5 && (var->storage_modifiers & HLSL_STORAGE_UNIFORM)) + check_invalid_object_fields(ctx, var); if ((func = hlsl_get_first_func_decl(ctx, var->name))) { @@ -2312,7 +2320,7 @@ static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v) } if ((var->storage_modifiers & HLSL_STORAGE_STATIC) && type_has_numeric_components(var->data_type) - && type_has_object_components(var->data_type, false)) + && type_has_object_components(var->data_type)) { hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Static variables cannot have both numeric and resource components."); @@ -2400,7 +2408,7 @@ static struct hlsl_block *initialize_vars(struct hlsl_ctx *ctx, struct list *var /* Initialize statics to zero by default. */ - if (type_has_object_components(var->data_type, false)) + if (type_has_object_components(var->data_type)) { free_parse_variable_def(v); continue;
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Move a hlsl_fixme() to a more relevant place.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: vkd3d Branch: master Commit: 1e7d82798c9a6c0885c09e27986db981beea7fa7 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/1e7d82798c9a6c0885c09e27986db…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Mar 28 15:13:11 2024 -0500 vkd3d-shader/hlsl: Move a hlsl_fixme() to a more relevant place. --- libs/vkd3d-shader/hlsl_codegen.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 5c09ce04..6f2de937 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -427,7 +427,10 @@ static void prepend_input_copy_recurse(struct hlsl_ctx *ctx, struct hlsl_block * { field = &type->e.record.fields[i]; if (hlsl_type_is_resource(field->type)) + { + hlsl_fixme(ctx, &field->loc, "Prepend uniform copies for resource components within structs."); continue; + } validate_field_semantic(ctx, field); semantic = &field->semantic; elem_semantic_index = semantic->index; @@ -5237,25 +5240,6 @@ static void parse_numthreads_attribute(struct hlsl_ctx *ctx, const struct hlsl_a } } -static bool type_has_object_components(struct hlsl_type *type) -{ - if (type->class == HLSL_CLASS_OBJECT) - return true; - if (type->class == HLSL_CLASS_ARRAY) - return type_has_object_components(type->e.array.type); - if (type->class == HLSL_CLASS_STRUCT) - { - unsigned int i; - - for (i = 0; i < type->e.record.field_count; ++i) - { - if (type_has_object_components(type->e.record.fields[i].type)) - return true; - } - } - return false; -} - static void remove_unreachable_code(struct hlsl_ctx *ctx, struct hlsl_block *body) { struct hlsl_ir_node *instr, *next; @@ -5363,9 +5347,6 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry } else { - if (type_has_object_components(var->data_type)) - hlsl_fixme(ctx, &var->loc, "Prepend uniform copies for object components within structs."); - if (hlsl_get_multiarray_element_type(var->data_type)->class != HLSL_CLASS_STRUCT && !var->semantic.name) {
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Remove a redundant type check.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: vkd3d Branch: master Commit: 675d7b8cb64d5ad5afb51d3a1f034ae3aba5c3e2 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/675d7b8cb64d5ad5afb51d3a1f034…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Jan 26 15:59:49 2024 -0600 vkd3d-shader/hlsl: Remove a redundant type check. We already perform an implicit cast per component in initialize_var_components(). --- libs/vkd3d-shader/hlsl.y | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 52c21765..17bb565d 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -4358,22 +4358,7 @@ static struct hlsl_block *add_constructor(struct hlsl_ctx *ctx, struct hlsl_type return NULL; for (i = 0; i < params->args_count; ++i) - { - struct hlsl_ir_node *arg = params->args[i]; - - if (arg->data_type->class == HLSL_CLASS_OBJECT) - { - struct vkd3d_string_buffer *string; - - if ((string = hlsl_type_to_string(ctx, arg->data_type))) - hlsl_error(ctx, &arg->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, - "Invalid type %s for constructor argument.", string->buffer); - hlsl_release_string_buffer(ctx, string); - continue; - } - - initialize_var_components(ctx, params->instrs, var, &idx, arg); - } + initialize_var_components(ctx, params->instrs, var, &idx, params->args[i]); if (!(load = hlsl_new_var_load(ctx, var, loc))) return NULL;
1
0
0
0
Conor McCarthy : vkd3d-shader/dxil: Implement DX intrinsics Dot2, Dot3 and Dot4.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: vkd3d Branch: master Commit: d72d5c35d1ef1d7b262fb530d3d3a528509f3c63 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/d72d5c35d1ef1d7b262fb530d3d3a…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Jun 15 00:07:31 2023 +1000 vkd3d-shader/dxil: Implement DX intrinsics Dot2, Dot3 and Dot4. --- libs/vkd3d-shader/dxil.c | 48 ++++++++++++++++++++++++++++++++++++++++ tests/hlsl/dot.shader_test | 8 +++---- tests/hlsl/normalize.shader_test | 6 ++--- tests/hlsl/reflect.shader_test | 10 ++++----- 4 files changed, 60 insertions(+), 12 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index c2c12aec..b5a61d99 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -382,6 +382,9 @@ enum dx_intrinsic_opcode DX_UMAD = 49, DX_IBFE = 51, DX_UBFE = 52, + DX_DOT2 = 54, + DX_DOT3 = 55, + DX_DOT4 = 56, DX_CREATE_HANDLE = 57, DX_CBUFFER_LOAD_LEGACY = 59, DX_SAMPLE = 60, @@ -4480,6 +4483,48 @@ static void sm6_parser_emit_dx_discard(struct sm6_parser *sm6, enum dx_intrinsic src_param_init_from_value(src_param, operands[0]); } +static void sm6_parser_emit_dx_dot(struct sm6_parser *sm6, enum dx_intrinsic_opcode op, + const struct sm6_value **operands, struct function_emission_state *state) +{ + struct vkd3d_shader_src_param *src_params; + struct vkd3d_shader_instruction *ins; + struct vkd3d_shader_register regs[2]; + enum vkd3d_shader_opcode handler_idx; + unsigned int component_count; + + switch (op) + { + case DX_DOT2: + handler_idx = VKD3DSIH_DP2; + component_count = 2; + break; + case DX_DOT3: + handler_idx = VKD3DSIH_DP3; + component_count = 3; + break; + case DX_DOT4: + handler_idx = VKD3DSIH_DP4; + component_count = 4; + break; + default: + vkd3d_unreachable(); + } + + if (!sm6_parser_emit_composite_construct(sm6, &operands[0], component_count, state, ®s[0])) + return; + if (!sm6_parser_emit_composite_construct(sm6, &operands[component_count], component_count, state, ®s[1])) + return; + + ins = state->ins; + vsir_instruction_init(ins, &sm6->p.location, handler_idx); + if (!(src_params = instruction_src_params_alloc(ins, 2, sm6))) + return; + src_param_init_vector_from_reg(&src_params[0], ®s[0]); + src_param_init_vector_from_reg(&src_params[1], ®s[1]); + + instruction_dst_param_init_ssa_scalar(ins, sm6); +} + static void sm6_parser_emit_dx_fabs(struct sm6_parser *sm6, enum dx_intrinsic_opcode op, const struct sm6_value **operands, struct function_emission_state *state) { @@ -5356,6 +5401,9 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] = [DX_DERIV_FINEX ] = {"e", "R", sm6_parser_emit_dx_unary}, [DX_DERIV_FINEY ] = {"e", "R", sm6_parser_emit_dx_unary}, [DX_DISCARD ] = {"v", "1", sm6_parser_emit_dx_discard}, + [DX_DOT2 ] = {"g", "RRRR", sm6_parser_emit_dx_dot}, + [DX_DOT3 ] = {"g", "RRRRRR", sm6_parser_emit_dx_dot}, + [DX_DOT4 ] = {"g", "RRRRRRRR", sm6_parser_emit_dx_dot}, [DX_EXP ] = {"g", "R", sm6_parser_emit_dx_unary}, [DX_FABS ] = {"g", "R", sm6_parser_emit_dx_fabs}, [DX_FIRST_BIT_HI ] = {"i", "m", sm6_parser_emit_dx_unary}, diff --git a/tests/hlsl/dot.shader_test b/tests/hlsl/dot.shader_test index 87bb82d1..7698c08e 100644 --- a/tests/hlsl/dot.shader_test +++ b/tests/hlsl/dot.shader_test @@ -10,7 +10,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 10.0 11.0 12.0 13.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (166.0, 166.0, 166.0, 166.0) [pixel shader] @@ -25,7 +25,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 -todo(sm<4 | sm>=6 | glsl) draw quad +todo(sm<4 | glsl) draw quad probe all rgba (53.0, 53.0, 53.0, 53.0) [pixel shader] @@ -40,7 +40,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (92.0, 92.0, 92.0, 92.0) [pixel shader] @@ -55,7 +55,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 10.0 11.0 12.0 13.0 uniform 4 float4 2.0 0.0 0.0 0.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (92.0, 92.0, 92.0, 92.0) [pixel shader] diff --git a/tests/hlsl/normalize.shader_test b/tests/hlsl/normalize.shader_test index d30e7efa..3f89e280 100644 --- a/tests/hlsl/normalize.shader_test +++ b/tests/hlsl/normalize.shader_test @@ -8,7 +8,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (0.272165537, 0.408248305, 0.544331074, 0.680413842) 2 [pixel shader] @@ -21,7 +21,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 0.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (0.371390700, 0.557086051, 0.742781401, 0.0) 1 [pixel shader] @@ -34,7 +34,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 0.0 0.0 -todo(sm<4 | sm>=6 | glsl) draw quad +todo(sm<4 | glsl) draw quad probe all rgba (0.554700196, 0.832050323, 0.0, 0.0) 1 [pixel shader] diff --git a/tests/hlsl/reflect.shader_test b/tests/hlsl/reflect.shader_test index 601f26bb..1b3123c8 100644 --- a/tests/hlsl/reflect.shader_test +++ b/tests/hlsl/reflect.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (-0.1, -0.5, 0.5, -0.7) 4 [pixel shader] @@ -27,7 +27,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 0.0 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (-0.52, -0.18, 1.01, -1.2) 4 [pixel shader] @@ -44,7 +44,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.0 0.0 0.0 -todo(sm>=6 | glsl) draw quad +todo(glsl) draw quad probe all rgba (-0.148, -0.748, -0.448, -0.348) 4 [pixel shader] @@ -79,7 +79,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 -todo(sm<4 | sm>=6 | glsl) draw quad +todo(sm<4 | glsl) draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4 [pixel shader] @@ -97,5 +97,5 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.0 uniform 4 float4 0.6 0.4 0.0 0.0 -todo(sm<4 | sm>=6 | glsl) draw quad +todo(sm<4 | glsl) draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4
1
0
0
0
Hans Leidekker : wmic: Handle multiple properties separated by whitespace.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: wine Branch: master Commit: bc52693f9a87142ed08228d8f23db9f18058ee9e URL:
https://gitlab.winehq.org/wine/wine/-/commit/bc52693f9a87142ed08228d8f23db9…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Apr 2 14:57:59 2024 +0200 wmic: Handle multiple properties separated by whitespace. --- programs/wmic/main.c | 103 +++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/programs/wmic/main.c b/programs/wmic/main.c index 56c57ea45e9..f996d8018f4 100644 --- a/programs/wmic/main.c +++ b/programs/wmic/main.c @@ -107,62 +107,67 @@ static int output_newline( void ) return output_string( L"\n" ); } -static WCHAR * strip_spaces(WCHAR *start) +static WCHAR *strip_spaces( WCHAR *start ) { - WCHAR *str = start, *end; - - while (*str == ' ') - str++; - - end = start + lstrlenW(start) - 1; - while (end >= start && *end == ' ') - { - *end = '\0'; - end--; - } - + WCHAR *str = start, *end = start + wcslen( start ) - 1; + while (*str == ' ') str++; + while (end >= start && *end == ' ') *end-- = 0; return str; } -static HRESULT process_property_list( IWbemClassObject *obj, const WCHAR *proplist, WCHAR **ret ) +static HRESULT append_property( IWbemClassObject *obj, const WCHAR *prop, WCHAR *proplist ) { - WCHAR *p, *ctx, *ptr, *stripped; - HRESULT hr = S_OK; + HRESULT hr; - if (!(p = wcsdup( proplist ))) return E_OUTOFMEMORY; + if (FAILED(hr = IWbemClassObject_Get( obj, prop, 0, NULL, NULL, NULL ))) return hr; + if (*proplist) wcscat( proplist, L"," ); + wcscat( proplist, prop ); + return S_OK; +} - if (!(stripped = malloc( (wcslen( proplist ) + 1) * sizeof(**ret) ))) - { - free( p ); - return E_OUTOFMEMORY; - } +static HRESULT process_property_list( IWbemClassObject *obj, int argc, WCHAR *argv[], WCHAR **ret ) +{ + WCHAR *str = NULL, *ctx, *ptr, *stripped; + UINT i, len = 0; + HRESULT hr; + + for (i = 0; i < argc; i++) len += wcslen( argv[i] ); + if (!(stripped = malloc( (len + 1) * sizeof(*stripped) ))) return E_OUTOFMEMORY; *stripped = 0; - /* Validate that every requested property is supported. */ - ptr = wcstok_s( p, L",", &ctx ); - while (ptr) + for (i = 0; i < argc; i++) { - ptr = strip_spaces( ptr ); + if (!(str = wcsdup( argv[i] ))) + { + free( stripped ); + return E_OUTOFMEMORY; + } - if (FAILED(IWbemClassObject_Get( obj, ptr, 0, NULL, NULL, NULL ))) + /* Validate that every requested property is supported. */ + ptr = wcstok_s( str, L",", &ctx ); + if (!ptr) + { + ptr = strip_spaces( str ); + if (FAILED(hr = append_property( obj, ptr, stripped ))) goto error; + } + else { - hr = E_FAIL; - break; + while (ptr) + { + ptr = strip_spaces( ptr ); + if (FAILED(hr = append_property( obj, ptr, stripped ))) goto error; + ptr = wcstok_s( NULL, L",", &ctx ); + } } - if (*stripped) wcscat( stripped, L"," ); - wcscat( stripped, ptr ); - ptr = wcstok_s( NULL, L",", &ctx ); + free( str ); } - free( p ); - if (SUCCEEDED(hr)) - *ret = stripped; - else - { - free( stripped ); - *ret = NULL; - } + *ret = stripped; + return S_OK; +error: + free( str ); + free( stripped ); return hr; } @@ -218,7 +223,7 @@ done: WINE_FIXME( "Could not convert variant, vt %u.\n", vt ); } -static int query_prop( const WCHAR *class, const WCHAR *propnames ) +static int query_prop( const WCHAR *class, int argc, WCHAR *argv[] ) { HRESULT hr; IWbemLocator *locator = NULL; @@ -231,8 +236,11 @@ static int query_prop( const WCHAR *class, const WCHAR *propnames ) IWbemClassObject *obj; ULONG count, width = 0; VARIANT v; + int i; - WINE_TRACE("%s, %s\n", debugstr_w(class), debugstr_w(propnames)); + WINE_TRACE( "%s", debugstr_w(class) ); + for (i = 0; i < argc; i++) WINE_TRACE( " %s", debugstr_w(argv[i]) ); + WINE_TRACE( "\n" ); CoInitialize( NULL ); CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, @@ -256,7 +264,7 @@ static int query_prop( const WCHAR *class, const WCHAR *propnames ) } /* Check that this class supports all requested properties. */ - hr = process_property_list( obj, propnames, &proplist ); + hr = process_property_list( obj, argc, argv, &proplist ); IWbemClassObject_Release( obj ); if (FAILED(hr)) { @@ -337,7 +345,7 @@ done: static int process_args( int argc, WCHAR *argv[] ) { - const WCHAR *class, *value; + const WCHAR *class; int i; for (i = 0; i < argc && argv[i][0] == '/'; i++) @@ -383,8 +391,7 @@ static int process_args( int argc, WCHAR *argv[] ) { if (++i >= argc) goto not_supported; - value = argv[i]; - return query_prop( class, value ); + return query_prop( class, argc - i, argv + i ); } not_supported: @@ -403,14 +410,14 @@ int __cdecl wmain(int argc, WCHAR *argv[]) { fputws( L"wmic:root\\cli>", stdout ); - while (fgetws(cmd, sizeof(cmd), stdin) != NULL) + while (fgetws( cmd, sizeof(cmd), stdin ) != NULL) { const WCHAR *stripped; cmd[wcslen(cmd) - 1] = 0; /* remove trailing '\n' */ stripped = strip_spaces( cmd ); - WINE_TRACE("command: %s\n", debugstr_w(stripped)); + WINE_TRACE( "command: %s\n", debugstr_w(stripped) ); if (!wcsicmp( stripped, L"exit" ) || !wcsicmp( stripped, L"quit" )) return 0;
1
0
0
0
Hans Leidekker : wmic: Handle failure from CommandLineToArgvW().
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: wine Branch: master Commit: ca629dec9b5eb5b7fceebc144275aab0b4a9ba27 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ca629dec9b5eb5b7fceebc144275aa…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Apr 2 14:51:57 2024 +0200 wmic: Handle failure from CommandLineToArgvW(). --- programs/wmic/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/wmic/main.c b/programs/wmic/main.c index c1a20384eb3..56c57ea45e9 100644 --- a/programs/wmic/main.c +++ b/programs/wmic/main.c @@ -421,7 +421,7 @@ int __cdecl wmain(int argc, WCHAR *argv[]) int new_argc; WCHAR **new_argv; - new_argv = CommandLineToArgvW( stripped, &new_argc ); + if (!(new_argv = CommandLineToArgvW( stripped, &new_argc ))) return 1; ret = process_args( new_argc, new_argv ); LocalFree( new_argv );
1
0
0
0
Hans Leidekker : wmic: Strip spaces once.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: wine Branch: master Commit: 2b3bc20103306c6b6e427caf37c4e59f87fdf9ea URL:
https://gitlab.winehq.org/wine/wine/-/commit/2b3bc20103306c6b6e427caf37c4e5…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Apr 2 14:44:41 2024 +0200 wmic: Strip spaces once. --- programs/wmic/main.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/programs/wmic/main.c b/programs/wmic/main.c index 363b9af581f..c1a20384eb3 100644 --- a/programs/wmic/main.c +++ b/programs/wmic/main.c @@ -405,22 +405,25 @@ int __cdecl wmain(int argc, WCHAR *argv[]) while (fgetws(cmd, sizeof(cmd), stdin) != NULL) { - cmd[wcslen(cmd)-1] = 0; /* remove trailing '\n' */ + const WCHAR *stripped; - WINE_TRACE("command: %s\n", debugstr_w(cmd)); - if (!wcsicmp( strip_spaces(cmd), L"exit" ) || !wcsicmp( strip_spaces(cmd), L"quit" )) + cmd[wcslen(cmd) - 1] = 0; /* remove trailing '\n' */ + stripped = strip_spaces( cmd ); + + WINE_TRACE("command: %s\n", debugstr_w(stripped)); + if (!wcsicmp( stripped, L"exit" ) || !wcsicmp( stripped, L"quit" )) return 0; - if (!cmd[0]) + if (!stripped[0]) output_error( STRING_USAGE ); else { - int _argc; - WCHAR **_argv; + int new_argc; + WCHAR **new_argv; - _argv = CommandLineToArgvW( strip_spaces(cmd), &_argc ); - ret = process_args( _argc, _argv ); - LocalFree(_argv); + new_argv = CommandLineToArgvW( stripped, &new_argc ); + ret = process_args( new_argc, new_argv ); + LocalFree( new_argv ); output_newline(); } @@ -429,5 +432,5 @@ int __cdecl wmain(int argc, WCHAR *argv[]) return ret; } - return process_args( argc - 1, &argv[1] ); + return process_args( argc - 1, argv + 1 ); }
1
0
0
0
Hans Leidekker : wmic: Make an error message more general.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: wine Branch: master Commit: c00da2e52ddcf0a0b097da0725182f17bbad4ef1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c00da2e52ddcf0a0b097da0725182f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Apr 2 14:35:47 2024 +0200 wmic: Make an error message more general. --- po/ar.po | 4 +++- po/ast.po | 4 +++- po/bg.po | 5 +++-- po/ca.po | 4 +++- po/cs.po | 4 +++- po/da.po | 2 +- po/de.po | 4 +++- po/el.po | 2 +- po/en.po | 4 ++-- po/en_US.po | 4 ++-- po/eo.po | 6 ++++-- po/es.po | 4 +++- po/fa.po | 5 +++-- po/fi.po | 4 +++- po/fr.po | 4 +++- po/he.po | 4 +++- po/hi.po | 2 +- po/hr.po | 4 +++- po/hu.po | 2 +- po/it.po | 2 +- po/ja.po | 4 +++- po/ka.po | 4 +++- po/ko.po | 4 +++- po/lt.po | 4 +++- po/ml.po | 2 +- po/nb_NO.po | 4 +++- po/nl.po | 10 ++++++---- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 4 +++- po/pt_BR.po | 4 +++- po/pt_PT.po | 4 +++- po/rm.po | 2 +- po/ro.po | 4 +++- po/ru.po | 4 +++- po/si.po | 4 +++- po/sk.po | 5 +++-- po/sl.po | 2 +- po/sr_RS(a)cyrillic.po | 2 +- po/sr_RS(a)latin.po | 2 +- po/sv.po | 4 +++- po/ta.po | 2 +- po/te.po | 2 +- po/th.po | 5 +++-- po/tr.po | 4 +++- po/uk.po | 4 +++- po/wa.po | 5 +++-- po/wine.pot | 2 +- po/zh_CN.po | 4 +++- po/zh_TW.po | 4 +++- programs/wmic/main.c | 6 +++--- programs/wmic/wmic.h | 2 +- programs/wmic/wmic.rc | 2 +- 53 files changed, 127 insertions(+), 66 deletions(-)
1
0
0
0
Hans Leidekker : wbemprox: Zero-initialize table data.
by Alexandre Julliard
02 Apr '24
02 Apr '24
Module: wine Branch: master Commit: ca89965a2e87ca842a65f76e99b1d1db6c345e8a URL:
https://gitlab.winehq.org/wine/wine/-/commit/ca89965a2e87ca842a65f76e99b1d1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Mar 28 10:20:37 2024 +0100 wbemprox: Zero-initialize table data. --- dlls/wbemprox/builtin.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 79affe5fdde..fa4c6ee6351 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -504,7 +504,7 @@ static const struct column col_videocontroller[] = { L"Monochrome", CIM_BOOLEAN }, { L"Name", CIM_STRING|COL_FLAG_DYNAMIC }, { L"NumberOfColorPlanes", CIM_UINT16 }, - { L"NumberofVideoPages", CIM_UINT32 }, + { L"NumberOfVideoPages", CIM_UINT32 }, { L"PNPDeviceID", CIM_STRING|COL_FLAG_DYNAMIC }, { L"PowerManagementCapabilities", CIM_UINT16|CIM_FLAG_ARRAY }, { L"PowerManagementSupported", CIM_BOOLEAN }, @@ -1193,7 +1193,7 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size ) { if (!table->num_rows_allocated) { - if (!(table->data = malloc( row_count * row_size ))) return FALSE; + if (!(table->data = calloc( row_count, row_size ))) return FALSE; table->num_rows_allocated = row_count; return TRUE; } @@ -1202,6 +1202,7 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size ) BYTE *data; UINT count = max( row_count, table->num_rows_allocated * 2 ); if (!(data = realloc( table->data, count * row_size ))) return FALSE; + memset( data + table->num_rows_allocated * row_size, 0, (count - table->num_rows_allocated) * row_size ); table->data = data; table->num_rows_allocated = count; } @@ -1537,11 +1538,9 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond GetSystemFirmwareTable( RSMB, 0, buf, len ); rec = (struct record_bios *)table->data; - rec->currentlanguage = NULL; rec->description = L"Default System BIOS"; rec->ecmajorversion = get_bios_ec_firmware_major_release( buf, len ); rec->ecminorversion = get_bios_ec_firmware_minor_release( buf, len ); - rec->identificationcode = NULL; rec->manufacturer = get_bios_manufacturer( buf, len ); rec->name = L"Default System BIOS"; rec->releasedate = get_bios_releasedate( buf, len ); @@ -1757,8 +1756,6 @@ static enum fill_status fill_compsys( struct table *table, const struct expr *co rec = (struct record_computersystem *)table->data; rec->description = L"AT/AT COMPATIBLE"; rec->domain = L"WORKGROUP"; - rec->domainrole = 0; /* standalone workstation */ - rec->hypervisorpresent = 0; rec->manufacturer = get_compsysproduct_vendor( buf, len ); rec->model = get_compsysproduct_name( buf, len ); rec->name = get_computername(); @@ -1827,7 +1824,6 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e rec = (struct record_computersystemproduct *)table->data; rec->identifyingnumber = get_compsysproduct_identifyingnumber( buf, len ); rec->name = get_compsysproduct_name( buf, len ); - rec->skunumber = NULL; rec->uuid = get_compsysproduct_uuid( buf, len ); rec->vendor = get_compsysproduct_vendor( buf, len ); rec->version = get_compsysproduct_version( buf, len ); @@ -2580,11 +2576,9 @@ static enum fill_status fill_diskpartition( struct table *table, const struct ex swprintf( device_id, ARRAY_SIZE( device_id ), L"Disk #%u, Partition #0", index ); rec->device_id = wcsdup( device_id ); rec->diskindex = index++; - rec->index = 0; rec->pnpdevice_id = wcsdup( device_id ); get_freespace( root, &size ); rec->size = size; - rec->startingoffset = 0; rec->type = get_filesystem( root ); if (!match_row( table, row, cond, &status )) { @@ -2960,7 +2954,6 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e rec->interface_index = aa->IfIndex; rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength ); rec->manufacturer = L"The Wine Project"; - rec->netconnection_id = NULL; /* FIXME Windows seems to fill this when it's connected and in use */ rec->name = wcsdup( aa->FriendlyName ); rec->netenabled = connection_status ? -1 : 0; rec->netconnection_status = connection_status; @@ -3316,7 +3309,6 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co rec->local = -1; rec->location = wcsdup( info[i].pLocation ); rec->name = wcsdup( info[i].pPrinterName ); - rec->network = 0; rec->portname = wcsdup( info[i].pPortName ); if (!match_row( table, i, cond, &status )) { @@ -3373,7 +3365,6 @@ static enum fill_status fill_process( struct table *table, const struct expr *co rec->process_id = entry.th32ProcessID; rec->pprocess_id = entry.th32ParentProcessID; rec->thread_count = entry.cntThreads; - rec->workingsetsize = 0; /* methods */ rec->create = process_create; rec->get_owner = process_get_owner; @@ -3568,7 +3559,6 @@ static enum fill_status fill_processor( struct table *table, const struct expr * rec->processor_id = wcsdup( processor_id ); rec->processortype = 3; /* central processor */ rec->revision = get_processor_revision(); - rec->unique_id = NULL; rec->version = wcsdup( version ); if (!match_row( table, i, cond, &status )) { @@ -4265,16 +4255,13 @@ static enum fill_status fill_videocontroller( struct table *table, const struct } rec = (struct record_videocontroller *)table->data; - memset( rec, 0, sizeof(*rec) ); rec->adapter_compatibility = L"(Standard display types)"; rec->adapter_dactype = L"Integrated RAMDAC"; rec->adapter_ram = vidmem; rec->availability = 3; /* Running or Full Power */ rec->caption = wcsdup( name ); - rec->config_errorcode = 0; /* no error */ rec->current_bitsperpixel = get_bitsperpixel( &hres, &vres ); rec->current_horizontalres = hres; - rec->current_refreshrate = 0; /* default refresh rate */ rec->current_scanmode = 2; /* Unknown */ rec->current_verticalres = vres; rec->description = wcsdup( name );
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
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
Results per page:
10
25
50
100
200