winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2009
----- 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
664 discussions
Start a n
N
ew thread
Alexandre Julliard : include: Fix the SYSTEM_CACHE_INFORMATION structure for Win64.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 1f8876b1decd892f7456828b8325ceb307326350 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f8876b1decd892f7456828b8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 24 12:31:03 2009 +0200 include: Fix the SYSTEM_CACHE_INFORMATION structure for Win64. --- include/winternl.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/winternl.h b/include/winternl.h index 48fa8d0..5ebbca5 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1302,9 +1302,11 @@ typedef struct _SYSTEM_CACHE_INFORMATION { ULONG CurrentSize; ULONG PeakSize; ULONG PageFaultCount; +#ifndef _WIN64 ULONG MinimumWorkingSet; ULONG MaximumWorkingSet; ULONG unused[4]; +#endif } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION; /* System Information Class 0x17 */
1
0
0
0
Alexandre Julliard : user32/tests: Fix a couple of dimension checks on W2k3 and Vista.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 095c38e7c43862d2eeda5fb2d371f09b68260383 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=095c38e7c43862d2eeda5fb2d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 24 12:18:02 2009 +0200 user32/tests: Fix a couple of dimension checks on W2k3 and Vista. --- dlls/user32/tests/sysparams.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 0e68de4..3c94441 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -1801,9 +1801,9 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */ eq( area.left, curr_val.left, "left", "%d" ); eq( area.top, curr_val.top, "top", "%d" ); /* size may be rounded up */ - ok( area.right >= curr_val.right && area.right < curr_val.right + 8, + ok( area.right >= curr_val.right && area.right < curr_val.right + 16, "right: got %d instead of %d\n", area.right, curr_val.right ); - ok( area.bottom >= curr_val.bottom && area.bottom < curr_val.bottom + 8, + ok( area.bottom >= curr_val.bottom && area.bottom < curr_val.bottom + 16, "bottom: got %d instead of %d\n", area.bottom, curr_val.bottom ); curr_val = area; rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area, @@ -1816,9 +1816,9 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */ eq( area.left, old_area.left, "left", "%d" ); eq( area.top, old_area.top, "top", "%d" ); /* size may be rounded up */ - ok( area.right >= old_area.right && area.right < old_area.right + 8, + ok( area.right >= old_area.right && area.right < old_area.right + 16, "right: got %d instead of %d\n", area.right, old_area.right ); - ok( area.bottom >= old_area.bottom && area.bottom < old_area.bottom + 8, + ok( area.bottom >= old_area.bottom && area.bottom < old_area.bottom + 16, "bottom: got %d instead of %d\n", area.bottom, old_area.bottom ); } @@ -2667,8 +2667,10 @@ static void test_GetSystemMetrics( void) screen.cx = GetSystemMetrics( SM_CXSCREEN ); screen.cy = GetSystemMetrics( SM_CYSCREEN ); } - ok_gsm( SM_CXMAXTRACK, screen.cx + 4 + 2 * GetSystemMetrics(SM_CXFRAME)); - ok_gsm( SM_CYMAXTRACK, screen.cy + 4 + 2 * GetSystemMetrics(SM_CYFRAME)); + ok_gsm_2( SM_CXMAXTRACK, screen.cx + 4 + 2 * GetSystemMetrics(SM_CXFRAME), + screen.cx - 4 + 2 * GetSystemMetrics(SM_CXFRAME)); /* Vista */ + ok_gsm_2( SM_CYMAXTRACK, screen.cy + 4 + 2 * GetSystemMetrics(SM_CYFRAME), + screen.cy - 4 + 2 * GetSystemMetrics(SM_CYFRAME)); /* Vista */ /* the next two cannot really be tested as they depend on (application) * toolbars */ /* SM_CXMAXIMIZED */
1
0
0
0
Alexandre Julliard : advapi32/tests: Fix a couple of test failures on Vista .
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 66df782b119c07fd2179174a363a9154ea0e3215 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66df782b119c07fd2179174a3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 24 12:17:31 2009 +0200 advapi32/tests: Fix a couple of test failures on Vista. --- dlls/advapi32/tests/service.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 060a5e2..b924c69 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -307,7 +307,8 @@ static void test_create_delete_svc(void) svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, account, password); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_SERVICE_ACCOUNT, + "Expected ERROR_INVALID_PARAMETER or ERROR_INVALID_SERVICE_ACCOUNT, got %d\n", GetLastError()); /* Illegal (start-type is not a mask and should only be one of the possibilities) * Remark : 'OR'-ing them could result in a valid possibility (but doesn't make sense as @@ -1762,10 +1763,7 @@ static void test_sequence(void) SetLastError(0xdeadbeef); ret = QueryServiceConfigA(svc_handle, config, given, &needed); ok(ret, "Expected success, got error %u\n", GetLastError()); - todo_wine - { - ok(given == needed, "Expected the given (%d) and needed (%d) buffersizes to be equal\n", given, needed); - } + ok(config->lpBinaryPathName && config->lpLoadOrderGroup && config->lpDependencies && config->lpServiceStartName && config->lpDisplayName, "Expected all string struct members to be non-NULL\n"); ok(config->dwServiceType == (SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS),
1
0
0
0
Paul Vriens : gdiplus/tests: Fix test failures on Win98 by using A-functions.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 163b046ec57167ddc0cde0f0626da18d487eb39d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=163b046ec57167ddc0cde0f06…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Apr 23 21:29:22 2009 +0200 gdiplus/tests: Fix test failures on Win98 by using A-functions. --- dlls/gdiplus/tests/font.c | 87 ++++++++++++++++++++++----------------------- 1 files changed, 43 insertions(+), 44 deletions(-) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 125535d..7d6582f 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -97,7 +97,7 @@ static void test_createfont(void) static void test_logfont(void) { - LOGFONTW lfw, lfw2; + LOGFONTA lfa, lfa2; GpFont *font; GpStatus stat; GpGraphics *graphics; @@ -105,70 +105,69 @@ static void test_logfont(void) INT style; GdipCreateFromHDC(hdc, &graphics); - memset(&lfw, 0, sizeof(LOGFONTW)); - memset(&lfw2, 0xff, sizeof(LOGFONTW)); + memset(&lfa, 0, sizeof(LOGFONTA)); + memset(&lfa2, 0xff, sizeof(LOGFONTA)); /* empty FaceName */ - lfw.lfFaceName[0] = 0; - stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font); - + lfa.lfFaceName[0] = 0; + stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); expect(NotTrueTypeFont, stat); - memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR)); + lstrcpyA(lfa.lfFaceName, "Arial"); - stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font); + stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); if (stat == FileNotFound) { skip("Arial not installed.\n"); return; } expect(Ok, stat); - stat = GdipGetLogFontW(font, graphics, &lfw2); + stat = GdipGetLogFontA(font, graphics, &lfa2); expect(Ok, stat); - ok(lfw2.lfHeight < 0, "Expected negative height\n"); - expect(0, lfw2.lfWidth); - expect(0, lfw2.lfEscapement); - expect(0, lfw2.lfOrientation); - ok((lfw2.lfWeight >= 100) && (lfw2.lfWeight <= 900), "Expected weight to be set\n"); - expect(0, lfw2.lfItalic); - expect(0, lfw2.lfUnderline); - expect(0, lfw2.lfStrikeOut); - expect(GetTextCharset(hdc), lfw2.lfCharSet); - expect(0, lfw2.lfOutPrecision); - expect(0, lfw2.lfClipPrecision); - expect(0, lfw2.lfQuality); - expect(0, lfw2.lfPitchAndFamily); + ok(lfa2.lfHeight < 0, "Expected negative height\n"); + expect(0, lfa2.lfWidth); + expect(0, lfa2.lfEscapement); + expect(0, lfa2.lfOrientation); + ok((lfa2.lfWeight >= 100) && (lfa2.lfWeight <= 900), "Expected weight to be set\n"); + expect(0, lfa2.lfItalic); + expect(0, lfa2.lfUnderline); + expect(0, lfa2.lfStrikeOut); + expect(GetTextCharset(hdc), lfa2.lfCharSet); + expect(0, lfa2.lfOutPrecision); + expect(0, lfa2.lfClipPrecision); + expect(0, lfa2.lfQuality); + expect(0, lfa2.lfPitchAndFamily); GdipDeleteFont(font); - memset(&lfw, 0, sizeof(LOGFONTW)); - lfw.lfHeight = 25; - lfw.lfWidth = 25; - lfw.lfEscapement = lfw.lfOrientation = 50; - lfw.lfItalic = lfw.lfUnderline = lfw.lfStrikeOut = TRUE; + memset(&lfa, 0, sizeof(LOGFONTA)); + lfa.lfHeight = 25; + lfa.lfWidth = 25; + lfa.lfEscapement = lfa.lfOrientation = 50; + lfa.lfItalic = lfa.lfUnderline = lfa.lfStrikeOut = TRUE; - memset(&lfw2, 0xff, sizeof(LOGFONTW)); - memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR)); + memset(&lfa2, 0xff, sizeof(LOGFONTA)); + lstrcpyA(lfa.lfFaceName, "Arial"); - stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font); + stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); expect(Ok, stat); - stat = GdipGetLogFontW(font, graphics, &lfw2); + stat = GdipGetLogFontA(font, graphics, &lfa2); expect(Ok, stat); - ok(lfw2.lfHeight < 0, "Expected negative height\n"); - expect(0, lfw2.lfWidth); - expect(0, lfw2.lfEscapement); - expect(0, lfw2.lfOrientation); - ok((lfw2.lfWeight >= 100) && (lfw2.lfWeight <= 900), "Expected weight to be set\n"); - expect(TRUE, lfw2.lfItalic); - expect(TRUE, lfw2.lfUnderline); - expect(TRUE, lfw2.lfStrikeOut); - expect(GetTextCharset(hdc), lfw2.lfCharSet); - expect(0, lfw2.lfOutPrecision); - expect(0, lfw2.lfClipPrecision); - expect(0, lfw2.lfQuality); - expect(0, lfw2.lfPitchAndFamily); + ok(lfa2.lfHeight < 0, "Expected negative height\n"); + expect(0, lfa2.lfWidth); + expect(0, lfa2.lfEscapement); + expect(0, lfa2.lfOrientation); + ok((lfa2.lfWeight >= 100) && (lfa2.lfWeight <= 900), "Expected weight to be set\n"); + expect(TRUE, lfa2.lfItalic); + expect(TRUE, lfa2.lfUnderline); + expect(TRUE, lfa2.lfStrikeOut); + expect(GetTextCharset(hdc), lfa2.lfCharSet); + expect(0, lfa2.lfOutPrecision); + expect(0, lfa2.lfClipPrecision); + expect(0, lfa2.lfQuality); + expect(0, lfa2.lfPitchAndFamily); stat = GdipGetFontStyle(font, &style); expect(Ok, stat);
1
0
0
0
Paul Vriens : gdiplus: Convert lfFaceName from W to A, not the other way around.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 40f812c110b11406bd119c031990abf8ff4ab8c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40f812c110b11406bd119c031…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Apr 23 21:24:54 2009 +0200 gdiplus: Convert lfFaceName from W to A, not the other way around. --- dlls/gdiplus/font.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index f764d00..6454765 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -388,7 +388,7 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics, memcpy(lfa, &lfw, FIELD_OFFSET(LOGFONTA,lfFaceName) ); - if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE)) + if(!WideCharToMultiByte(CP_ACP, 0, lfw.lfFaceName, -1, lfa->lfFaceName, LF_FACESIZE, NULL, NULL)) return GenericError; return Ok;
1
0
0
0
Paul Vriens : gdiplus: Return the correct result in GdipCreateFontFromLogfontA.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 7bf6a3030b6eb92d795e3bdf305630b7cb5031a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7bf6a3030b6eb92d795e3bdf3…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Apr 23 21:20:11 2009 +0200 gdiplus: Return the correct result in GdipCreateFontFromLogfontA. --- dlls/gdiplus/font.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 07aaf74..f764d00 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -224,9 +224,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc, if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE)) return GenericError; - GdipCreateFontFromLogfontW(hdc, &lfw, font); - - return Ok; + return GdipCreateFontFromLogfontW(hdc, &lfw, font); } /*******************************************************************************
1
0
0
0
Paul Vriens : include: Add missing GdipGetLogFontA definition.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 73e23b823ac5ce889e304e54667b5cedbceeed15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73e23b823ac5ce889e304e546…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Apr 23 21:14:45 2009 +0200 include: Add missing GdipGetLogFontA definition. --- include/gdiplusflat.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 56540cd..158eb5e 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -82,6 +82,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC,GpFont**); GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC,GDIPCONST LOGFONTA*,GpFont**); GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**); GpStatus WINGDIPAPI GdipDeleteFont(GpFont*); +GpStatus WINGDIPAPI GdipGetLogFontA(GpFont*,GpGraphics*,LOGFONTA*); GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**); GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*);
1
0
0
0
Henri Verbeet : wined3d: Use shader_sm1_read_opcode() in shader_get_registers_used().
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 19b84ffda114b35b0c75f7694d1f946adc9f8d0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19b84ffda114b35b0c75f7694…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 24 09:17:58 2009 +0200 wined3d: Use shader_sm1_read_opcode() in shader_get_registers_used(). --- dlls/wined3d/baseshader.c | 115 +++++++++++++++++++++++++-------------------- 1 files changed, 64 insertions(+), 51 deletions(-) diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index db510bf..6bc7aac 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -384,8 +384,8 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m pshader = shader_is_pshader_version(shader_version); while (WINED3DVS_END() != *pToken) { - CONST SHADER_OPCODE* curOpcode; - DWORD opcode_token; + struct wined3d_shader_instruction ins; + UINT param_size; /* Skip comments */ if (shader_is_comment(*pToken)) @@ -397,17 +397,19 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m } /* Fetch opcode */ - opcode_token = *pToken++; - curOpcode = shader_get_opcode(shader_ins, shader_version, opcode_token); + shader_sm1_read_opcode(&pToken, &ins, ¶m_size, shader_ins, shader_version); /* Unhandled opcode, and its parameters */ - if (NULL == curOpcode) { - while (*pToken & 0x80000000) - ++pToken; + if (ins.handler_idx == WINED3DSIH_TABLE_SIZE) + { + TRACE("Skipping unrecognized instruction.\n"); + pToken += param_size; + continue; + } /* Handle declarations */ - } else if (WINED3DSIO_DCL == curOpcode->opcode) { - + if (ins.handler_idx == WINED3DSIH_DCL) + { DWORD usage = *pToken++; DWORD param = *pToken++; DWORD regtype = shader_get_regtype(param); @@ -441,9 +443,9 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m /* Save sampler usage token */ } else if (WINED3DSPR_SAMPLER == regtype) reg_maps->samplers[regnum] = usage; - - } else if (WINED3DSIO_DEF == curOpcode->opcode) { - + } + else if (ins.handler_idx == WINED3DSIH_DEF) + { local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant)); if (!lconst) return E_OUTOFMEMORY; lconst->idx = *pToken & WINED3DSP_REGNUM_MASK; @@ -464,65 +466,70 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m } list_add_head(&This->baseShader.constantsF, &lconst->entry); - pToken += curOpcode->num_params; - - } else if (WINED3DSIO_DEFI == curOpcode->opcode) { - + pToken += param_size; + } + else if (ins.handler_idx == WINED3DSIH_DEFI) + { local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant)); if (!lconst) return E_OUTOFMEMORY; lconst->idx = *pToken & WINED3DSP_REGNUM_MASK; memcpy(lconst->value, pToken + 1, 4 * sizeof(DWORD)); list_add_head(&This->baseShader.constantsI, &lconst->entry); - pToken += curOpcode->num_params; - - } else if (WINED3DSIO_DEFB == curOpcode->opcode) { - + pToken += param_size; + } + else if (ins.handler_idx == WINED3DSIH_DEFB) + { local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant)); if (!lconst) return E_OUTOFMEMORY; lconst->idx = *pToken & WINED3DSP_REGNUM_MASK; memcpy(lconst->value, pToken + 1, 1 * sizeof(DWORD)); list_add_head(&This->baseShader.constantsB, &lconst->entry); - pToken += curOpcode->num_params; - + pToken += param_size; + } /* If there's a loop in the shader */ - } else if (WINED3DSIO_LOOP == curOpcode->opcode || - WINED3DSIO_REP == curOpcode->opcode) { + else if (ins.handler_idx == WINED3DSIH_LOOP + || ins.handler_idx == WINED3DSIH_REP) + { cur_loop_depth++; if(cur_loop_depth > max_loop_depth) max_loop_depth = cur_loop_depth; - pToken += curOpcode->num_params; + pToken += param_size; /* Rep and Loop always use an integer constant for the control parameters */ This->baseShader.uses_int_consts = TRUE; - } else if (WINED3DSIO_ENDLOOP == curOpcode->opcode || - WINED3DSIO_ENDREP == curOpcode->opcode) { + } + else if (ins.handler_idx == WINED3DSIH_ENDLOOP + || ins.handler_idx == WINED3DSIH_ENDREP) + { cur_loop_depth--; - + } /* For subroutine prototypes */ - } else if (WINED3DSIO_LABEL == curOpcode->opcode) { + else if (ins.handler_idx == WINED3DSIH_LABEL) + { DWORD snum = *pToken & WINED3DSP_REGNUM_MASK; reg_maps->labels[snum] = 1; - pToken += curOpcode->num_params; - + pToken += param_size; + } /* Set texture, address, temporary registers */ - } else { + else + { int i, limit; /* Declare 1.X samplers implicitly, based on the destination reg. number */ if (WINED3DSHADER_VERSION_MAJOR(shader_version) == 1 && pshader /* Filter different instructions with the same enum values in VS */ - && (WINED3DSIO_TEX == curOpcode->opcode - || WINED3DSIO_TEXBEM == curOpcode->opcode - || WINED3DSIO_TEXBEML == curOpcode->opcode - || WINED3DSIO_TEXDP3TEX == curOpcode->opcode - || WINED3DSIO_TEXM3x2TEX == curOpcode->opcode - || WINED3DSIO_TEXM3x3SPEC == curOpcode->opcode - || WINED3DSIO_TEXM3x3TEX == curOpcode->opcode - || WINED3DSIO_TEXM3x3VSPEC == curOpcode->opcode - || WINED3DSIO_TEXREG2AR == curOpcode->opcode - || WINED3DSIO_TEXREG2GB == curOpcode->opcode - || WINED3DSIO_TEXREG2RGB == curOpcode->opcode)) + && (ins.handler_idx == WINED3DSIH_TEX + || ins.handler_idx == WINED3DSIH_TEXBEM + || ins.handler_idx == WINED3DSIH_TEXBEML + || ins.handler_idx == WINED3DSIH_TEXDP3TEX + || ins.handler_idx == WINED3DSIH_TEXM3x2TEX + || ins.handler_idx == WINED3DSIH_TEXM3x3SPEC + || ins.handler_idx == WINED3DSIH_TEXM3x3TEX + || ins.handler_idx == WINED3DSIH_TEXM3x3VSPEC + || ins.handler_idx == WINED3DSIH_TEXREG2AR + || ins.handler_idx == WINED3DSIH_TEXREG2GB + || ins.handler_idx == WINED3DSIH_TEXREG2RGB)) { /* Fake sampler usage, only set reserved bit and ttype */ DWORD sampler_code = *pToken & WINED3DSP_REGNUM_MASK; @@ -531,20 +538,27 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_2D; /* texbem is only valid with < 1.4 pixel shaders */ - if(WINED3DSIO_TEXBEM == curOpcode->opcode || - WINED3DSIO_TEXBEML == curOpcode->opcode) { + if (ins.handler_idx == WINED3DSIH_TEXBEM + || ins.handler_idx == WINED3DSIH_TEXBEML) + { reg_maps->bumpmat[sampler_code] = TRUE; - if(WINED3DSIO_TEXBEML == curOpcode->opcode) { + if (ins.handler_idx == WINED3DSIH_TEXBEML) + { reg_maps->luminanceparams[sampler_code] = TRUE; } } } - if(WINED3DSIO_NRM == curOpcode->opcode) { + if (ins.handler_idx == WINED3DSIH_NRM) + { reg_maps->usesnrm = 1; - } else if(WINED3DSIO_BEM == curOpcode->opcode && pshader) { + } + else if (pshader && ins.handler_idx == WINED3DSIH_BEM) + { DWORD regnum = *pToken & WINED3DSP_REGNUM_MASK; reg_maps->bumpmat[regnum] = TRUE; - } else if(WINED3DSIO_DSY == curOpcode->opcode) { + } + else if (ins.handler_idx == WINED3DSIH_DSY) + { reg_maps->usesdsy = 1; } @@ -555,8 +569,7 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m * okay, since we'll catch any address registers when * they are initialized (required by spec) */ - limit = (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED)? - curOpcode->num_params + 1: curOpcode->num_params; + limit = ins.dst_count + ins.src_count + (ins.predicate ? 1 : 0); for (i = 0; i < limit; ++i) {
1
0
0
0
Henri Verbeet : wined3d: Add a function to read an opcode from SM1-3 bytecode.
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: 521fcf11db8a82fcfe7df380d9dde81c4285d1da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=521fcf11db8a82fcfe7df380d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 24 09:17:58 2009 +0200 wined3d: Add a function to read an opcode from SM1-3 bytecode. --- dlls/wined3d/baseshader.c | 246 ++++++++++++++++++++++++--------------------- 1 files changed, 131 insertions(+), 115 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=521fcf11db8a82fcfe7df…
1
0
0
0
Henri Verbeet : wined3d: The first shader token should be the version token .
by Alexandre Julliard
24 Apr '09
24 Apr '09
Module: wine Branch: master Commit: e63bd2ce21ba7b2f5fc254209e19124a07eb97fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e63bd2ce21ba7b2f5fc254209…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 24 09:17:58 2009 +0200 wined3d: The first shader token should be the version token. --- dlls/wined3d/baseshader.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index 1cb5a12..a7c2a50 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -911,17 +911,16 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, ins.src = src_param; This->baseShader.parse_state.current_row = 0; + if (!shader_is_version_token(*pToken++)) + { + ERR("First token is not a version token, invalid shader.\n"); + return; + } + while (WINED3DPS_END() != *pToken) { DWORD opcode_token; - /* Skip version token */ - if (shader_is_version_token(*pToken)) - { - ++pToken; - continue; - } - /* Skip comment tokens */ if (shader_is_comment(*pToken)) {
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
67
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
Results per page:
10
25
50
100
200