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
January 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
711 discussions
Start a n
N
ew thread
Conor McCarthy : vkd3d-shader/dxil: Handle the DXIL BR instruction unconditional variant.
by Alexandre Julliard
18 Jan '24
18 Jan '24
Module: vkd3d Branch: master Commit: c9493884efee5b57fbd8ca0bc1e8f4c2d5c0dc61 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/c9493884efee5b57fbd8ca0bc1e8f…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Fri Nov 24 11:09:49 2023 +1000 vkd3d-shader/dxil: Handle the DXIL BR instruction unconditional variant. --- libs/vkd3d-shader/dxil.c | 165 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 131 insertions(+), 34 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 41e5b4be..4bc16b21 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -474,12 +474,14 @@ struct sm6_symbol enum sm6_block_terminator_type { + TERMINATOR_UNCOND_BR, TERMINATOR_RET, }; struct sm6_block_terminator { enum sm6_block_terminator_type type; + const struct sm6_block *true_block; }; struct sm6_block @@ -488,6 +490,9 @@ struct sm6_block size_t instruction_capacity; size_t instruction_count; + /* A nonzero id. */ + unsigned int id; + struct sm6_block_terminator terminator; }; @@ -495,7 +500,8 @@ struct sm6_function { const struct sm6_value *declaration; - struct sm6_block *blocks[1]; + struct sm6_block **blocks; + size_t block_capacity; size_t block_count; size_t value_count; @@ -3306,6 +3312,45 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco } } +static const struct sm6_block *sm6_function_get_block(const struct sm6_function *function, uint64_t index, + struct sm6_parser *sm6) +{ + if (index >= function->block_count) + { + WARN("Invalid code block index %#"PRIx64".\n", index); + vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_OPERAND_COUNT, + "Invalid code block index %#"PRIx64" for a control flow instruction.", index); + return NULL; + } + return function->blocks[index]; +} + +static void sm6_parser_emit_br(struct sm6_parser *sm6, const struct dxil_record *record, + struct sm6_function *function, struct sm6_block *code_block, struct vkd3d_shader_instruction *ins) +{ + if (record->operand_count != 1 && record->operand_count < 3) + { + WARN("Invalid operand count %u.\n", record->operand_count); + vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_OPERAND_COUNT, + "Invalid operand count %u for a branch instruction.", record->operand_count); + return; + } + + if (record->operand_count == 1) + { + code_block->terminator.type = TERMINATOR_UNCOND_BR; + code_block->terminator.true_block = sm6_function_get_block(function, record->operands[0], sm6); + } + else + { + FIXME("Conditional branch is not implemented.\n"); + vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_OPERAND_COUNT, + "Conditional branch is not implemented."); + } + + ins->handler_idx = VKD3DSIH_NOP; +} + static enum vkd3d_shader_opcode map_dx_unary_op(enum dx_intrinsic_opcode op) { switch (op) @@ -4655,6 +4700,31 @@ static void metadata_attachment_record_apply(const struct dxil_record *record, e } } +static bool sm6_function_blocks_reserve(struct sm6_function *function, unsigned int reserve) +{ + if (!vkd3d_array_reserve((void **)&function->blocks, &function->block_capacity, + reserve, sizeof(*function->blocks))) + { + ERR("Failed to allocate code block array.\n"); + return false; + } + return true; +} + +static struct sm6_block *sm6_function_create_block(struct sm6_function *function) +{ + struct sm6_block *block; + + if (!(block = sm6_block_create())) + return NULL; + + function->blocks[function->block_count++] = block; + /* Set the id to the array index + 1. */ + block->id = function->block_count; + + return block; +} + static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const struct dxil_block *block, struct sm6_function *function) { @@ -4694,16 +4764,18 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const WARN("Function contains no blocks.\n"); return VKD3D_ERROR_INVALID_SHADER; } - if (block_count > 1) - { - FIXME("Branched shaders are not supported yet.\n"); - return VKD3D_ERROR_INVALID_SHADER; - } - if (!(function->blocks[0] = sm6_block_create())) - { - ERR("Failed to allocate code block.\n"); + if (!sm6_function_blocks_reserve(function, block_count)) return VKD3D_ERROR_OUT_OF_MEMORY; + + /* Pre-allocate all blocks to simplify instruction parsing. */ + for (i = 0; i < block_count; ++i) + { + if (!sm6_function_create_block(function)) + { + ERR("Failed to allocate code block.\n"); + return VKD3D_ERROR_OUT_OF_MEMORY; + } } function->block_count = block_count; code_block = function->blocks[0]; @@ -4722,10 +4794,9 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const return VKD3D_ERROR_INVALID_SHADER; } - /* block->record_count - 1 is the instruction count, but some instructions - * can emit >1 IR instruction, so extra may be used. */ + /* Some instructions can emit >1 IR instruction, so extra may be used. */ if (!vkd3d_array_reserve((void **)&code_block->instructions, &code_block->instruction_capacity, - max(code_block->instruction_count + 1, block->record_count), sizeof(*code_block->instructions))) + code_block->instruction_count + 1, sizeof(*code_block->instructions))) { ERR("Failed to allocate instructions.\n"); return VKD3D_ERROR_OUT_OF_MEMORY; @@ -4748,6 +4819,10 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const case FUNC_CODE_INST_BINOP: sm6_parser_emit_binop(sm6, record, ins, dst); break; + case FUNC_CODE_INST_BR: + sm6_parser_emit_br(sm6, record, function, code_block, ins); + is_terminator = true; + break; case FUNC_CODE_INST_CALL: sm6_parser_emit_call(sm6, record, code_block, ins, dst); break; @@ -4813,8 +4888,20 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const static void sm6_block_emit_terminator(const struct sm6_block *block, struct sm6_parser *sm6) { + struct vkd3d_shader_src_param *src_params; + struct vkd3d_shader_instruction *ins; + switch (block->terminator.type) { + case TERMINATOR_UNCOND_BR: + if (!block->terminator.true_block) + return; + ins = sm6_parser_add_instruction(sm6, VKD3DSIH_BRANCH); + if (!(src_params = instruction_src_params_alloc(ins, 1, sm6))) + return; + vsir_src_param_init_label(&src_params[0], block->terminator.true_block->id); + break; + case TERMINATOR_RET: sm6_parser_add_instruction(sm6, VKD3DSIH_RET); break; @@ -4824,21 +4911,6 @@ static void sm6_block_emit_terminator(const struct sm6_block *block, struct sm6_ } } -static bool sm6_block_emit_instructions(struct sm6_block *block, struct sm6_parser *sm6) -{ - struct vkd3d_shader_instruction *ins = sm6_parser_require_space(sm6, block->instruction_count + 1); - - if (!ins) - return false; - - memcpy(ins, block->instructions, block->instruction_count * sizeof(*block->instructions)); - sm6->p.instructions.count += block->instruction_count; - - sm6_block_emit_terminator(block, sm6); - - return true; -} - static enum vkd3d_result sm6_parser_module_init(struct sm6_parser *sm6, const struct dxil_block *block, unsigned int level) { @@ -4908,6 +4980,35 @@ static void sm6_parser_emit_label(struct sm6_parser *sm6, unsigned int label_id) vsir_src_param_init_label(src_param, label_id); } +static enum vkd3d_result sm6_function_emit_blocks(const struct sm6_function *function, struct sm6_parser *sm6) +{ + unsigned int i; + + sm6->p.shader_desc.block_count = function->block_count; + + for (i = 0; i < function->block_count; ++i) + { + const struct sm6_block *block = function->blocks[i]; + + /* Space for the label and terminator. */ + if (!sm6_parser_require_space(sm6, block->instruction_count + 2)) + { + vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_OUT_OF_MEMORY, + "Out of memory emitting shader instructions."); + return VKD3D_ERROR_OUT_OF_MEMORY; + } + sm6_parser_emit_label(sm6, block->id); + + memcpy(&sm6->p.instructions.elements[sm6->p.instructions.count], block->instructions, + block->instruction_count * sizeof(*block->instructions)); + sm6->p.instructions.count += block->instruction_count; + + sm6_block_emit_terminator(block, sm6); + } + + return VKD3D_OK; +} + static bool sm6_parser_allocate_named_metadata(struct sm6_parser *sm6) { struct dxil_block *block; @@ -5971,6 +6072,7 @@ static void sm6_functions_cleanup(struct sm6_function *functions, size_t count) { for (j = 0; j < functions[i].block_count; ++j) sm6_block_destroy(functions[i].blocks[j]); + vkd3d_free(functions[i].blocks); } vkd3d_free(functions); } @@ -6267,13 +6369,8 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t } assert(sm6->function_count == 1); - sm6_parser_emit_label(sm6, 1); - if (!sm6_block_emit_instructions(fn->blocks[0], sm6)) - { - vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_OUT_OF_MEMORY, - "Out of memory emitting shader instructions."); - return VKD3D_ERROR_OUT_OF_MEMORY; - } + if ((ret = sm6_function_emit_blocks(fn, sm6)) < 0) + return ret; dxil_block_destroy(&sm6->root_block);
1
0
0
0
Conor McCarthy : vkd3d-shader/dxil: Introduce a code block terminator struct.
by Alexandre Julliard
18 Jan '24
18 Jan '24
Module: vkd3d Branch: master Commit: 9e964fa0c74e79a95e92e901a61b3f31f06e395b URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/9e964fa0c74e79a95e92e901a61b3…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Nov 23 14:10:57 2023 +1000 vkd3d-shader/dxil: Introduce a code block terminator struct. --- libs/vkd3d-shader/dxil.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 78c1a052..41e5b4be 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -472,11 +472,23 @@ struct sm6_symbol const char *name; }; +enum sm6_block_terminator_type +{ + TERMINATOR_RET, +}; + +struct sm6_block_terminator +{ + enum sm6_block_terminator_type type; +}; + struct sm6_block { struct vkd3d_shader_instruction *instructions; size_t instruction_capacity; size_t instruction_count; + + struct sm6_block_terminator terminator; }; struct sm6_function @@ -4297,6 +4309,8 @@ static void sm6_parser_emit_ret(struct sm6_parser *sm6, const struct dxil_record if (record->operand_count) FIXME("Non-void return is not implemented.\n"); + code_block->terminator.type = TERMINATOR_RET; + ins->handler_idx = VKD3DSIH_NOP; } @@ -4797,6 +4811,19 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const return VKD3D_OK; } +static void sm6_block_emit_terminator(const struct sm6_block *block, struct sm6_parser *sm6) +{ + switch (block->terminator.type) + { + case TERMINATOR_RET: + sm6_parser_add_instruction(sm6, VKD3DSIH_RET); + break; + + default: + vkd3d_unreachable(); + } +} + static bool sm6_block_emit_instructions(struct sm6_block *block, struct sm6_parser *sm6) { struct vkd3d_shader_instruction *ins = sm6_parser_require_space(sm6, block->instruction_count + 1); @@ -4807,7 +4834,7 @@ static bool sm6_block_emit_instructions(struct sm6_block *block, struct sm6_pars memcpy(ins, block->instructions, block->instruction_count * sizeof(*block->instructions)); sm6->p.instructions.count += block->instruction_count; - sm6_parser_add_instruction(sm6, VKD3DSIH_RET); + sm6_block_emit_terminator(block, sm6); return true; }
1
0
0
0
Giovanni Mascellani : ci: Prepare the macOS build environment in a dedicated CI job.
by Alexandre Julliard
18 Jan '24
18 Jan '24
Module: vkd3d Branch: master Commit: 866e5de95b457b22b8e5b2ea9db3aeb5d599acd7 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/866e5de95b457b22b8e5b2ea9db3a…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Jan 4 14:04:36 2024 +0100 ci: Prepare the macOS build environment in a dedicated CI job. --- gitlab/build.yml | 15 ++++++--------- gitlab/image.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/gitlab/build.yml b/gitlab/build.yml index b87ab969..af68e9ef 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -130,7 +130,9 @@ build-mac: exit_codes: - 2 interruptible: true - needs: [] + needs: + - job: image-mac + optional: true dependencies: [] tags: - mac @@ -147,14 +149,9 @@ build-mac: - system_profiler SPSoftwareDataType SPHardwareDataType > artifacts/systeminfo.txt - vulkaninfo > artifacts/vulkaninfo.txt - export PATH="/usr/local/opt/bison/bin:/usr/local/opt/flex/bin:$PATH" - - git clone --depth 1 --branch wine-3.21
https://gitlab.winehq.org/wine/wine.git
- - cd wine - - mkdir build - - cd build - - ../configure --enable-win64 --without-x --without-freetype - - make tools/widl/widl - - cd ../.. - - export PATH="$PWD/wine/build/tools/widl:$PATH" + - curl -o image.zip
https://gitlab.winehq.org/api/v4/projects/wine%2Fvkd3d/jobs/artifacts/maste…
+ - unzip image.zip + - export PATH="$PWD/image/bin:$PATH" - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-mac - if [ -f build_failed ] ; then exit 1 ; fi - if [ -f tests_failed ] ; then exit 2 ; fi diff --git a/gitlab/image.yml b/gitlab/image.yml index cda71df6..c93ea0d6 100644 --- a/gitlab/image.yml +++ b/gitlab/image.yml @@ -18,3 +18,32 @@ image-linux: - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"},\"$CI_DEPENDENCY_PROXY_SERVER\":{\"auth\":\"$(printf "%s:%s" "$CI_DEPENDENCY_PROXY_USER" "$CI_DEPENDENCY_PROXY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json - sed -i "1iFROM $IMAGE_SOURCE" "$DOCKER_FILE" - /kaniko/executor --context "$CI_PROJECT_DIR" --dockerfile "$DOCKER_FILE" --destination "$IMAGE_LOCAL" + +image-mac: + stage: image + rules: + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_PROJECT_PATH == "wine/vkd3d" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + changes: + - .gitlab-ci.yml + - gitlab/image.yml + interruptible: true + tags: + - mac + script: + - mkdir image + - cd image + - mkdir bin + - export PATH="/usr/local/opt/bison/bin:/usr/local/opt/flex/bin:$PATH" + - git clone --depth 1 --branch wine-3.21
https://gitlab.winehq.org/wine/wine.git
+ - cd wine + - mkdir build + - cd build + - ../configure --enable-win64 --without-x --without-freetype + - make tools/widl/widl + - cd ../.. + - cp wine/build/tools/widl/widl bin + - rm -fr wine + - cd .. + artifacts: + paths: + - image
1
0
0
0
Giovanni Mascellani : ci: Rename CI target build-image to image-linux.
by Alexandre Julliard
18 Jan '24
18 Jan '24
Module: vkd3d Branch: master Commit: 847930d5e0b7595f7056990a565240cdcc486856 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/847930d5e0b7595f7056990a56524…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Jan 4 11:31:47 2024 +0100 ci: Rename CI target build-image to image-linux. --- gitlab/README | 2 +- gitlab/build.yml | 6 +++--- gitlab/image.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gitlab/README b/gitlab/README index 310912be..3b520323 100644 --- a/gitlab/README +++ b/gitlab/README @@ -5,7 +5,7 @@ vkd3d testing scripts These scripts are used by the GitLab CI feature to automatically run the vkd3d tests on each merge request. -The CI target build-image, in the file image.yml, builds a Docker +The CI target image-linux, in the file image.yml, builds a Docker image based on Debian bookworm with all the packages required for testing, and uploads it to the GitLab container registry. The Docker script is in the file image.docker. diff --git a/gitlab/build.yml b/gitlab/build.yml index 9a19316b..b87ab969 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -5,7 +5,7 @@ image: $CI_REGISTRY/wine/vkd3d:debian-bookworm interruptible: true needs: - - job: build-image + - job: image-linux optional: true dependencies: [] script: @@ -68,7 +68,7 @@ build-crosstest: image: $CI_REGISTRY/wine/vkd3d:debian-bookworm interruptible: true needs: - - job: build-image + - job: image-linux optional: true dependencies: [] script: @@ -94,7 +94,7 @@ build-crosstest: image: $CI_REGISTRY/wine/vkd3d:debian-bookworm interruptible: true needs: - - job: build-image + - job: image-linux optional: true dependencies: [] script: diff --git a/gitlab/image.yml b/gitlab/image.yml index 45a87770..cda71df6 100644 --- a/gitlab/image.yml +++ b/gitlab/image.yml @@ -1,4 +1,4 @@ -build-image: +image-linux: stage: image rules: - if: $CI_PIPELINE_SOURCE == 'push' && $CI_PROJECT_PATH == "wine/vkd3d" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
1
0
0
0
Brendan Shanks : combase: Make RoGetActivationFactory hookable.
by Alexandre Julliard
17 Jan '24
17 Jan '24
Module: wine Branch: master Commit: 1932c3a2516b181291ce430505dcfa8a82eb70bd URL:
https://gitlab.winehq.org/wine/wine/-/commit/1932c3a2516b181291ce430505dcfa…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Jan 16 13:29:00 2024 -0800 combase: Make RoGetActivationFactory hookable. --- dlls/combase/roapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index e1017f1f3fd..02d9e0b536e 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -143,7 +143,7 @@ void WINAPI RoUninitialize(void) /*********************************************************************** * RoGetActivationFactory (combase.@) */ -HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory) +HRESULT WINAPI DECLSPEC_HOTPATCH RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory) { PFNGETACTIVATIONFACTORY pDllGetActivationFactory; IActivationFactory *factory;
1
0
0
0
Rémi Bernon : win32u: Remove now unnecessary ImeToAsciiEx driver entry.
by Alexandre Julliard
17 Jan '24
17 Jan '24
Module: wine Branch: master Commit: 746de318975a8d5287c424433129c180483b1dc9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/746de318975a8d5287c424433129c1…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jan 17 08:20:57 2024 +0100 win32u: Remove now unnecessary ImeToAsciiEx driver entry. --- dlls/win32u/driver.c | 12 ------------ dlls/win32u/imm.c | 2 -- include/wine/gdi_driver.h | 1 - 3 files changed, 15 deletions(-) diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index 2937f0d7248..fcfb7d55d54 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -729,11 +729,6 @@ static UINT nulldrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const BY return 0; } -static UINT nulldrv_ImeToAsciiEx( UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc ) -{ - return STATUS_NOT_IMPLEMENTED; -} - static void nulldrv_NotifyIMEStatus( HWND hwnd, UINT status ) { } @@ -1138,11 +1133,6 @@ static UINT loaderdrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const return load_driver()->pImeProcessKey( himc, wparam, lparam, state ); } -static UINT loaderdrv_ImeToAsciiEx( UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc ) -{ - return load_driver()->pImeToAsciiEx( vkey, vsc, state, compstr, himc ); -} - static void loaderdrv_NotifyIMEStatus( HWND hwnd, UINT status ) { return load_driver()->pNotifyIMEStatus( hwnd, status ); @@ -1292,7 +1282,6 @@ static const struct user_driver_funcs lazy_load_driver = loaderdrv_KbdLayerDescriptor, loaderdrv_ReleaseKbdTables, loaderdrv_ImeProcessKey, - loaderdrv_ImeToAsciiEx, loaderdrv_NotifyIMEStatus, /* cursor/icon functions */ nulldrv_DestroyCursorIcon, @@ -1384,7 +1373,6 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(KbdLayerDescriptor); SET_USER_FUNC(ReleaseKbdTables); SET_USER_FUNC(ImeProcessKey); - SET_USER_FUNC(ImeToAsciiEx); SET_USER_FUNC(NotifyIMEStatus); SET_USER_FUNC(DestroyCursorIcon); SET_USER_FUNC(SetCursor); diff --git a/dlls/win32u/imm.c b/dlls/win32u/imm.c index 82124f72567..05b8b60090f 100644 --- a/dlls/win32u/imm.c +++ b/dlls/win32u/imm.c @@ -590,8 +590,6 @@ LRESULT ime_driver_call( HWND hwnd, enum wine_ime_call call, WPARAM wparam, LPAR return res; } case WINE_IME_TO_ASCII_EX: - res = user_driver->pImeToAsciiEx( wparam, lparam, params->state, params->compstr, params->himc ); - if ((NTSTATUS)res != STATUS_NOT_IMPLEMENTED) return res; return ime_to_tascii_ex( wparam, lparam, params->state, params->compstr, params->himc ); case WINE_IME_POST_UPDATE: post_ime_update( hwnd, wparam, (WCHAR *)lparam, (WCHAR *)params ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 26562bfef2b..bd827c31cb1 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -299,7 +299,6 @@ struct user_driver_funcs void (*pReleaseKbdTables)(const KBDTABLES *); /* IME functions */ UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*); - UINT (*pImeToAsciiEx)(UINT,UINT,const BYTE*,COMPOSITIONSTRING*,HIMC); void (*pNotifyIMEStatus)(HWND,UINT); /* cursor/icon functions */ void (*pDestroyCursorIcon)(HCURSOR);
1
0
0
0
Rémi Bernon : winemac: Use the default ImeToAsciiEx implementation.
by Alexandre Julliard
17 Jan '24
17 Jan '24
Module: wine Branch: master Commit: f341b8003c8cce40db0ebcf2d3a49019709e236c URL:
https://gitlab.winehq.org/wine/wine/-/commit/f341b8003c8cce40db0ebcf2d3a490…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Nov 29 12:04:54 2023 +0100 winemac: Use the default ImeToAsciiEx implementation. And support updates pushed from the host IME directly. --- dlls/winemac.drv/event.c | 129 ++++------------------------------------------ dlls/winemac.drv/gdi.c | 1 - dlls/winemac.drv/macdrv.h | 1 - 3 files changed, 10 insertions(+), 121 deletions(-) diff --git a/dlls/winemac.drv/event.c b/dlls/winemac.drv/event.c index 2fc699e3f77..9fbbe9d3d66 100644 --- a/dlls/winemac.drv/event.c +++ b/dlls/winemac.drv/event.c @@ -34,25 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(event); WINE_DECLARE_DEBUG_CHANNEL(imm); -/* IME works synchronously, key input is passed from ImeProcessKey, to the - * host IME. We wait for it to be handled, or not, which is notified using - * the sent_text_input event. Meanwhile, while processing the key, the host - * IME may send one or more im_set_text events to update the input text. - * - * If ImeProcessKey returns TRUE, ImeToAsciiEx is then be called to retrieve - * the composition string updates. We use ime_update.comp_str != NULL as flag that - * composition is started, even if the preedit text is empty. - * - * If ImeProcessKey returns FALSE, ImeToAsciiEx will not be called. - */ -struct ime_update -{ - DWORD cursor_pos; - WCHAR *comp_str; - WCHAR *result_str; -}; -static struct ime_update ime_update; - /* return the name of an Mac event */ static const char *dbgstr_event(int type) { @@ -166,6 +147,11 @@ static macdrv_event_mask get_event_mask(DWORD mask) return event_mask; } +static void post_ime_update( HWND hwnd, UINT cursor_pos, WCHAR *comp_str, WCHAR *result_str ) +{ + NtUserMessageCall( hwnd, WINE_IME_POST_UPDATE, cursor_pos, (LPARAM)comp_str, + result_str, NtUserImeDriverCall, FALSE ); +} /*********************************************************************** * macdrv_im_set_text @@ -173,7 +159,6 @@ static macdrv_event_mask get_event_mask(DWORD mask) static void macdrv_im_set_text(const macdrv_event *event) { HWND hwnd = macdrv_get_window_hwnd(event->window); - CFIndex length = 0; WCHAR *text = NULL; TRACE_(imm)("win %p/%p himc %p text %s complete %u\n", hwnd, event->window, event->im_set_text.himc, @@ -181,27 +166,16 @@ static void macdrv_im_set_text(const macdrv_event *event) if (event->im_set_text.text) { - length = CFStringGetLength(event->im_set_text.text); + CFIndex length = CFStringGetLength(event->im_set_text.text); if (!(text = malloc((length + 1) * sizeof(WCHAR)))) return; if (length) CFStringGetCharacters(event->im_set_text.text, CFRangeMake(0, length), text); text[length] = 0; } - /* discard any pending comp text */ - free(ime_update.comp_str); - ime_update.comp_str = NULL; - ime_update.cursor_pos = -1; + if (event->im_set_text.complete) post_ime_update(hwnd, -1, NULL, text); + else post_ime_update(hwnd, event->im_set_text.cursor_pos, text, NULL); - if (event->im_set_text.complete) - { - free(ime_update.result_str); - ime_update.result_str = text; - } - else - { - ime_update.comp_str = text; - ime_update.cursor_pos = event->im_set_text.cursor_pos; - } + free(text); } /*********************************************************************** @@ -210,90 +184,7 @@ static void macdrv_im_set_text(const macdrv_event *event) static void macdrv_sent_text_input(const macdrv_event *event) { TRACE_(imm)("handled: %s\n", event->sent_text_input.handled ? "TRUE" : "FALSE"); - *event->sent_text_input.done = event->sent_text_input.handled || ime_update.result_str ? 1 : -1; -} - - -/*********************************************************************** - * ImeToAsciiEx (MACDRV.@) - */ -UINT macdrv_ImeToAsciiEx(UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc) -{ - UINT needed = sizeof(COMPOSITIONSTRING), comp_len, result_len; - struct ime_update *update = &ime_update; - void *dst; - - TRACE_(imm)("vkey %#x, vsc %#x, state %p, compstr %p, himc %p\n", vkey, vsc, state, compstr, himc); - - if (!update->comp_str) comp_len = 0; - else - { - comp_len = wcslen(update->comp_str); - needed += comp_len * sizeof(WCHAR); /* GCS_COMPSTR */ - needed += comp_len; /* GCS_COMPATTR */ - needed += 2 * sizeof(DWORD); /* GCS_COMPCLAUSE */ - } - - if (!update->result_str) result_len = 0; - else - { - result_len = wcslen(update->result_str); - needed += result_len * sizeof(WCHAR); /* GCS_RESULTSTR */ - needed += 2 * sizeof(DWORD); /* GCS_RESULTCLAUSE */ - } - - if (compstr->dwSize < needed) - { - compstr->dwSize = needed; - return STATUS_BUFFER_TOO_SMALL; - } - - memset( compstr, 0, sizeof(*compstr) ); - compstr->dwSize = sizeof(*compstr); - - if (update->comp_str) - { - compstr->dwCursorPos = update->cursor_pos; - - compstr->dwCompStrLen = comp_len; - compstr->dwCompStrOffset = compstr->dwSize; - dst = (BYTE *)compstr + compstr->dwCompStrOffset; - memcpy(dst, update->comp_str, compstr->dwCompStrLen * sizeof(WCHAR)); - compstr->dwSize += compstr->dwCompStrLen * sizeof(WCHAR); - - compstr->dwCompClauseLen = 2 * sizeof(DWORD); - compstr->dwCompClauseOffset = compstr->dwSize; - dst = (BYTE *)compstr + compstr->dwCompClauseOffset; - *((DWORD *)dst + 0) = 0; - *((DWORD *)dst + 1) = compstr->dwCompStrLen; - compstr->dwSize += compstr->dwCompClauseLen; - - compstr->dwCompAttrLen = compstr->dwCompStrLen; - compstr->dwCompAttrOffset = compstr->dwSize; - dst = (BYTE *)compstr + compstr->dwCompAttrOffset; - memset(dst, ATTR_INPUT, compstr->dwCompAttrLen); - compstr->dwSize += compstr->dwCompAttrLen; - } - - if (update->result_str) - { - compstr->dwResultStrLen = result_len; - compstr->dwResultStrOffset = compstr->dwSize; - dst = (BYTE *)compstr + compstr->dwResultStrOffset; - memcpy(dst, update->result_str, compstr->dwResultStrLen * sizeof(WCHAR)); - compstr->dwSize += compstr->dwResultStrLen * sizeof(WCHAR); - - compstr->dwResultClauseLen = 2 * sizeof(DWORD); - compstr->dwResultClauseOffset = compstr->dwSize; - dst = (BYTE *)compstr + compstr->dwResultClauseOffset; - *((DWORD *)dst + 0) = 0; - *((DWORD *)dst + 1) = compstr->dwResultStrLen; - compstr->dwSize += compstr->dwResultClauseLen; - } - - free(update->result_str); - update->result_str = NULL; - return 0; + *event->sent_text_input.done = event->sent_text_input.handled ? 1 : -1; } diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index 6c2241514a9..137945c4b74 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -304,7 +304,6 @@ static const struct user_driver_funcs macdrv_funcs = .pUpdateLayeredWindow = macdrv_UpdateLayeredWindow, .pVkKeyScanEx = macdrv_VkKeyScanEx, .pImeProcessKey = macdrv_ImeProcessKey, - .pImeToAsciiEx = macdrv_ImeToAsciiEx, .pNotifyIMEStatus = macdrv_NotifyIMEStatus, .pWindowMessage = macdrv_WindowMessage, .pWindowPosChanged = macdrv_WindowPosChanged, diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index b9cd9fde2ed..7e43314dce1 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -167,7 +167,6 @@ extern BOOL macdrv_RegisterHotKey(HWND hwnd, UINT mod_flags, UINT vkey); extern void macdrv_UnregisterHotKey(HWND hwnd, UINT modifiers, UINT vkey); extern SHORT macdrv_VkKeyScanEx(WCHAR wChar, HKL hkl); extern UINT macdrv_ImeProcessKey(HIMC himc, UINT wparam, UINT lparam, const BYTE *state); -extern UINT macdrv_ImeToAsciiEx(UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc); extern UINT macdrv_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl); extern INT macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState, LPWSTR bufW, int bufW_size, UINT flags, HKL hkl);
1
0
0
0
Rémi Bernon : win32u: Support posting IME updates while processing keys.
by Alexandre Julliard
17 Jan '24
17 Jan '24
Module: wine Branch: master Commit: 2d6fa952179c9a3fe6759b49d6dc74e327e707cd URL:
https://gitlab.winehq.org/wine/wine/-/commit/2d6fa952179c9a3fe6759b49d6dc74…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Jan 12 12:10:06 2024 +0100 win32u: Support posting IME updates while processing keys. --- dlls/win32u/imm.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/dlls/win32u/imm.c b/dlls/win32u/imm.c index 5f5e626869e..82124f72567 100644 --- a/dlls/win32u/imm.c +++ b/dlls/win32u/imm.c @@ -37,7 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); struct ime_update { struct list entry; - DWORD id; + WORD vkey; + WORD scan; DWORD cursor_pos; WCHAR *comp_str; WCHAR *result_str; @@ -58,6 +59,9 @@ struct imm_thread_data HWND default_hwnd; BOOL disable_ime; UINT window_cnt; + WORD ime_process_scan; /* scan code of the key being processed */ + WORD ime_process_vkey; /* vkey of the key being processed */ + BOOL ime_process_result; /* result string has been received */ }; static struct list thread_data_list = LIST_INIT( thread_data_list ); @@ -434,7 +438,9 @@ NTSTATUS WINAPI NtUserBuildHimcList( UINT thread_id, UINT count, HIMC *buffer, U static void post_ime_update( HWND hwnd, UINT cursor_pos, WCHAR *comp_str, WCHAR *result_str ) { static UINT ime_update_count; - UINT id, comp_len, result_len; + + struct imm_thread_data *data = get_imm_thread_data(); + UINT id = -1, comp_len, result_len; struct ime_update *update; TRACE( "hwnd %p, cursor_pos %u, comp_str %s, result_str %s\n", hwnd, cursor_pos, @@ -449,19 +455,25 @@ static void post_ime_update( HWND hwnd, UINT cursor_pos, WCHAR *comp_str, WCHAR update->result_str = result_str ? memcpy( update->buffer + comp_len, result_str, result_len * sizeof(WCHAR) ) : NULL; pthread_mutex_lock( &imm_mutex ); - id = update->id = ++ime_update_count; + update->scan = data->ime_process_scan; + if (!(update->vkey = data->ime_process_vkey)) + { + id = update->scan = ++ime_update_count; + update->vkey = VK_PROCESSKEY; + } list_add_tail( &ime_updates, &update->entry ); pthread_mutex_unlock( &imm_mutex ); - NtUserPostMessage( hwnd, WM_IME_NOTIFY, IMN_WINE_SET_COMP_STRING, id ); + if (!data->ime_process_vkey) NtUserPostMessage( hwnd, WM_IME_NOTIFY, IMN_WINE_SET_COMP_STRING, id ); + if (result_str) data->ime_process_result = TRUE; } -static struct ime_update *find_ime_update( UINT id ) +static struct ime_update *find_ime_update( WORD vkey, WORD scan ) { struct ime_update *update; LIST_FOR_EACH_ENTRY( update, &ime_updates, struct ime_update, entry ) - if (update->id == id) return update; + if (update->vkey == vkey && update->scan == scan) return update; return NULL; } @@ -476,7 +488,7 @@ UINT ime_to_tascii_ex( UINT vkey, UINT lparam, const BYTE *state, COMPOSITIONSTR pthread_mutex_lock( &imm_mutex ); - if (!(update = find_ime_update( lparam ))) + if (!(update = find_ime_update( vkey, lparam ))) { pthread_mutex_unlock( &imm_mutex ); return STATUS_NOT_FOUND; @@ -564,7 +576,19 @@ LRESULT ime_driver_call( HWND hwnd, enum wine_ime_call call, WPARAM wparam, LPAR switch (call) { case WINE_IME_PROCESS_KEY: - return user_driver->pImeProcessKey( params->himc, wparam, lparam, params->state ); + { + struct imm_thread_data *data = get_imm_thread_data(); + + data->ime_process_scan = HIWORD(lparam) & 0x1ff; + data->ime_process_vkey = LOWORD(wparam); + data->ime_process_result = FALSE; + res = user_driver->pImeProcessKey( params->himc, wparam, lparam, params->state ); + data->ime_process_vkey = data->ime_process_scan = 0; + if (!res) res = data->ime_process_result; + + TRACE( "processing scan %#x, vkey %#x -> %u\n", LOWORD(wparam), HIWORD(lparam) & 0x1ff, (UINT)res ); + return res; + } case WINE_IME_TO_ASCII_EX: res = user_driver->pImeToAsciiEx( wparam, lparam, params->state, params->compstr, params->himc ); if ((NTSTATUS)res != STATUS_NOT_IMPLEMENTED) return res;
1
0
0
0
Rémi Bernon : win32u: Move ImeToAsciiEx implementation from winex11.
by Alexandre Julliard
17 Jan '24
17 Jan '24
Module: wine Branch: master Commit: 5f313c0fdb81622e24164cd6cefbdccb04c2beb1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5f313c0fdb81622e24164cd6cefbdc…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Jan 12 12:30:18 2024 +0100 win32u: Move ImeToAsciiEx implementation from winex11. Using a new WINE_IME_POST_UPDATE NtUserMessageCall call for the drivers. --- dlls/win32u/driver.c | 2 +- dlls/win32u/imm.c | 144 +++++++++++++++++++++++++++++++++++++++++++- dlls/winex11.drv/init.c | 1 - dlls/winex11.drv/x11drv.h | 2 - dlls/winex11.drv/xim.c | 149 +--------------------------------------------- dlls/wow64win/user.c | 1 + include/ntuser.h | 1 + 7 files changed, 149 insertions(+), 151 deletions(-)
1
0
0
0
Rémi Bernon : winex11: Return STATUS_NOT_FOUND when IME update isn't found.
by Alexandre Julliard
17 Jan '24
17 Jan '24
Module: wine Branch: master Commit: 59820f0efb0ecfc7e91270ad79424b87a2443dfa URL:
https://gitlab.winehq.org/wine/wine/-/commit/59820f0efb0ecfc7e91270ad79424b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jan 10 21:03:48 2024 +0100 winex11: Return STATUS_NOT_FOUND when IME update isn't found. --- dlls/winex11.drv/xim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index 209d63f0402..155cd13809e 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -555,7 +555,7 @@ UINT X11DRV_ImeToAsciiEx( UINT vkey, UINT lparam, const BYTE *state, COMPOSITION if (!(update = find_ime_update( lparam ))) { pthread_mutex_unlock( &ime_mutex ); - return 0; + return STATUS_NOT_FOUND; } if (!update->comp_str) comp_len = 0;
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
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