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
May 2014
----- 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
404 discussions
Start a n
N
ew thread
Francois Gouget : ddraw: Remove WINAPI on static functions where not needed.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: 4e950d9cbc7c8284d6a708d2a07b9a9ee7994d45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e950d9cbc7c8284d6a708d2a…
Author: Francois Gouget <fgouget(a)free.fr> Date: Fri May 2 16:44:23 2014 +0200 ddraw: Remove WINAPI on static functions where not needed. --- dlls/ddraw/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index b561af4..d192348 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -447,7 +447,7 @@ static ULONG WINAPI d3d_texture1_AddRef(IDirect3DTexture *iface) return IUnknown_AddRef(surface->texture_outer); } -static HRESULT WINAPI ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette) +static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette) { struct ddraw_palette *palette_impl = unsafe_impl_from_IDirectDrawPalette(palette); struct ddraw_palette *prev;
1
0
0
0
Matteo Bruni : d3dcompiler: add_func_parameter is only used in hlsl.y.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: c37714342ec3339c97338416e67b9fe324173bd6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c37714342ec3339c97338416e…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri May 2 16:30:14 2014 +0200 d3dcompiler: add_func_parameter is only used in hlsl.y. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 2 -- dlls/d3dcompiler_43/hlsl.y | 25 +++++++++++++++++++++++++ dlls/d3dcompiler_43/utils.c | 25 ------------------------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index f7403f5..eb81ea5 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -1106,8 +1106,6 @@ static inline struct hlsl_ir_loop *loop_from_node(const struct hlsl_ir_node *nod BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) DECLSPEC_HIDDEN; struct hlsl_ir_var *get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN; void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN; -BOOL add_func_parameter(struct list *list, struct parse_parameter *param, - const struct source_location *loc) DECLSPEC_HIDDEN; struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class, enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) DECLSPEC_HIDDEN; struct hlsl_type *new_array_type(struct hlsl_type *basic_type, unsigned int array_size) DECLSPEC_HIDDEN; diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 9f2daba..f37e07e 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -808,6 +808,31 @@ static BOOL add_typedef(DWORD modifiers, struct hlsl_type *orig_type, struct lis return TRUE; } +static BOOL add_func_parameter(struct list *list, struct parse_parameter *param, const struct source_location *loc) +{ + struct hlsl_ir_var *decl = d3dcompiler_alloc(sizeof(*decl)); + + if (!decl) + { + ERR("Out of memory.\n"); + return FALSE; + } + decl->node.type = HLSL_IR_VAR; + decl->node.data_type = param->type; + decl->node.loc = *loc; + decl->name = param->name; + decl->semantic = param->semantic; + decl->modifiers = param->modifiers; + + if (!add_declaration(hlsl_ctx.cur_scope, decl, FALSE)) + { + free_declaration(decl); + return FALSE; + } + list_add_tail(list, &decl->node.entry); + return TRUE; +} + static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tree *funcs, char *name, struct list *params, BOOL exact_signature) { diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index c110718..858277a 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -805,31 +805,6 @@ void free_declaration(struct hlsl_ir_var *decl) d3dcompiler_free(decl); } -BOOL add_func_parameter(struct list *list, struct parse_parameter *param, const struct source_location *loc) -{ - struct hlsl_ir_var *decl = d3dcompiler_alloc(sizeof(*decl)); - - if (!decl) - { - ERR("Out of memory.\n"); - return FALSE; - } - decl->node.type = HLSL_IR_VAR; - decl->node.data_type = param->type; - decl->node.loc = *loc; - decl->name = param->name; - decl->semantic = param->semantic; - decl->modifiers = param->modifiers; - - if (!add_declaration(hlsl_ctx.cur_scope, decl, FALSE)) - { - free_declaration(decl); - return FALSE; - } - list_add_tail(list, &decl->node.entry); - return TRUE; -} - struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class, enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) {
1
0
0
0
Matteo Bruni : d3dcompiler: Pre/post increment/ decrement operators are unary.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: d25486fba4b87981618e0f55a5a7388db95c204f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d25486fba4b87981618e0f55a…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri May 2 16:30:13 2014 +0200 d3dcompiler: Pre/post increment/decrement operators are unary. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 10 +++++----- dlls/d3dcompiler_43/hlsl.y | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 1be52bc..f7403f5 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -826,6 +826,11 @@ enum hlsl_ir_expr_op { HLSL_IR_UNOP_SAT, + HLSL_IR_UNOP_PREINC, + HLSL_IR_UNOP_PREDEC, + HLSL_IR_UNOP_POSTINC, + HLSL_IR_UNOP_POSTDEC, + HLSL_IR_BINOP_ADD, HLSL_IR_BINOP_SUB, HLSL_IR_BINOP_MUL, @@ -856,11 +861,6 @@ enum hlsl_ir_expr_op { HLSL_IR_BINOP_POW, - HLSL_IR_BINOP_PREINC, - HLSL_IR_BINOP_PREDEC, - HLSL_IR_BINOP_POSTINC, - HLSL_IR_BINOP_POSTDEC, - HLSL_IR_TEROP_LERP, HLSL_IR_SEQUENCE, diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 1efb65b..9f2daba 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -1848,7 +1848,7 @@ postfix_expr: primary_expr } operands[0] = $1; operands[1] = operands[2] = NULL; - $$ = &new_expr(HLSL_IR_BINOP_POSTINC, operands, &loc)->node; + $$ = &new_expr(HLSL_IR_UNOP_POSTINC, operands, &loc)->node; /* Post increment/decrement expressions are considered const */ $$->data_type = clone_hlsl_type($$->data_type); $$->data_type->modifiers |= HLSL_MODIFIER_CONST; @@ -1867,7 +1867,7 @@ postfix_expr: primary_expr } operands[0] = $1; operands[1] = operands[2] = NULL; - $$ = &new_expr(HLSL_IR_BINOP_POSTDEC, operands, &loc)->node; + $$ = &new_expr(HLSL_IR_UNOP_POSTDEC, operands, &loc)->node; /* Post increment/decrement expressions are considered const */ $$->data_type = clone_hlsl_type($$->data_type); $$->data_type->modifiers |= HLSL_MODIFIER_CONST; @@ -2040,7 +2040,7 @@ unary_expr: postfix_expr } operands[0] = $2; operands[1] = operands[2] = NULL; - $$ = &new_expr(HLSL_IR_BINOP_PREINC, operands, &loc)->node; + $$ = &new_expr(HLSL_IR_UNOP_PREINC, operands, &loc)->node; } | OP_DEC unary_expr { @@ -2056,7 +2056,7 @@ unary_expr: postfix_expr } operands[0] = $2; operands[1] = operands[2] = NULL; - $$ = &new_expr(HLSL_IR_BINOP_PREDEC, operands, &loc)->node; + $$ = &new_expr(HLSL_IR_UNOP_PREDEC, operands, &loc)->node; } | unary_op unary_expr {
1
0
0
0
Matteo Bruni : d3dcompiler: Remove a couple of noisy traces.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: 89cac9c20dd85837f9ac8dc57b83de16dcd0b21d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89cac9c20dd85837f9ac8dc57…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri May 2 16:30:12 2014 +0200 d3dcompiler: Remove a couple of noisy traces. --- dlls/d3dcompiler_43/hlsl.y | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index ef68547..1efb65b 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -1400,7 +1400,6 @@ base_type: KW_VOID { struct hlsl_type *type; - TRACE("Type %s.\n", $1); type = get_type(hlsl_ctx.cur_scope, $1, TRUE); $$ = type; d3dcompiler_free($1); @@ -1409,7 +1408,6 @@ base_type: KW_VOID { struct hlsl_type *type; - TRACE("Struct type %s.\n", $2); type = get_type(hlsl_ctx.cur_scope, $2, TRUE); if (type->type != HLSL_CLASS_STRUCT) {
1
0
0
0
Stefan Dösinger : wined3d: Remove broken gdi palette code.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: 39212d2ffb908f343c42e7f405cb013424bd5bbc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39212d2ffb908f343c42e7f40…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri May 2 13:43:24 2014 +0200 wined3d: Remove broken gdi palette code. --- dlls/ddraw/tests/ddraw1.c | 5 ++--- dlls/ddraw/tests/ddraw2.c | 5 ++--- dlls/ddraw/tests/ddraw4.c | 5 ++--- dlls/ddraw/tests/ddraw7.c | 5 ++--- dlls/wined3d/palette.c | 18 ++---------------- dlls/wined3d/surface.c | 1 - dlls/wined3d/wined3d_private.h | 6 ++---- 7 files changed, 12 insertions(+), 33 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index c993e6f..7dd3412 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -5097,10 +5097,9 @@ static void test_palette_gdi(void) hr = IDirectDrawSurface_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); - SelectPalette(dc, ddraw_palette_handle, FALSE); i = GetDIBColorTable(dc, 0, sizeof(rgbquad) / sizeof(*rgbquad), rgbquad); ok(i == sizeof(rgbquad) / sizeof(*rgbquad), "Expected count 255, got %u.\n", i); @@ -5197,7 +5196,7 @@ static void test_palette_gdi(void) ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); /* Windows 2000 on the testbot assigns a different palette to the primary. Refrast? */ - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); SelectPalette(dc, ddraw_palette_handle, FALSE); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 3433ac1..aaef2bc 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -6165,10 +6165,9 @@ static void test_palette_gdi(void) hr = IDirectDrawSurface_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); - SelectPalette(dc, ddraw_palette_handle, FALSE); i = GetDIBColorTable(dc, 0, sizeof(rgbquad) / sizeof(*rgbquad), rgbquad); ok(i == sizeof(rgbquad) / sizeof(*rgbquad), "Expected count 255, got %u.\n", i); @@ -6265,7 +6264,7 @@ static void test_palette_gdi(void) ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); /* Windows 2000 on the testbot assigns a different palette to the primary. Refrast? */ - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); SelectPalette(dc, ddraw_palette_handle, FALSE); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index ff38553..cc96045 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -7067,10 +7067,9 @@ static void test_palette_gdi(void) hr = IDirectDrawSurface4_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); - SelectPalette(dc, ddraw_palette_handle, FALSE); i = GetDIBColorTable(dc, 0, sizeof(rgbquad) / sizeof(*rgbquad), rgbquad); ok(i == sizeof(rgbquad) / sizeof(*rgbquad), "Expected count 255, got %u.\n", i); @@ -7167,7 +7166,7 @@ static void test_palette_gdi(void) ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); /* Windows 2000 on the testbot assigns a different palette to the primary. Refrast? */ - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); SelectPalette(dc, ddraw_palette_handle, FALSE); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 62f8ac6..fca2892 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -6789,10 +6789,9 @@ static void test_palette_gdi(void) hr = IDirectDrawSurface7_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); - SelectPalette(dc, ddraw_palette_handle, FALSE); i = GetDIBColorTable(dc, 0, sizeof(rgbquad) / sizeof(*rgbquad), rgbquad); ok(i == sizeof(rgbquad) / sizeof(*rgbquad), "Expected count 255, got %u.\n", i); @@ -6889,7 +6888,7 @@ static void test_palette_gdi(void) ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); /* Windows 2000 on the testbot assigns a different palette to the primary. Refrast? */ - todo_wine ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), + ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE) || broken(TRUE), "Got unexpected palette %p, expected %p.\n", ddraw_palette_handle, GetStockObject(DEFAULT_PALETTE)); SelectPalette(dc, ddraw_palette_handle, FALSE); diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index e659952..5572d10 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -45,10 +45,7 @@ ULONG CDECL wined3d_palette_decref(struct wined3d_palette *palette) TRACE("%p decreasing refcount to %u.\n", palette, refcount); if (!refcount) - { - DeleteObject(palette->hpal); HeapFree(GetProcessHeap(), 0, palette); - } return refcount; } @@ -61,7 +58,7 @@ HRESULT CDECL wined3d_palette_get_entries(const struct wined3d_palette *palette, if (flags) return WINED3DERR_INVALIDCALL; /* unchecked */ - if (start > palette->palNumEntries || count > palette->palNumEntries - start) + if (start > palette->size || count > palette->size - start) return WINED3DERR_INVALIDCALL; if (palette->flags & WINED3D_PALETTE_8BIT_ENTRIES) @@ -111,9 +108,6 @@ HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette, palette->palents[255].peGreen = 255; palette->palents[255].peBlue = 255; } - - if (palette->hpal) - SetPaletteEntries(palette->hpal, start, count, palette->palents + start); } /* If the palette is attached to the render target, update all render targets */ @@ -138,19 +132,11 @@ static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wine palette->ref = 1; palette->device = device; palette->flags = flags; - - palette->palNumEntries = entry_count; - palette->hpal = CreatePalette((const LOGPALETTE *)&palette->palVersion); - if (!palette->hpal) - { - WARN("Failed to create palette.\n"); - return E_FAIL; - } + palette->size = entry_count; if (FAILED(hr = wined3d_palette_set_entries(palette, 0, 0, entry_count, entries))) { WARN("Failed to set palette entries, hr %#x.\n", hr); - DeleteObject(palette->hpal); return hr; } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 680a815..cd3b5a2 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -499,7 +499,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface) surface->hDC = CreateCompatibleDC(0); SelectObject(surface->hDC, surface->dib.DIBsection); TRACE("Using wined3d palette %p.\n", surface->palette); - SelectPalette(surface->hDC, surface->palette ? surface->palette->hpal : 0, FALSE); surface->flags |= SFLAG_DIBSECTION; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7e67f1e..395568a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2957,10 +2957,8 @@ struct wined3d_palette LONG ref; struct wined3d_device *device; - HPALETTE hpal; - WORD palVersion; /*| */ - WORD palNumEntries; /*| LOGPALETTE */ - PALETTEENTRY palents[256]; /*| */ + unsigned int size; + PALETTEENTRY palents[256]; DWORD flags; };
1
0
0
0
Stefan Dösinger : ddraw/tests: Test mipmap GetDC behavior.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: 7839ec874f2532ef59090d3b1e66d4ec75661122 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7839ec874f2532ef59090d3b1…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri May 2 13:43:23 2014 +0200 ddraw/tests: Test mipmap GetDC behavior. --- dlls/ddraw/tests/ddraw1.c | 28 +++++++++++++++++++++++++--- dlls/ddraw/tests/ddraw2.c | 28 +++++++++++++++++++++++++--- dlls/ddraw/tests/ddraw4.c | 28 +++++++++++++++++++++++++--- dlls/ddraw/tests/ddraw7.c | 5 +++++ 4 files changed, 80 insertions(+), 9 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7839ec874f2532ef59090…
1
0
0
0
Stefan Dösinger : ddraw/tests: Add a test for getdc palette handling.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: a8bcb6c7adeb93bacaa731a1ebef4c668787129a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8bcb6c7adeb93bacaa731a1e…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri May 2 16:11:08 2014 +0200 ddraw/tests: Add a test for getdc palette handling. --- dlls/ddraw/tests/ddraw1.c | 301 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 301 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 301 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw7.c | 301 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1204 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a8bcb6c7adeb93bacaa73…
1
0
0
0
Akihiro Sagawa : msvfw32: Fix uncompressed bitmap size handling in DrawDibDraw.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: af089289b32dbeec797f810938bca4adc8f717db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af089289b32dbeec797f81093…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri May 2 22:14:24 2014 +0900 msvfw32: Fix uncompressed bitmap size handling in DrawDibDraw. --- dlls/msvfw32/drawdib.c | 8 ++------ dlls/msvfw32/tests/drawdib.c | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/msvfw32/drawdib.c b/dlls/msvfw32/drawdib.c index 2916126..c4e5c40 100644 --- a/dlls/msvfw32/drawdib.c +++ b/dlls/msvfw32/drawdib.c @@ -355,12 +355,6 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, if (!(wFlags & DDF_UPDATE)) { - DWORD biSizeImage = lpbi->biSizeImage; - - /* biSizeImage may be set to 0 for BI_RGB (uncompressed) bitmaps */ - if ((lpbi->biCompression == BI_RGB) && (biSizeImage == 0)) - biSizeImage = ((lpbi->biWidth * lpbi->biBitCount + 31) / 32) * 4 * lpbi->biHeight; - if (lpbi->biCompression) { DWORD flags = 0; @@ -374,6 +368,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, } else { + /* BI_RGB: lpbi->biSizeImage isn't reliable */ + DWORD biSizeImage = ((lpbi->biWidth * lpbi->biBitCount + 31) / 32) * 4 * lpbi->biHeight; memcpy(whdd->lpvbits, lpBits, biSizeImage); } } diff --git a/dlls/msvfw32/tests/drawdib.c b/dlls/msvfw32/tests/drawdib.c index 24d8631..0a59d82 100644 --- a/dlls/msvfw32/tests/drawdib.c +++ b/dlls/msvfw32/tests/drawdib.c @@ -105,6 +105,12 @@ static void test_DrawDib_sizeimage(void) { 0, 0, 0, "" }, { 0, HEIGHT, 0, "" }, { WIDTH, 0, 0, "" }, + /* [8] zero size (to compare [9], [10] ) */ + { WIDTH, HEIGHT/2, 0, "8b75bf6d54a8645380114fe77505ee0699ffffaa" }, + /* [9] insufficient size */ + { WIDTH, HEIGHT/2, sizeof(RGBQUAD), "8b75bf6d54a8645380114fe77505ee0699ffffaa" }, + /* [10] too much size */ + { WIDTH, HEIGHT/2, WIDTH * HEIGHT * sizeof(RGBQUAD), "8b75bf6d54a8645380114fe77505ee0699ffffaa" }, }; HDC hdc; DWORD src_dib_size, dst_dib_size;
1
0
0
0
Akihiro Sagawa : msvfw32: Drawdib doesn't support inverted DIBs.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: 47a3a0528d5bb2ec84b58a00937639413a803727 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47a3a0528d5bb2ec84b58a009…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri May 2 22:14:22 2014 +0900 msvfw32: Drawdib doesn't support inverted DIBs. --- dlls/msvfw32/drawdib.c | 17 ++++++++++++++--- dlls/msvfw32/tests/drawdib.c | 7 +++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/msvfw32/drawdib.c b/dlls/msvfw32/drawdib.c index 9877e62..2916126 100644 --- a/dlls/msvfw32/drawdib.c +++ b/dlls/msvfw32/drawdib.c @@ -246,9 +246,18 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, DWORD dwSize; /* No compression */ TRACE("Not compressed!\n"); - dwSize = lpbi->biSize + num_colours(lpbi)*sizeof(RGBQUAD); - whdd->lpbiOut = HeapAlloc(GetProcessHeap(), 0, dwSize); - memcpy(whdd->lpbiOut, lpbi, dwSize); + if (lpbi->biHeight <= 0) + { + /* we don't draw inverted DIBs */ + TRACE("detected inverted DIB\n"); + ret = FALSE; + } + else + { + dwSize = lpbi->biSize + num_colours(lpbi)*sizeof(RGBQUAD); + whdd->lpbiOut = HeapAlloc(GetProcessHeap(), 0, dwSize); + memcpy(whdd->lpbiOut, lpbi, dwSize); + } } if (ret) @@ -332,6 +341,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, { TRACE("Something changed!\n"); ret = DrawDibBegin(hdd, hdc, dxDst, dyDst, lpbi, dxSrc, dySrc, 0); + if (!ret) + return ret; } #undef CHANGED diff --git a/dlls/msvfw32/tests/drawdib.c b/dlls/msvfw32/tests/drawdib.c index 54dd813..24d8631 100644 --- a/dlls/msvfw32/tests/drawdib.c +++ b/dlls/msvfw32/tests/drawdib.c @@ -98,6 +98,13 @@ static void test_DrawDib_sizeimage(void) { WIDTH, HEIGHT, WIDTH * HEIGHT * sizeof(RGBQUAD), "bc943d5ab024b8b0118d0a80aa283055d39942b8" }, /* [1] zero size */ { WIDTH, HEIGHT, 0, "bc943d5ab024b8b0118d0a80aa283055d39942b8" }, + /* error patterns */ + { WIDTH, -HEIGHT, 0, "" }, + { -WIDTH, HEIGHT, 0, "" }, + { -WIDTH, -HEIGHT, 0, "" }, + { 0, 0, 0, "" }, + { 0, HEIGHT, 0, "" }, + { WIDTH, 0, 0, "" }, }; HDC hdc; DWORD src_dib_size, dst_dib_size;
1
0
0
0
Akihiro Sagawa : msvfw32/tests: Add tests for drawdib.
by Alexandre Julliard
02 May '14
02 May '14
Module: wine Branch: master Commit: 93089217c3b3d182e8105c6c926c47e05bf8d337 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93089217c3b3d182e8105c6c9…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri May 2 22:14:21 2014 +0900 msvfw32/tests: Add tests for drawdib. --- dlls/msvfw32/tests/Makefile.in | 3 +- dlls/msvfw32/tests/drawdib.c | 166 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 1 deletion(-) diff --git a/dlls/msvfw32/tests/Makefile.in b/dlls/msvfw32/tests/Makefile.in index 26cd529..1ae7897 100644 --- a/dlls/msvfw32/tests/Makefile.in +++ b/dlls/msvfw32/tests/Makefile.in @@ -1,5 +1,6 @@ TESTDLL = msvfw32.dll -IMPORTS = msvfw32 +IMPORTS = msvfw32 advapi32 gdi32 C_SRCS = \ + drawdib.c \ msvfw.c diff --git a/dlls/msvfw32/tests/drawdib.c b/dlls/msvfw32/tests/drawdib.c new file mode 100644 index 0000000..54dd813 --- /dev/null +++ b/dlls/msvfw32/tests/drawdib.c @@ -0,0 +1,166 @@ +/* + * Copyright 2014 Akihiro Sagawa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WIN32_LEAN_AND_MEAN + +#include <windows.h> +#include <vfw.h> +#include <wincrypt.h> +#include <stdlib.h> +#include <string.h> + +#include "wine/test.h" + +#define WIDTH 16 +#define HEIGHT 12 + +static HCRYPTPROV crypt_prov; + +static inline DWORD get_stride(const BITMAPINFO *bmi) +{ + return ((bmi->bmiHeader.biBitCount * bmi->bmiHeader.biWidth + 31) >> 3) & ~3; +} + +static inline DWORD get_dib_size(const BITMAPINFO *bmi) +{ + return get_stride(bmi) * abs(bmi->bmiHeader.biHeight); +} + +static char *hash_dib(const BITMAPINFO *bmi, const void *bits) +{ + DWORD dib_size = get_dib_size(bmi); + HCRYPTHASH hash; + char *buf; + BYTE hash_buf[20]; + DWORD hash_size = sizeof(hash_buf); + int i; + static const char *hex = "0123456789abcdef"; + + if(!crypt_prov) return NULL; + + if(!CryptCreateHash(crypt_prov, CALG_SHA1, 0, 0, &hash)) return NULL; + + CryptHashData(hash, bits, dib_size, 0); + + CryptGetHashParam(hash, HP_HASHVAL, NULL, &hash_size, 0); + if(hash_size != sizeof(hash_buf)) return NULL; + + CryptGetHashParam(hash, HP_HASHVAL, hash_buf, &hash_size, 0); + CryptDestroyHash(hash); + + buf = HeapAlloc(GetProcessHeap(), 0, hash_size * 2 + 1); + + for(i = 0; i < hash_size; i++) + { + buf[i * 2] = hex[hash_buf[i] >> 4]; + buf[i * 2 + 1] = hex[hash_buf[i] & 0xf]; + } + buf[i * 2] = '\0'; + + return buf; +} + +static void init_bmi(BITMAPINFO *bmi, LONG width, LONG height, DWORD size) +{ + memset(bmi, 0, sizeof(*bmi)); + bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi->bmiHeader.biWidth = width; + bmi->bmiHeader.biHeight = height; + bmi->bmiHeader.biPlanes = 1; + bmi->bmiHeader.biBitCount = 32; + bmi->bmiHeader.biCompression = BI_RGB; + bmi->bmiHeader.biSizeImage = size; +} + +static void test_DrawDib_sizeimage(void) +{ + const struct { + LONG width, height; + DWORD size; + char hash[41]; + } test_data[] = { + /* [0] correct size */ + { WIDTH, HEIGHT, WIDTH * HEIGHT * sizeof(RGBQUAD), "bc943d5ab024b8b0118d0a80aa283055d39942b8" }, + /* [1] zero size */ + { WIDTH, HEIGHT, 0, "bc943d5ab024b8b0118d0a80aa283055d39942b8" }, + }; + HDC hdc; + DWORD src_dib_size, dst_dib_size; + BOOL r; + HBITMAP dib; + BITMAPINFO src_info, dst_info; + RGBQUAD *src_bits = NULL, *dst_bits; + HDRAWDIB hdd; + unsigned int i; + + hdc = CreateCompatibleDC(NULL); + + init_bmi(&dst_info, WIDTH, HEIGHT, 0); + dib = CreateDIBSection(NULL, &dst_info, DIB_RGB_COLORS, (void **)&dst_bits, NULL, 0); + dst_dib_size = get_dib_size(&dst_info); + ok(dib != NULL, "CreateDIBSection failed\n"); + SelectObject(hdc, dib); + + init_bmi(&src_info, WIDTH, HEIGHT, 0); + src_dib_size = get_dib_size(&src_info); + src_bits = HeapAlloc(GetProcessHeap(), 0, src_dib_size); + ok(src_bits != NULL, "Can't allocate memory\n"); + memset(src_bits, 0x88, src_dib_size); + + hdd = DrawDibOpen(); + ok(hdd != NULL, "DrawDibOpen failed\n"); + + for (i = 0; i < sizeof(test_data)/sizeof(test_data[0]); i++) { + char *hash; + memset(dst_bits, 0xff, dst_dib_size); + init_bmi(&src_info, test_data[i].width, test_data[i].height, test_data[i].size); + r = DrawDibDraw(hdd, hdc, + 0, 0, -1, -1, &src_info.bmiHeader, src_bits, + 0, 0, test_data[i].width, test_data[i].height, 0); + if (test_data[i].hash[0]) + ok(r, "[%u] DrawDibDraw failed, expected success\n", i); + else + ok(!r, "[%u] DrawDibDraw succeeded, expected failed\n", i); + if (!r || !test_data[i].hash[0]) + continue; + + hash = hash_dib(&dst_info, dst_bits); + if (!hash) { + win_skip("This platform doesn't support SHA-1 hash\n"); + continue; + } + ok(strcmp(hash, test_data[i].hash) == 0, + "[%u] got %s, expected %s\n", + i, hash, test_data[i].hash); + HeapFree(GetProcessHeap(), 0, hash); + } + + r = DrawDibClose(hdd); + ok(r, "DrawDibClose failed\n"); + + HeapFree(GetProcessHeap(), 0, src_bits); + + DeleteDC(hdc); +} + +START_TEST(drawdib) +{ + CryptAcquireContextW(&crypt_prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); + test_DrawDib_sizeimage(); + CryptReleaseContext(crypt_prov, 0); +}
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
40
41
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
Results per page:
10
25
50
100
200