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
July 2020
----- 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
826 discussions
Start a n
N
ew thread
Henri Verbeet : vkd3d-shader: Rename the vkd3d_sysval_semantic enumeration to vkd3d_shader_sysval_semantic.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: vkd3d Branch: master Commit: 3a9eb1839eabaff8a6167d5112b2562fc761870d URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=3a9eb1839eabaff8a6167d5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 10 17:02:01 2020 +0430 vkd3d-shader: Rename the vkd3d_sysval_semantic enumeration to vkd3d_shader_sysval_semantic. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 44 ++++++++++++++++++++++---------------------- libs/vkd3d-shader/spirv.c | 32 ++++++++++++++++---------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 61785be..054b512 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -650,27 +650,27 @@ enum vkd3d_shader_component_type VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPONENT_TYPE), }; -enum vkd3d_sysval_semantic -{ - VKD3D_SV_NONE = 0, - VKD3D_SV_POSITION = 1, - VKD3D_SV_CLIP_DISTANCE = 2, - VKD3D_SV_CULL_DISTANCE = 3, - VKD3D_SV_RENDER_TARGET_ARRAY_INDEX = 4, - VKD3D_SV_VIEWPORT_ARRAY_INDEX = 5, - VKD3D_SV_VERTEX_ID = 6, - VKD3D_SV_PRIMITIVE_ID = 7, - VKD3D_SV_INSTANCE_ID = 8, - VKD3D_SV_IS_FRONT_FACE = 9, - VKD3D_SV_SAMPLE_INDEX = 10, - VKD3D_SV_TESS_FACTOR_QUADEDGE = 11, - VKD3D_SV_TESS_FACTOR_QUADINT = 12, - VKD3D_SV_TESS_FACTOR_TRIEDGE = 13, - VKD3D_SV_TESS_FACTOR_TRIINT = 14, - VKD3D_SV_TESS_FACTOR_LINEDET = 15, - VKD3D_SV_TESS_FACTOR_LINEDEN = 16, - - VKD3D_FORCE_32_BIT_ENUM(VKD3D_SYSVAL_SEMANTIC), +enum vkd3d_shader_sysval_semantic +{ + VKD3D_SHADER_SV_NONE = 0x00, + VKD3D_SHADER_SV_POSITION = 0x01, + VKD3D_SHADER_SV_CLIP_DISTANCE = 0x02, + VKD3D_SHADER_SV_CULL_DISTANCE = 0x03, + VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX = 0x04, + VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX = 0x05, + VKD3D_SHADER_SV_VERTEX_ID = 0x06, + VKD3D_SHADER_SV_PRIMITIVE_ID = 0x07, + VKD3D_SHADER_SV_INSTANCE_ID = 0x08, + VKD3D_SHADER_SV_IS_FRONT_FACE = 0x09, + VKD3D_SHADER_SV_SAMPLE_INDEX = 0x0a, + VKD3D_SHADER_SV_TESS_FACTOR_QUADEDGE = 0x0b, + VKD3D_SHADER_SV_TESS_FACTOR_QUADINT = 0x0c, + VKD3D_SHADER_SV_TESS_FACTOR_TRIEDGE = 0x0d, + VKD3D_SHADER_SV_TESS_FACTOR_TRIINT = 0x0e, + VKD3D_SHADER_SV_TESS_FACTOR_LINEDET = 0x0f, + VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN = 0x10, + + VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SYSVAL_SEMANTIC), }; enum vkd3d_shader_minimum_precision @@ -687,7 +687,7 @@ struct vkd3d_shader_signature_element const char *semantic_name; unsigned int semantic_index; unsigned int stream_index; - enum vkd3d_sysval_semantic sysval_semantic; + enum vkd3d_shader_sysval_semantic sysval_semantic; enum vkd3d_shader_component_type component_type; unsigned int register_index; unsigned int mask; diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 257b443..667d851 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -132,30 +132,30 @@ static const void *vkd3d_find_struct_(const struct vkd3d_struct *chain, return NULL; } -static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enum vkd3d_sysval_semantic sysval, +static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enum vkd3d_shader_sysval_semantic sysval, unsigned int index) { switch (sysval) { - case VKD3D_SV_NONE: + case VKD3D_SHADER_SV_NONE: return VKD3D_SIV_NONE; - case VKD3D_SV_POSITION: + case VKD3D_SHADER_SV_POSITION: return VKD3D_SIV_POSITION; - case VKD3D_SV_CLIP_DISTANCE: + case VKD3D_SHADER_SV_CLIP_DISTANCE: return VKD3D_SIV_CLIP_DISTANCE; - case VKD3D_SV_CULL_DISTANCE: + case VKD3D_SHADER_SV_CULL_DISTANCE: return VKD3D_SIV_CULL_DISTANCE; - case VKD3D_SV_TESS_FACTOR_QUADEDGE: + case VKD3D_SHADER_SV_TESS_FACTOR_QUADEDGE: return VKD3D_SIV_QUAD_U0_TESS_FACTOR + index; - case VKD3D_SV_TESS_FACTOR_QUADINT: + case VKD3D_SHADER_SV_TESS_FACTOR_QUADINT: return VKD3D_SIV_QUAD_U_INNER_TESS_FACTOR + index; - case VKD3D_SV_TESS_FACTOR_TRIEDGE: + case VKD3D_SHADER_SV_TESS_FACTOR_TRIEDGE: return VKD3D_SIV_TRIANGLE_U_TESS_FACTOR + index; - case VKD3D_SV_TESS_FACTOR_TRIINT: + case VKD3D_SHADER_SV_TESS_FACTOR_TRIINT: return VKD3D_SIV_TRIANGLE_INNER_TESS_FACTOR; - case VKD3D_SV_TESS_FACTOR_LINEDET: + case VKD3D_SHADER_SV_TESS_FACTOR_LINEDET: return VKD3D_SIV_LINE_DETAIL_TESS_FACTOR; - case VKD3D_SV_TESS_FACTOR_LINEDEN: + case VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN: return VKD3D_SIV_LINE_DENSITY_TESS_FACTOR; default: FIXME("Unhandled sysval %#x, index %u.\n", sysval, index); @@ -163,7 +163,7 @@ static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enu } } -static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_sysval_semantic sysval) +static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_shader_sysval_semantic sysval) { return vkd3d_siv_from_sysval_indexed(sysval, 0); } @@ -4325,11 +4325,11 @@ static void vkd3d_dxbc_compiler_emit_shader_signature_outputs(struct vkd3d_dxbc_ switch (e->sysval_semantic) { - case VKD3D_SV_CLIP_DISTANCE: + case VKD3D_SHADER_SV_CLIP_DISTANCE: calculate_clip_or_cull_distance_mask(e, &clip_distance_mask); break; - case VKD3D_SV_CULL_DISTANCE: + case VKD3D_SHADER_SV_CULL_DISTANCE: calculate_clip_or_cull_distance_mask(e, &cull_distance_mask); break; @@ -4360,13 +4360,13 @@ static void vkd3d_dxbc_compiler_emit_shader_signature_outputs(struct vkd3d_dxbc_ switch (e->sysval_semantic) { - case VKD3D_SV_CLIP_DISTANCE: + case VKD3D_SHADER_SV_CLIP_DISTANCE: compiler->output_info[i].id = clip_distance_id; compiler->output_info[i].component_type = VKD3D_SHADER_COMPONENT_FLOAT; compiler->output_info[i].array_element_mask = clip_distance_mask; break; - case VKD3D_SV_CULL_DISTANCE: + case VKD3D_SHADER_SV_CULL_DISTANCE: compiler->output_info[i].id = cull_distance_id; compiler->output_info[i].component_type = VKD3D_SHADER_COMPONENT_FLOAT; compiler->output_info[i].array_element_mask = cull_distance_mask;
1
0
0
0
Henri Verbeet : vkd3d-shader: Rename the vkd3d_component_type enumeration to vkd3d_shader_component_type.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: vkd3d Branch: master Commit: 2da59a105623df88b767f7f74621c989de188823 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=2da59a105623df88b767f7f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 10 17:02:00 2020 +0430 vkd3d-shader: Rename the vkd3d_component_type enumeration to vkd3d_shader_component_type. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 17 +- libs/vkd3d-shader/spirv.c | 376 ++++++++++++++++--------------- libs/vkd3d-shader/vkd3d_shader_private.h | 18 +- 3 files changed, 206 insertions(+), 205 deletions(-) Diff:
https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=2da59a105623df88b76…
1
0
0
0
Henri Verbeet : vkd3d-compiler: Add an option to specify the source type.
by Alexandre Julliard
10 Jul '20
10 Jul '20
Module: vkd3d Branch: master Commit: e4690d51cca0672ffad1b641bb87773f1173d728 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=e4690d51cca0672ffad1b64…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 10 17:01:59 2020 +0430 vkd3d-compiler: Add an option to specify the source type. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/vkd3d-compiler/main.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index da03df2..4da3a99 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -104,6 +104,8 @@ static void print_usage(const char *program_name) " -o, --output=<file> Write the output to <file>.\n" " --strip-debug Strip debug information from the output.\n" " -V, --version Display version information and exit.\n" + " -x <type> Specify the type of the source. Valid values are\n" + " 'dxbc-tpf' and 'none'.\n" " -- Stop option processing. Any subsequent argument is\n" " interpreted as a filename.\n"; @@ -114,6 +116,7 @@ struct options { const char *filename; const char *output_filename; + enum vkd3d_shader_source_type source_type; bool print_version; struct vkd3d_shader_compile_option compile_options[MAX_COMPILE_OPTIONS]; @@ -148,6 +151,14 @@ static void add_compile_option(struct options *options, o->value = value; } +static enum vkd3d_shader_source_type parse_source_type(const char *source) +{ + if (!strcmp(source, "dxbc-tpf") || !strcmp(source, "none")) + return VKD3D_SHADER_SOURCE_DXBC_TPF; + + return VKD3D_SHADER_SOURCE_NONE; +} + static bool parse_command_line(int argc, char **argv, struct options *options) { int option; @@ -162,10 +173,11 @@ static bool parse_command_line(int argc, char **argv, struct options *options) }; memset(options, 0, sizeof(*options)); + options->source_type = VKD3D_SHADER_SOURCE_DXBC_TPF; for (;;) { - if ((option = getopt_long(argc, argv, "ho:V", long_options, NULL)) == -1) + if ((option = getopt_long(argc, argv, "ho:Vx:", long_options, NULL)) == -1) break; switch (option) @@ -184,6 +196,14 @@ static bool parse_command_line(int argc, char **argv, struct options *options) options->print_version = true; return true; + case 'x': + if ((options->source_type = parse_source_type(optarg)) == VKD3D_SHADER_SOURCE_NONE) + { + fprintf(stderr, "Invalid source type '%s' specified.\n", optarg); + return false; + } + break; + default: return false; } @@ -218,7 +238,7 @@ int main(int argc, char **argv) info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO; info.next = NULL; - info.source_type = VKD3D_SHADER_SOURCE_DXBC_TPF; + info.source_type = options.source_type; info.target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY; info.options = options.compile_options; info.option_count = options.compile_option_count;
1
0
0
0
Matteo Bruni : d3dx9: Simplify D3DXSphereBoundProbe() a bit.
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: 18ae539c914a9b5a89f63d8cf9c2a21273eccc6c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18ae539c914a9b5a89f63d8c…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jul 9 21:35:49 2020 +0200 d3dx9: Simplify D3DXSphereBoundProbe() a bit. Spurred by a patch by Alex Henrie. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/mesh.c | 19 ++++++++++--------- dlls/d3dx9_36/tests/mesh.c | 32 ++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 5e0bb98efc..22f86f10d0 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -2409,20 +2409,21 @@ BOOL WINAPI D3DXIntersectTri(const D3DXVECTOR3 *p0, const D3DXVECTOR3 *p1, const return FALSE; } -BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *pcenter, float radius, - const D3DXVECTOR3 *prayposition, const D3DXVECTOR3 *praydirection) +BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *center, float radius, + const D3DXVECTOR3 *ray_position, const D3DXVECTOR3 *ray_direction) { - D3DXVECTOR3 difference; - FLOAT a, b, c, d; + D3DXVECTOR3 difference = {0}; + float a, b, c, d; - a = D3DXVec3LengthSq(praydirection); - if (!D3DXVec3Subtract(&difference, prayposition, pcenter)) return FALSE; - b = D3DXVec3Dot(&difference, praydirection); + D3DXVec3Subtract(&difference, ray_position, center); c = D3DXVec3LengthSq(&difference) - radius * radius; + if (c < 0.0f) + return TRUE; + a = D3DXVec3LengthSq(ray_direction); + b = D3DXVec3Dot(&difference, ray_direction); d = b * b - a * c; - if ( ( d <= 0.0f ) || ( sqrt(d) <= b ) ) return FALSE; - return TRUE; + return d >= 0.0f && (b <= 0.0f || d > b * b); } /************************************************************************* diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index c357200656..42deb32b93 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -435,18 +435,42 @@ static void D3DXBoundProbeTest(void) radius = sqrt(77.0f); center.x = 1.0f; center.y = 2.0f; center.z = 3.0f; raydirection.x = 2.0f; raydirection.y = -4.0f; raydirection.z = 2.0f; - rayposition.x = 5.0f; rayposition.y = 5.0f; rayposition.z = 9.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); - ok(result == TRUE, "expected TRUE, received FALSE\n"); + ok(result == TRUE, "Got unexpected result %#x.\n", result); rayposition.x = 45.0f; rayposition.y = -75.0f; rayposition.z = 49.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); - ok(result == FALSE, "expected FALSE, received TRUE\n"); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + raydirection.x = -2.0f; raydirection.y = 4.0f; raydirection.z = -2.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == TRUE, "Got unexpected result %#x.\n", result); rayposition.x = 5.0f; rayposition.y = 11.0f; rayposition.z = 9.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); - ok(result == FALSE, "expected FALSE, received TRUE\n"); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + raydirection.x = 2.0f; raydirection.y = -4.0f; raydirection.z = 2.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + radius = 1.0f; + rayposition.x = 2.0f; rayposition.y = 2.0f; rayposition.z = 3.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + raydirection.x = 0.0f; raydirection.y = 0.0f; raydirection.z = 1.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == TRUE, "Got unexpected result %#x.\n", result); + + if (0) + { + /* All these crash on native. */ + D3DXSphereBoundProbe(¢er, radius, &rayposition, NULL); + D3DXSphereBoundProbe(¢er, radius, NULL, &raydirection); + D3DXSphereBoundProbe(NULL, radius, &rayposition, &raydirection); + } } static void D3DXComputeBoundingBoxTest(void)
1
0
0
0
Robin Kertels : d3dx9/tests: Add a few D3DXLoadSurfaceFromSurface() tests with different rects.
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: ea7cf679150f790d2e375d99ee226ea4881b490a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ea7cf679150f790d2e375d99…
Author: Robin Kertels <robin.kertels(a)gmail.com> Date: Thu Jul 9 21:36:36 2020 +0200 d3dx9/tests: Add a few D3DXLoadSurfaceFromSurface() tests with different rects. Signed-off-by: Robin Kertels <robin.kertels(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/surface.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index e9b9e04178..4590a758d7 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -1032,6 +1032,43 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_LINEAR, 0); ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + /* rects */ + SetRect(&rect, 2, 2, 1, 1); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_DEFAULT, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_DEFAULT, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_POINT, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + SetRect(&rect, 1, 1, 1, 1); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_DEFAULT, 0); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_DEFAULT, 0); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + if (0) + { + /* Somehow it crashes with a STATUS_INTEGER_DIVIDE_BY_ZERO exception + * on Windows. */ + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_POINT, 0); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + } + SetRect(&rect, 1, 1, 2, 2); + SetRect(&destrect, 1, 1, 2, 2); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, &destrect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &destrect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + IDirect3DSurface9_Release(newsurf); check_release((IUnknown*)surf, 0);
1
0
0
0
Robin Kertels : d3dx9: Ignore filter in D3DXLoadSurfaceFromSurface() when rects match.
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: 625622ad4182061ee3111032ab0ae4a494b74e73 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=625622ad4182061ee3111032…
Author: Robin Kertels <robin.kertels(a)gmail.com> Date: Thu Jul 9 21:36:35 2020 +0200 d3dx9: Ignore filter in D3DXLoadSurfaceFromSurface() when rects match. This allows us to use IDirect3DDevice9_StretchRect and avoid GPU synchronization. It massively improves performance in Dead Space 1 which calls LoadSurfaceFromSurface every frame before presenting. Signed-off-by: Robin Kertels <robin.kertels(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/surface.c | 105 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 82 insertions(+), 23 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index a5143cbee4..045d7267c9 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -2142,11 +2142,14 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key) { + const struct pixel_format_desc *src_format_desc, *dst_format_desc; + D3DSURFACE_DESC src_desc, dst_desc; + struct volume src_size, dst_size; IDirect3DSurface9 *temp_surface; D3DTEXTUREFILTERTYPE d3d_filter; IDirect3DDevice9 *device; - D3DSURFACE_DESC src_desc; D3DLOCKED_RECT lock; + RECT dst_rect_temp; HRESULT hr; RECT s; @@ -2158,28 +2161,92 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, if (!dst_surface || !src_surface) return D3DERR_INVALIDCALL; + IDirect3DSurface9_GetDesc(src_surface, &src_desc); + src_format_desc = get_format_info(src_desc.Format); + if (!src_rect) + { + SetRect(&s, 0, 0, src_desc.Width, src_desc.Height); + src_rect = &s; + } + else if (src_rect->left == src_rect->right || src_rect->top == src_rect->bottom) + { + WARN("Empty src_rect specified.\n"); + return filter == D3DX_FILTER_NONE ? D3D_OK : E_FAIL; + } + else if (src_rect->left > src_rect->right || src_rect->right > src_desc.Width + || src_rect->left < 0 || src_rect->left > src_desc.Width + || src_rect->top > src_rect->bottom || src_rect->bottom > src_desc.Height + || src_rect->top < 0 || src_rect->top > src_desc.Height) + { + WARN("Invalid src_rect specified.\n"); + return D3DERR_INVALIDCALL; + } + + src_size.width = src_rect->right - src_rect->left; + src_size.height = src_rect->bottom - src_rect->top; + src_size.depth = 1; + + IDirect3DSurface9_GetDesc(dst_surface, &dst_desc); + dst_format_desc = get_format_info(dst_desc.Format); + if (!dst_rect) + { + SetRect(&dst_rect_temp, 0, 0, dst_desc.Width, dst_desc.Height); + dst_rect = &dst_rect_temp; + } + else if (dst_rect->left == dst_rect->right || dst_rect->top == dst_rect->bottom) + { + WARN("Empty dst_rect specified.\n"); + return filter == D3DX_FILTER_NONE ? D3D_OK : E_FAIL; + } + else if (dst_rect->left > dst_rect->right || dst_rect->right > dst_desc.Width + || dst_rect->left < 0 || dst_rect->left > dst_desc.Width + || dst_rect->top > dst_rect->bottom || dst_rect->bottom > dst_desc.Height + || dst_rect->top < 0 || dst_rect->top > dst_desc.Height) + { + WARN("Invalid dst_rect specified.\n"); + return D3DERR_INVALIDCALL; + } + + dst_size.width = dst_rect->right - dst_rect->left; + dst_size.height = dst_rect->bottom - dst_rect->top; + dst_size.depth = 1; + if (!dst_palette && !src_palette && !color_key) { - switch (filter) + if (src_desc.Format == dst_desc.Format + && dst_size.width == src_size.width + && dst_size.height == src_size.height + && color_key == 0 + && !(src_rect->left & (src_format_desc->block_width - 1)) + && !(src_rect->top & (src_format_desc->block_height - 1)) + && !(dst_rect->left & (dst_format_desc->block_width - 1)) + && !(dst_rect->top & (dst_format_desc->block_height - 1))) { - case D3DX_FILTER_NONE: - d3d_filter = D3DTEXF_NONE; - break; + d3d_filter = D3DTEXF_NONE; + } + else + { + switch (filter) + { + case D3DX_FILTER_NONE: + d3d_filter = D3DTEXF_NONE; + break; - case D3DX_FILTER_POINT: - d3d_filter = D3DTEXF_POINT; - break; + case D3DX_FILTER_POINT: + d3d_filter = D3DTEXF_POINT; + break; - case D3DX_FILTER_LINEAR: - d3d_filter = D3DTEXF_LINEAR; - break; + case D3DX_FILTER_LINEAR: + d3d_filter = D3DTEXF_LINEAR; + break; - default: - d3d_filter = ~0u; - break; + default: + d3d_filter = D3DTEXF_FORCE_DWORD; + break; + } } - if (d3d_filter != ~0u) + if (d3d_filter != D3DTEXF_FORCE_DWORD) { IDirect3DSurface9_GetDevice(src_surface, &device); hr = IDirect3DDevice9_StretchRect(device, src_surface, src_rect, dst_surface, dst_rect, d3d_filter); @@ -2189,14 +2256,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, } } - IDirect3DSurface9_GetDesc(src_surface, &src_desc); - - if (!src_rect) - { - SetRect(&s, 0, 0, src_desc.Width, src_desc.Height); - src_rect = &s; - } - if (FAILED(lock_surface(src_surface, NULL, &lock, &temp_surface, FALSE))) return D3DXERR_INVALIDDATA;
1
0
0
0
Ziqing Hui : d3dx10: Implement D3DX10GetImageInfoFromMemory().
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: 99aa8b5ddc1b81ee4f7b3dd6d13dd9ae46e08ff7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=99aa8b5ddc1b81ee4f7b3dd6…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu Jul 9 21:35:48 2020 +0200 d3dx10: Implement D3DX10GetImageInfoFromMemory(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48856
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx10_43/Makefile.in | 1 + dlls/d3dx10_43/d3dx10_43_main.c | 146 +++++++++++++++++++++++++++++++++++++++- dlls/d3dx10_43/tests/d3dx10.c | 7 +- 3 files changed, 147 insertions(+), 7 deletions(-) diff --git a/dlls/d3dx10_43/Makefile.in b/dlls/d3dx10_43/Makefile.in index 2d0343f3b0..ca2d418be0 100644 --- a/dlls/d3dx10_43/Makefile.in +++ b/dlls/d3dx10_43/Makefile.in @@ -1,6 +1,7 @@ MODULE = d3dx10_43.dll IMPORTLIB = d3dx10 IMPORTS = d3d10_1 d3dcompiler dxguid +DELAYIMPORTS = windowscodecs EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/d3dx10_43/d3dx10_43_main.c b/dlls/d3dx10_43/d3dx10_43_main.c index 45247756b8..53781f5de6 100644 --- a/dlls/d3dx10_43/d3dx10_43_main.c +++ b/dlls/d3dx10_43/d3dx10_43_main.c @@ -32,9 +32,56 @@ #include "d3d10_1.h" #include "d3dx10.h" +#include "wincodec.h" WINE_DEFAULT_DEBUG_CHANNEL(d3dx); +HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT sdk_version, IWICImagingFactory **imaging_factory); + +static const struct +{ + const GUID *wic_container_guid; + D3DX10_IMAGE_FILE_FORMAT d3dx_file_format; +} +file_formats[] = +{ + { &GUID_ContainerFormatBmp, D3DX10_IFF_BMP }, + { &GUID_ContainerFormatJpeg, D3DX10_IFF_JPG }, + { &GUID_ContainerFormatPng, D3DX10_IFF_PNG }, + { &GUID_ContainerFormatDds, D3DX10_IFF_DDS }, + { &GUID_ContainerFormatTiff, D3DX10_IFF_TIFF }, + { &GUID_ContainerFormatGif, D3DX10_IFF_GIF }, + { &GUID_ContainerFormatWmp, D3DX10_IFF_WMP }, +}; + +static D3DX10_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(file_formats); ++i) + { + if (IsEqualGUID(file_formats[i].wic_container_guid, container_format)) + return file_formats[i].d3dx_file_format; + } + return D3DX10_IFF_FORCE_DWORD; +} + +static D3D10_RESOURCE_DIMENSION wic_dimension_to_d3dx10_dimension(WICDdsDimension wic_dimension) +{ + switch (wic_dimension) + { + case WICDdsTexture1D: + return D3D10_RESOURCE_DIMENSION_TEXTURE1D; + case WICDdsTexture2D: + case WICDdsTextureCube: + return D3D10_RESOURCE_DIMENSION_TEXTURE2D; + case WICDdsTexture3D: + return D3D10_RESOURCE_DIMENSION_TEXTURE3D; + default: + return D3D10_RESOURCE_DIMENSION_UNKNOWN; + } +} + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) @@ -229,10 +276,105 @@ HRESULT WINAPI D3DX10GetFeatureLevel1(ID3D10Device *device, ID3D10Device1 **devi HRESULT WINAPI D3DX10GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX10ThreadPump *pump, D3DX10_IMAGE_INFO *img_info, HRESULT *hresult) { - FIXME("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p.\n", + IWICBitmapFrameDecode *frame = NULL; + IWICImagingFactory *factory = NULL; + IWICDdsDecoder *dds_decoder = NULL; + IWICBitmapDecoder *decoder = NULL; + WICDdsParameters dds_params; + IWICStream *stream = NULL; + unsigned int frame_count; + GUID container_format; + HRESULT hr; + + TRACE("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p.\n", src_data, src_data_size, pump, img_info, hresult); - return E_NOTIMPL; + if (!src_data || !src_data_size || !img_info) + return E_FAIL; + if (pump) + FIXME("Thread pump is not supported yet.\n"); + + WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory); + IWICImagingFactory_CreateStream(factory, &stream); + hr = IWICStream_InitializeFromMemory(stream, (BYTE *)src_data, src_data_size); + if (FAILED(hr)) + { + WARN("Failed to initialize stream.\n"); + goto end; + } + hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream *)stream, NULL, 0, &decoder); + if (FAILED(hr)) + goto end; + + hr = IWICBitmapDecoder_GetContainerFormat(decoder, &container_format); + if (FAILED(hr)) + goto end; + img_info->ImageFileFormat = wic_container_guid_to_file_format(&container_format); + if (img_info->ImageFileFormat == D3DX10_IFF_FORCE_DWORD) + { + hr = E_FAIL; + WARN("Unsupported image file format %s.\n", debugstr_guid(&container_format)); + goto end; + } + + hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count); + if (FAILED(hr) || !frame_count) + goto end; + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + if (FAILED(hr)) + goto end; + hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height); + if (FAILED(hr)) + goto end; + + if (img_info->ImageFileFormat == D3DX10_IFF_DDS) + { + hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder); + if (FAILED(hr)) + goto end; + hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params); + if (FAILED(hr)) + goto end; + img_info->ArraySize = dds_params.ArraySize; + img_info->Depth = dds_params.Depth; + img_info->MipLevels = dds_params.MipLevels; + img_info->ResourceDimension = wic_dimension_to_d3dx10_dimension(dds_params.Dimension); + img_info->Format = dds_params.DxgiFormat; + img_info->MiscFlags = 0; + if (dds_params.Dimension == WICDdsTextureCube) + { + img_info->MiscFlags = D3D10_RESOURCE_MISC_TEXTURECUBE; + img_info->ArraySize *= 6; + } + } + else + { + img_info->ArraySize = 1; + img_info->Depth = 1; + img_info->MipLevels = 1; + img_info->ResourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE2D; + img_info->Format = DXGI_FORMAT_R8G8B8A8_UNORM; + img_info->MiscFlags = 0; + } + +end: + if (dds_decoder) + IWICDdsDecoder_Release(dds_decoder); + if (frame) + IWICBitmapFrameDecode_Release(frame); + if (decoder) + IWICBitmapDecoder_Release(decoder); + if (stream) + IWICStream_Release(stream); + if (factory) + IWICImagingFactory_Release(factory); + + if (hr != S_OK) + { + WARN("Invalid or unsupported image file.\n"); + return E_FAIL; + } + return S_OK; } D3DX_CPU_OPTIMIZATION WINAPI D3DXCpuOptimizations(BOOL enable) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index 40f836d9ba..6012dff647 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -1051,23 +1051,21 @@ static void test_get_image_info(void) CoInitialize(NULL); - todo_wine { hr = D3DX10GetImageInfoFromMemory(test_image[0].data, 0, NULL, &image_info, NULL); ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); hr = D3DX10GetImageInfoFromMemory(NULL, test_image[0].size, NULL, &image_info, NULL); ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); hr = D3DX10GetImageInfoFromMemory(&dword, sizeof(dword), NULL, &image_info, NULL); ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); - } for (i = 0; i < ARRAY_SIZE(test_image); ++i) { hr = D3DX10GetImageInfoFromMemory(test_image[i].data, test_image[i].size, NULL, &image_info, NULL); - todo_wine ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + todo_wine_if(test_image[i].expected.ImageFileFormat == D3DX10_IFF_WMP) + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); if (hr != S_OK) continue; - todo_wine { ok(image_info.Width == test_image[i].expected.Width, "Test %u: Got unexpected Width %u, expected %u.\n", i, image_info.Width, test_image[i].expected.Width); @@ -1095,7 +1093,6 @@ static void test_get_image_info(void) ok(image_info.ImageFileFormat == test_image[i].expected.ImageFileFormat, "Test %u: Got unexpected ImageFileFormat %u, expected %u.\n", i, image_info.ImageFileFormat, test_image[i].expected.ImageFileFormat); - } } CoUninitialize();
1
0
0
0
Ziqing Hui : d3dx10/tests: Add more test images.
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: 9f59bdd9d2bd1bf4f87a35f80682f37bae94b051 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9f59bdd9d2bd1bf4f87a35f8…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Wed Jul 8 11:10:19 2020 +0800 d3dx10/tests: Add more test images. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx10_43/tests/Makefile.in | 2 +- dlls/d3dx10_43/tests/d3dx10.c | 155 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 153 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=9f59bdd9d2bd1bf4f87a…
1
0
0
0
Jacek Caban : server: Remove no longer needed get_console_output_info request.
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: 0a57d3853bd0b3bfd25b7d171e8c9bddca22f52a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0a57d3853bd0b3bfd25b7d17…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 9 19:29:20 2020 +0200 server: Remove no longer needed get_console_output_info request. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/server_protocol.h | 38 +------------------------------------ server/console.c | 43 ------------------------------------------ server/protocol.def | 27 -------------------------- server/request.h | 23 ---------------------- server/trace.c | 32 ------------------------------- 5 files changed, 1 insertion(+), 162 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0a57d3853bd0b3bfd25b…
1
0
0
0
Jacek Caban : wineconsole: Use IOCTL_CONDRV_GET_OUTPUT_INFO in WINECON_GetServerConfig.
by Alexandre Julliard
09 Jul '20
09 Jul '20
Module: wine Branch: master Commit: 56ee3a8ad12b02e2c53a2f3737bcd6ba15fd4737 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=56ee3a8ad12b02e2c53a2f37…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 9 19:29:12 2020 +0200 wineconsole: Use IOCTL_CONDRV_GET_OUTPUT_INFO in WINECON_GetServerConfig. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineconsole/wineconsole.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 6ccba13c8a..88c9ca400a 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -611,7 +611,7 @@ static void WINECON_Delete(struct inner_data* data) static BOOL WINECON_GetServerConfig(struct inner_data* data) { struct condrv_input_info input_info; - BOOL ret; + struct condrv_output_info output_info; DWORD mode; if (!DeviceIoControl(data->hConIn, IOCTL_CONDRV_GET_INPUT_INFO, NULL, 0, @@ -625,22 +625,19 @@ static BOOL WINECON_GetServerConfig(struct inner_data* data) data->curcfg.insert_mode = (mode & (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS)) == (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS); - SERVER_START_REQ(get_console_output_info) - { - req->handle = wine_server_obj_handle( data->hConOut ); - ret = !wine_server_call_err( req ); - data->curcfg.cursor_size = reply->cursor_size; - data->curcfg.cursor_visible = reply->cursor_visible; - data->curcfg.def_attr = reply->attr; - data->curcfg.sb_width = reply->width; - data->curcfg.sb_height = reply->height; - data->curcfg.win_width = reply->win_right - reply->win_left + 1; - data->curcfg.win_height = reply->win_bottom - reply->win_top + 1; - } - SERVER_END_REQ; - WINECON_DumpConfig("first cfg: ", &data->curcfg); + if (!DeviceIoControl(data->hConOut, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, + &output_info, sizeof(output_info), NULL, NULL)) + return FALSE; + data->curcfg.cursor_size = output_info.cursor_size; + data->curcfg.cursor_visible = output_info.cursor_visible; + data->curcfg.def_attr = output_info.attr; + data->curcfg.sb_width = output_info.width; + data->curcfg.sb_height = output_info.height; + data->curcfg.win_width = output_info.win_right - output_info.win_left + 1; + data->curcfg.win_height = output_info.win_bottom - output_info.win_top + 1; - return ret; + WINECON_DumpConfig("first cfg: ", &data->curcfg); + return TRUE; } /******************************************************************
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
83
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
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200