winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2016
----- 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
2 participants
755 discussions
Start a n
N
ew thread
Józef Kucia : wined3d: Recognize SM4 dcl_input opcode.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: 0de89fd1bfe424fe4de206eb0f3919f6dc04ff47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0de89fd1bfe424fe4de206eb0…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Feb 2 11:32:28 2016 +0100 wined3d: Recognize SM4 dcl_input opcode. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 1 + dlls/wined3d/glsl_shader.c | 1 + dlls/wined3d/shader.c | 4 +++- dlls/wined3d/shader_sm4.c | 5 ++++- dlls/wined3d/wined3d_private.h | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 825a771..9999a6c 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5228,6 +5228,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DCL */ shader_hw_nop, /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, + /* WINED3DSIH_DCL_INPUT */ NULL, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop, /* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_OUTPUT */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e679ae5..b3952f9 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8016,6 +8016,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL */ shader_glsl_nop, /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, + /* WINED3DSIH_DCL_INPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index cab6335..867ca96 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -56,6 +56,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DCL */ "dcl", /* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer", /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer", + /* WINED3DSIH_DCL_INPUT */ "dcl_input", /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive", /* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps", /* WINED3DSIH_DCL_OUTPUT */ "dcl_output", @@ -1883,7 +1884,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe TRACE(" "); shader_dump_dst_param(&ins.declaration.dst, &shader_version); } - else if (ins.handler_idx == WINED3DSIH_DCL_OUTPUT) + else if (ins.handler_idx == WINED3DSIH_DCL_INPUT + || ins.handler_idx == WINED3DSIH_DCL_OUTPUT) { TRACE("%s ", shader_opcode_names[ins.handler_idx]); shader_dump_dst_param(&ins.declaration.dst, &shader_version); diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 3babd4e..88231e0 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -161,6 +161,7 @@ enum wined3d_sm4_opcode WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c, WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d, WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e, + WINED3D_SM4_OP_DCL_INPUT = 0x5f, WINED3D_SM4_OP_DCL_INPUT_PS = 0x62, WINED3D_SM4_OP_DCL_OUTPUT = 0x65, WINED3D_SM4_OP_DCL_TEMPS = 0x68, @@ -365,6 +366,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, "", ""}, {WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE, "", ""}, {WINED3D_SM4_OP_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""}, + {WINED3D_SM4_OP_DCL_INPUT, WINED3DSIH_DCL_INPUT, "", ""}, {WINED3D_SM4_OP_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS, "", ""}, {WINED3D_SM4_OP_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""}, {WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""}, @@ -983,7 +985,8 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi ins->flags = (opcode_token & WINED3D_SM4_INTERPOLATION_MODE_MASK) >> WINED3D_SM4_INTERPOLATION_MODE_SHIFT; shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst); } - else if (opcode == WINED3D_SM4_OP_DCL_OUTPUT) + else if (opcode == WINED3D_SM4_OP_DCL_INPUT + || opcode == WINED3D_SM4_OP_DCL_OUTPUT) { shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index cda6c39..e8355cc 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -500,6 +500,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DCL, WINED3DSIH_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, + WINED3DSIH_DCL_INPUT, WINED3DSIH_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PS, WINED3DSIH_DCL_OUTPUT,
1
0
0
0
Józef Kucia : wined3d: Recognize SM4 dcl_input_ps opcode.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: 3013125240bb3f4a5903892522d117fef62923da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3013125240bb3f4a590389252…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Feb 2 11:32:27 2016 +0100 wined3d: Recognize SM4 dcl_input_ps opcode. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 1 + dlls/wined3d/glsl_shader.c | 1 + dlls/wined3d/shader.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/wined3d/shader_sm4.c | 10 ++++++++++ dlls/wined3d/wined3d_private.h | 12 ++++++++++++ 5 files changed, 63 insertions(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 9f4295a..825a771 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5229,6 +5229,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop, + /* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_OUTPUT */ NULL, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop, /* WINED3DSIH_DCL_SAMPLER */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 3b5513b..e679ae5 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8017,6 +8017,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop, + /* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop, /* WINED3DSIH_DCL_SAMPLER */ NULL, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 934af23..cab6335 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -57,6 +57,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer", /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer", /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive", + /* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps", /* WINED3DSIH_DCL_OUTPUT */ "dcl_output", /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology", /* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler", @@ -1774,6 +1775,37 @@ static void shader_dump_primitive_type(enum wined3d_primitive_type primitive_typ } } +static void shader_dump_interpolation_mode(enum wined3d_shader_interpolation_mode interpolation_mode) +{ + switch (interpolation_mode) + { + case WINED3DSIM_CONSTANT: + TRACE("constant"); + break; + case WINED3DSIM_LINEAR: + TRACE("linear"); + break; + case WINED3DSIM_LINEAR_CENTROID: + TRACE("linear centroid"); + break; + case WINED3DSIM_LINEAR_NOPERSPECTIVE: + TRACE("linear noperspective"); + break; + case WINED3DSIM_LINEAR_SAMPLE: + TRACE("linear sample"); + break; + case WINED3DSIM_LINEAR_NOPERSPECTIVE_CENTROID: + TRACE("linear noperspective centroid"); + break; + case WINED3DSIM_LINEAR_NOPERSPECTIVE_SAMPLE: + TRACE("linear noperspective sample"); + break; + default: + TRACE("<unrecognized_interpolation_mode %#x>", interpolation_mode); + break; + } +} + static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data, const DWORD *byte_code) { struct wined3d_shader_version shader_version; @@ -1844,6 +1876,13 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe } TRACE("}"); } + else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS) + { + TRACE("%s ", shader_opcode_names[ins.handler_idx]); + shader_dump_interpolation_mode(ins.flags); + TRACE(" "); + shader_dump_dst_param(&ins.declaration.dst, &shader_version); + } else if (ins.handler_idx == WINED3DSIH_DCL_OUTPUT) { TRACE("%s ", shader_opcode_names[ins.handler_idx]); diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 63dbc9e..3babd4e 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -47,6 +47,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode); #define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT 11 #define WINED3D_SM4_SHADER_DATA_TYPE_MASK (0xfu << WINED3D_SM4_SHADER_DATA_TYPE_SHIFT) +#define WINED3D_SM4_INTERPOLATION_MODE_SHIFT 11 +#define WINED3D_SM4_INTERPOLATION_MODE_MASK (0xfu << WINED3D_SM4_INTERPOLATION_MODE_SHIFT) + #define WINED3D_SM4_OPCODE_MASK 0xff #define WINED3D_SM4_REGISTER_MODIFIER (0x1u << 31) @@ -158,6 +161,7 @@ enum wined3d_sm4_opcode WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c, WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d, WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e, + WINED3D_SM4_OP_DCL_INPUT_PS = 0x62, WINED3D_SM4_OP_DCL_OUTPUT = 0x65, WINED3D_SM4_OP_DCL_TEMPS = 0x68, }; @@ -361,6 +365,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, "", ""}, {WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE, "", ""}, {WINED3D_SM4_OP_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""}, + {WINED3D_SM4_OP_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS, "", ""}, {WINED3D_SM4_OP_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""}, {WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""}, }; @@ -973,6 +978,11 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi ins->declaration.primitive_type = input_primitive_type_table[primitive_type]; } } + else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PS) + { + ins->flags = (opcode_token & WINED3D_SM4_INTERPOLATION_MODE_MASK) >> WINED3D_SM4_INTERPOLATION_MODE_SHIFT; + shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst); + } else if (opcode == WINED3D_SM4_OP_DCL_OUTPUT) { shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7ab2ae8..cda6c39 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -416,6 +416,17 @@ enum wined3d_shader_dst_modifier WINED3DSPDM_MSAMPCENTROID = 4, }; +enum wined3d_shader_interpolation_mode +{ + WINED3DSIM_CONSTANT = 1, + WINED3DSIM_LINEAR = 2, + WINED3DSIM_LINEAR_CENTROID = 3, + WINED3DSIM_LINEAR_NOPERSPECTIVE = 4, + WINED3DSIM_LINEAR_NOPERSPECTIVE_CENTROID = 5, + WINED3DSIM_LINEAR_SAMPLE = 6, + WINED3DSIM_LINEAR_NOPERSPECTIVE_SAMPLE = 7, +}; + /* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */ #define WINED3DSI_TEXLD_PROJECT 0x1 #define WINED3DSI_TEXLD_BIAS 0x2 @@ -490,6 +501,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, WINED3DSIH_DCL_INPUT_PRIMITIVE, + WINED3DSIH_DCL_INPUT_PS, WINED3DSIH_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_SAMPLER,
1
0
0
0
Alexandre Julliard : server: Don' t return an error if the created window station already exists.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: a69d7b29e3e4c81b6baa9ca5ee063fe59877f343 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a69d7b29e3e4c81b6baa9ca5e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 2 21:46:46 2016 +0900 server: Don't return an error if the created window station already exists. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/winstation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/winstation.c b/server/winstation.c index 00f0e9b..9384b32 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -125,6 +125,7 @@ static struct winstation *create_winstation( struct directory *root, const struc return NULL; } } + else clear_error(); } return winstation; }
1
0
0
0
Alexandre Julliard : server: Implement serial port read interval timeouts.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: bc0bf9e505922b81df1c317d6493665bbe946554 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc0bf9e505922b81df1c317d6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 1 23:18:31 2016 -0700 server: Implement serial port read interval timeouts. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/serial.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/server/serial.c b/server/serial.c index 164a4b1..7beb8ff 100644 --- a/server/serial.c +++ b/server/serial.c @@ -62,12 +62,15 @@ static void serial_destroy(struct object *obj); static enum server_fd_type serial_get_fd_type( struct fd *fd ); static void serial_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); +static void serial_reselect_async( struct fd *fd, struct async_queue *queue ); struct serial { struct object obj; struct fd *fd; + struct timeout_user *read_timer; + /* timeout values */ unsigned int readinterval; unsigned int readconst; @@ -115,7 +118,7 @@ static const struct fd_ops serial_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ serial_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ + serial_reselect_async, /* reselect_async */ default_fd_cancel_async /* cancel_async */ }; @@ -134,6 +137,7 @@ struct object *create_serial( struct fd *fd ) if (!(serial = alloc_object( &serial_ops ))) return NULL; + serial->read_timer = NULL; serial->readinterval = 0; serial->readmult = 0; serial->readconst = 0; @@ -157,6 +161,7 @@ static struct fd *serial_get_fd( struct object *obj ) static void serial_destroy( struct object *obj) { struct serial *serial = (struct serial *)obj; + if (serial->read_timer) remove_timeout_user( serial->read_timer ); release_object( serial->fd ); } @@ -203,6 +208,34 @@ static void serial_queue_async( struct fd *fd, const async_data_t *data, int typ } } +static void serial_read_timeout( void *arg ) +{ + struct serial *serial = arg; + + serial->read_timer = NULL; + fd_async_wake_up( serial->fd, ASYNC_TYPE_READ, STATUS_TIMEOUT ); +} + +static void serial_reselect_async( struct fd *fd, struct async_queue *queue ) +{ + struct serial *serial = get_fd_user( fd ); + + if (serial->read_timer) + { + if (!(default_fd_get_poll_events( fd ) & POLLIN)) + { + remove_timeout_user( serial->read_timer ); + serial->read_timer = NULL; + } + } + else if (serial->readinterval && (default_fd_get_poll_events( fd ) & POLLIN)) + { + serial->read_timer = add_timeout_user( (timeout_t)serial->readinterval * -10000, + serial_read_timeout, serial ); + } + default_fd_reselect_async( fd, queue ); +} + DECL_HANDLER(get_serial_info) { struct serial *serial;
1
0
0
0
Nikolay Sivov : dwrite/tests: Test that soft hyphen is not marked as a whitespace.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: 20b5cdb1d4758c923cdc500ee2dcb96c69f5eff6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20b5cdb1d4758c923cdc500ee…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 2 01:41:13 2016 +0300 dwrite/tests: Test that soft hyphen is not marked as a whitespace. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/analyzer.c | 3 +++ dlls/dwrite/tests/layout.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index d60b977..b5437c5 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -1028,6 +1028,9 @@ static void compare_breakpoints(const struct linebreaks_test *test, DWRITE_LINE_ conditions[test->bp[i].breakConditionAfter], test->bp[i].isWhitespace ? "WS" : "0", test->bp[i].isSoftHyphen ? "SHY" : "0"); + if (g_actual_bp[i].isSoftHyphen) + ok(!g_actual_bp[i].isWhitespace, "%s: soft hyphen marked as a whitespace\n", + wine_dbgstr_wn(&test->text[i], 1)); text++; i++; } diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index bc49b2f..bf46df8 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -2025,6 +2025,8 @@ todo_wine for (i = 0; i < count; i++) { ok(metrics[i].length == 1, "%d: got %d\n", i, metrics[i].length); ok(metrics[i].isSoftHyphen == (i == count - 2), "%d: got %d\n", i, metrics[i].isSoftHyphen); + if (metrics[i].isSoftHyphen) + ok(!metrics[i].isWhitespace, "%u: got %d\n", i, metrics[i].isWhitespace); if (metrics[i].isNewline) { if (i == 17 || i == 19) todo_wine ok(metrics[i].width == 0.0f, "%u: got width %f\n", i, metrics[i].width);
1
0
0
0
Nikolay Sivov : dwrite: Release drawing effect after trimming sign Draw().
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: e7094551fe8f7e024e2e627ab7d3732bf8899d24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7094551fe8f7e024e2e627ab…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 2 01:41:12 2016 +0300 dwrite: Release drawing effect after trimming sign Draw(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 93c9c7b..93d096d 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -4467,11 +4467,14 @@ static HRESULT WINAPI dwritetrimmingsign_Draw(IDWriteInlineObject *iface, void * { struct dwrite_trimmingsign *This = impl_from_IDWriteInlineObject(iface); DWRITE_TEXT_RANGE range = { 0, ~0u }; + HRESULT hr; TRACE("(%p)->(%p %p %.2f %.2f %d %d %p)\n", This, context, renderer, originX, originY, is_sideways, is_rtl, effect); IDWriteTextLayout_SetDrawingEffect(This->layout, effect, range); - return IDWriteTextLayout_Draw(This->layout, context, renderer, originX, originY); + hr = IDWriteTextLayout_Draw(This->layout, context, renderer, originX, originY); + IDWriteTextLayout_SetDrawingEffect(This->layout, NULL, range); + return hr; } static HRESULT WINAPI dwritetrimmingsign_GetMetrics(IDWriteInlineObject *iface, DWRITE_INLINE_OBJECT_METRICS *ret)
1
0
0
0
Nikolay Sivov : dwrite: Improve SetScriptAnalysis()/SetBidiLevel() tracing.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: e94264e6bde1e733e055f48be54540a958785352 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e94264e6bde1e733e055f48be…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 2 01:41:11 2016 +0300 dwrite: Improve SetScriptAnalysis()/SetBidiLevel() tracing. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/analyzer.c | 5 +++++ dlls/dwrite/dwrite_private.h | 2 ++ dlls/dwrite/layout.c | 4 ++-- dlls/dwrite/tests/layout.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 4b21f11..0f88fd9 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -177,6 +177,11 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last }; #undef _OT +const char *debugstr_sa_script(UINT16 script) +{ + return script < Script_LastId ? debugstr_an((char*)&dwritescripts_properties[script].props.isoScriptCode, 4): "not defined"; +} + struct dwrite_numbersubstitution { IDWriteNumberSubstitution IDWriteNumberSubstitution_iface; LONG ref; diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 79b34a5..ce08572 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -99,6 +99,8 @@ static inline const char *debugstr_matrix(const DWRITE_MATRIX *m) m->dx, m->dy); } +const char *debugstr_sa_script(UINT16) DECLSPEC_HIDDEN; + static inline unsigned short get_table_entry(const unsigned short *table, WCHAR ch) { return table[table[table[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0xf)]; diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index d281243..93c9c7b 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3977,7 +3977,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetScriptAnalysis(IDWriteTextAnalysi struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface); struct layout_run *run; - TRACE("%u %u script=%d\n", position, length, sa->script); + TRACE("[%u,%u) script=%u:%s\n", position, position + length, sa->script, debugstr_sa_script(sa->script)); run = alloc_layout_run(LAYOUT_RUN_REGULAR); if (!run) @@ -4009,7 +4009,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetBidiLevel(IDWriteTextAnalysisSink struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface); struct layout_run *cur_run; - TRACE("%u %u %u %u\n", position, length, explicitLevel, resolvedLevel); + TRACE("[%u,%u) %u %u\n", position, position + length, explicitLevel, resolvedLevel); LIST_FOR_EACH_ENTRY(cur_run, &layout->runs, struct layout_run, entry) { struct regular_layout_run *cur = &cur_run->u.regular; diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index fe760c6..bc49b2f 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -1410,7 +1410,7 @@ static const struct drawcall_entry draw_seq2[] = { }; static const struct drawcall_entry draw_seq3[] = { - { DRAW_GLYPHRUN }, + { DRAW_GLYPHRUN, {0x202a,0x202c,0} }, { DRAW_GLYPHRUN, {'a','b',0} }, { DRAW_LAST_KIND } };
1
0
0
0
Nikolay Sivov : dwrite: Don't use BOOL values to set bit fields.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: 8d9bf23fc1cc6e27c28b44ac0b5e3ea687d97425 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d9bf23fc1cc6e27c28b44ac0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 2 01:41:10 2016 +0300 dwrite: Don't use BOOL values to set bit fields. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 28 ++++++++++++++-------------- dlls/dwrite/layout.c | 16 ++++++++-------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 2ff3b8c..d466612 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1927,11 +1927,11 @@ static HRESULT fontfamily_add_font(struct dwrite_fontfamily_data *family_data, s family_data->fonts[family_data->font_count] = font_data; family_data->font_count++; if (font_data->style == DWRITE_FONT_STYLE_NORMAL) - family_data->has_normal_face = TRUE; + family_data->has_normal_face = 1; else if (font_data->style == DWRITE_FONT_STYLE_OBLIQUE) - family_data->has_oblique_face = TRUE; + family_data->has_oblique_face = 1; else - family_data->has_italic_face = TRUE; + family_data->has_italic_face = 1; return S_OK; } @@ -2733,8 +2733,8 @@ static HRESULT init_font_data(IDWriteFactory2 *factory, IDWriteFontFile *file, D data->face_index = face_index; data->face_type = face_type; data->simulations = DWRITE_FONT_SIMULATIONS_NONE; - data->bold_sim_tested = FALSE; - data->oblique_sim_tested = FALSE; + data->bold_sim_tested = 0; + data->oblique_sim_tested = 0; IDWriteFontFile_AddRef(file); IDWriteFactory2_AddRef(factory); @@ -2811,9 +2811,9 @@ static HRESULT init_fontfamily_data(IDWriteLocalizedStrings *familyname, struct data->ref = 1; data->font_count = 0; data->font_alloc = 2; - data->has_normal_face = FALSE; - data->has_oblique_face = FALSE; - data->has_italic_face = FALSE; + data->has_normal_face = 0; + data->has_oblique_face = 0; + data->has_italic_face = 0; data->fonts = heap_alloc(sizeof(*data->fonts)*data->font_alloc); if (!data->fonts) { @@ -2839,7 +2839,7 @@ static void fontfamily_add_bold_simulated_face(struct dwrite_fontfamily_data *fa if (family->fonts[i]->bold_sim_tested) continue; - family->fonts[i]->bold_sim_tested = TRUE; + family->fonts[i]->bold_sim_tested = 1; for (j = i; j < family->font_count; j++) { if (family->fonts[j]->bold_sim_tested) continue; @@ -2850,7 +2850,7 @@ static void fontfamily_add_bold_simulated_face(struct dwrite_fontfamily_data *fa weight = family->fonts[j]->weight; heaviest = j; } - family->fonts[j]->bold_sim_tested = TRUE; + family->fonts[j]->bold_sim_tested = 1; } } @@ -2892,7 +2892,7 @@ static void fontfamily_add_bold_simulated_face(struct dwrite_fontfamily_data *fa strcatW(facenameW, boldW); if (init_font_data_from_font(family->fonts[heaviest], DWRITE_FONT_SIMULATIONS_BOLD, facenameW, &boldface) == S_OK) { - boldface->bold_sim_tested = TRUE; + boldface->bold_sim_tested = 1; fontfamily_add_font(family, boldface); } } @@ -2911,7 +2911,7 @@ static void fontfamily_add_oblique_simulated_face(struct dwrite_fontfamily_data if (family->fonts[i]->oblique_sim_tested) continue; - family->fonts[i]->oblique_sim_tested = TRUE; + family->fonts[i]->oblique_sim_tested = 1; if (family->fonts[i]->style == DWRITE_FONT_STYLE_NORMAL) regular = i; else if (family->fonts[i]->style == DWRITE_FONT_STYLE_OBLIQUE) @@ -2925,7 +2925,7 @@ static void fontfamily_add_oblique_simulated_face(struct dwrite_fontfamily_data if ((family->fonts[i]->weight == family->fonts[j]->weight) && (family->fonts[i]->stretch == family->fonts[j]->stretch)) { - family->fonts[j]->oblique_sim_tested = TRUE; + family->fonts[j]->oblique_sim_tested = 1; if (regular == ~0 && family->fonts[j]->style == DWRITE_FONT_STYLE_NORMAL) regular = j; @@ -2956,7 +2956,7 @@ static void fontfamily_add_oblique_simulated_face(struct dwrite_fontfamily_data strcatW(facenameW, obliqueW); if (init_font_data_from_font(family->fonts[regular], DWRITE_FONT_SIMULATIONS_OBLIQUE, facenameW, &obliqueface) == S_OK) { - obliqueface->oblique_sim_tested = TRUE; + obliqueface->oblique_sim_tested = 1; fontfamily_add_font(family, obliqueface); } } diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 7345f78..d281243 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -568,8 +568,8 @@ static HRESULT layout_update_breakpoints_range(struct dwrite_textlayout *layout, layout->actual_breakpoints[i].breakConditionAfter = DWRITE_BREAK_CONDITION_MAY_NOT_BREAK; } - layout->actual_breakpoints[i].isWhitespace = FALSE; - layout->actual_breakpoints[i].isSoftHyphen = FALSE; + layout->actual_breakpoints[i].isWhitespace = 0; + layout->actual_breakpoints[i].isSoftHyphen = 0; } return S_OK; @@ -797,11 +797,11 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) metrics->width = 0.0f; metrics->length = r->u.object.length; - metrics->canWrapLineAfter = FALSE; - metrics->isWhitespace = FALSE; - metrics->isNewline = FALSE; - metrics->isSoftHyphen = FALSE; - metrics->isRightToLeft = FALSE; + metrics->canWrapLineAfter = 0; + metrics->isWhitespace = 0; + metrics->isNewline = 0; + metrics->isSoftHyphen = 0; + metrics->isRightToLeft = 0; metrics->padding = 0; c->run = r; c->position = 0; /* there's always one cluster per inline object, so 0 is valid value */ @@ -931,7 +931,7 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) if (hr == S_OK) { layout->cluster_count = cluster; if (cluster) - layout->clustermetrics[cluster-1].canWrapLineAfter = TRUE; + layout->clustermetrics[cluster-1].canWrapLineAfter = 1; } IDWriteTextAnalyzer_Release(analyzer);
1
0
0
0
Nikolay Sivov : dwrite: Fix newlineLength metric to include all newline chars at the end of the line.
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: f84eaad8dcbab78ed94b1e5a2516ae2e5fe23b02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f84eaad8dcbab78ed94b1e5a2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 2 01:41:09 2016 +0300 dwrite: Fix newlineLength metric to include all newline chars at the end of the line. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 19 +++++++++++-------- dlls/dwrite/tests/layout.c | 20 +++++++++++++++----- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 86eab09..7345f78 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -1654,19 +1654,22 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout) trailingspacewidth = 0.0f; while (strlength) { DWRITE_CLUSTER_METRICS *cluster = &layout->clustermetrics[index]; + struct layout_cluster *lc = &layout->clusters[index]; + WCHAR ch; - if (!cluster->isNewline && !cluster->isWhitespace) + /* This also filters out clusters added from inline objects, those are never + treated as a white space. */ + if (!cluster->isWhitespace) break; - if (cluster->isNewline) { - metrics.trailingWhitespaceLength += cluster->length; + /* Every isNewline cluster is also isWhitespace, but not every + newline character cluster has isNewline set, so go back to original string. */ + ch = lc->run->u.regular.descr.string[lc->position]; + if (cluster->length == 1 && lb_is_newline_char(ch)) metrics.newlineLength += cluster->length; - } - if (cluster->isWhitespace) { - metrics.trailingWhitespaceLength += cluster->length; - trailingspacewidth += cluster->width; - } + metrics.trailingWhitespaceLength += cluster->length; + trailingspacewidth += cluster->width; strlength -= cluster->length; index--; diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index b2cdfc3..fe760c6 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -2030,6 +2030,7 @@ todo_wine todo_wine ok(metrics[i].width == 0.0f, "%u: got width %f\n", i, metrics[i].width); else ok(metrics[i].width == 0.0f, "%u: got width %f\n", i, metrics[i].width); + ok(metrics[i].isWhitespace == 1, "%u: got %d\n", i, metrics[i].isWhitespace); ok(metrics[i].canWrapLineAfter == 1, "%u: got %d\n", i, metrics[i].canWrapLineAfter); } } @@ -3341,8 +3342,8 @@ static void test_GetLineMetrics(void) ok(hr == S_OK, "got 0x%08x\n", hr); memset(metrics, 0, sizeof(metrics)); - count = 2; - hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, 2, &count); + count = 0; + hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, sizeof(metrics)/sizeof(*metrics), &count); ok(hr == S_OK, "got 0x%08x\n", hr); ok(count == 2, "got %u\n", count); /* baseline is relative to a line, and is not accumulated */ @@ -3361,7 +3362,8 @@ static void test_GetLineMetrics(void) ok(hr == S_OK, "got 0x%08x\n", hr); memset(metrics, 0xcc, sizeof(metrics)); - hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, 6, &count); + count = 0; + hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, sizeof(metrics)/sizeof(*metrics), &count); ok(hr == S_OK, "got 0x%08x\n", hr); todo_wine ok(count == 6, "got %u\n", count); @@ -3378,10 +3380,18 @@ todo_wine ok(metrics[1].newlineLength == 1, "got %u\n", metrics[1].newlineLength); ok(metrics[2].newlineLength == 1, "got %u\n", metrics[2].newlineLength); ok(metrics[3].newlineLength == 1, "got %u\n", metrics[3].newlineLength); -todo_wine { ok(metrics[4].newlineLength == 2, "got %u\n", metrics[4].newlineLength); +todo_wine ok(metrics[5].newlineLength == 0, "got %u\n", metrics[5].newlineLength); -} + + ok(metrics[0].trailingWhitespaceLength == 1, "got %u\n", metrics[0].newlineLength); + ok(metrics[1].trailingWhitespaceLength == 1, "got %u\n", metrics[1].newlineLength); + ok(metrics[2].trailingWhitespaceLength == 1, "got %u\n", metrics[2].newlineLength); + ok(metrics[3].trailingWhitespaceLength == 1, "got %u\n", metrics[3].newlineLength); + ok(metrics[4].trailingWhitespaceLength == 2, "got %u\n", metrics[4].newlineLength); +todo_wine + ok(metrics[5].trailingWhitespaceLength == 0, "got %u\n", metrics[5].newlineLength); + IDWriteTextLayout_Release(layout); /* empty text layout */
1
0
0
0
Henri Verbeet : ddraw: Use wined3d_resource_map() in d3d_texture2_Load().
by Alexandre Julliard
02 Feb '16
02 Feb '16
Module: wine Branch: master Commit: 6b2a080372ae49cdde6b7752de5de20142ce2a70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b2a080372ae49cdde6b7752d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Feb 1 18:42:12 2016 +0100 ddraw: Use wined3d_resource_map() in d3d_texture2_Load(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/surface.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 25aa9b8..6a07cd7 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5062,6 +5062,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu { struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface); struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture); + struct wined3d_resource *dst_resource, *src_resource; HRESULT hr; TRACE("iface %p, src_texture %p.\n", iface, src_texture); @@ -5074,6 +5075,9 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu wined3d_mutex_lock(); + dst_resource = wined3d_texture_get_resource(dst_surface->wined3d_texture); + src_resource = wined3d_texture_get_resource(src_surface->wined3d_texture); + if (((src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP) != (dst_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)) || (src_surface->surface_desc.u2.dwMipMapCount != dst_surface->surface_desc.u2.dwMipMapCount)) @@ -5131,22 +5135,19 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt); } - /* Copy the main memory texture into the surface that corresponds - * to the OpenGL texture object. */ - - hr = wined3d_surface_map(src_surface->wined3d_surface, &src_map_desc, NULL, 0); - if (FAILED(hr)) + if (FAILED(hr = wined3d_resource_map(src_resource, + src_surface->sub_resource_idx, &src_map_desc, NULL, 0))) { ERR("Failed to lock source surface, hr %#x.\n", hr); wined3d_mutex_unlock(); return D3DERR_TEXTURE_LOAD_FAILED; } - hr = wined3d_surface_map(dst_surface->wined3d_surface, &dst_map_desc, NULL, 0); - if (FAILED(hr)) + if (FAILED(hr = wined3d_resource_map(dst_resource, + dst_surface->sub_resource_idx, &dst_map_desc, NULL, 0))) { ERR("Failed to lock destination surface, hr %#x.\n", hr); - wined3d_surface_unmap(src_surface->wined3d_surface); + wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx); wined3d_mutex_unlock(); return D3DERR_TEXTURE_LOAD_FAILED; } @@ -5156,8 +5157,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu else memcpy(dst_map_desc.data, src_map_desc.data, src_map_desc.row_pitch * src_desc->dwHeight); - wined3d_surface_unmap(src_surface->wined3d_surface); - wined3d_surface_unmap(dst_surface->wined3d_surface); + wined3d_resource_unmap(dst_resource, dst_surface->sub_resource_idx); + wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx); } if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
76
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
73
74
75
76
Results per page:
10
25
50
100
200