winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2007
----- 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
4 participants
839 discussions
Start a n
N
ew thread
H. Verbeet : wined3d: Add WINED3DDTCAPS flags and use them.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: db8da81e67e27fa32aade74a0814150f71bffd87 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db8da81e67e27fa32aade74a0…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Feb 15 13:31:35 2007 +0100 wined3d: Add WINED3DDTCAPS flags and use them. --- dlls/wined3d/directx.c | 14 +++++++------- include/wine/wined3d_caps.h | 11 +++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3a36d56..97b2f9d 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2280,13 +2280,13 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, * don't advertise it yet as I'm not sure how we handle it. * We might need to add some clamping in the shader engine to * support it. - * TODO: D3DDTCAPS_USHORT2N, D3DDTCAPS_USHORT4N, D3DDTCAPS_UDEC3, D3DDTCAPS_DEC3N */ - *pCaps->DeclTypes = D3DDTCAPS_UBYTE4 | - D3DDTCAPS_UBYTE4N | - D3DDTCAPS_SHORT2N | - D3DDTCAPS_SHORT4N | - D3DDTCAPS_FLOAT16_2 | - D3DDTCAPS_FLOAT16_4; + * TODO: WINED3DDTCAPS_USHORT2N, WINED3DDTCAPS_USHORT4N, WINED3DDTCAPS_UDEC3, WINED3DDTCAPS_DEC3N */ + *pCaps->DeclTypes = WINED3DDTCAPS_UBYTE4 | + WINED3DDTCAPS_UBYTE4N | + WINED3DDTCAPS_SHORT2N | + WINED3DDTCAPS_SHORT4N | + WINED3DDTCAPS_FLOAT16_2 | + WINED3DDTCAPS_FLOAT16_4; } else *pCaps->DeclTypes = 0; diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 5cb95dd..1a94b27 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -19,6 +19,17 @@ #ifndef __WINE_WINED3D_CAPS_H #define __WINE_WINED3D_CAPS_H +#define WINED3DDTCAPS_UBYTE4 0x00000001 +#define WINED3DDTCAPS_UBYTE4N 0x00000002 +#define WINED3DDTCAPS_SHORT2N 0x00000004 +#define WINED3DDTCAPS_SHORT4N 0x00000008 +#define WINED3DDTCAPS_USHORT2N 0x00000010 +#define WINED3DDTCAPS_USHORT4N 0x00000020 +#define WINED3DDTCAPS_UDEC3 0x00000040 +#define WINED3DDTCAPS_DEC3N 0x00000080 +#define WINED3DDTCAPS_FLOAT16_2 0x00000100 +#define WINED3DDTCAPS_FLOAT16_4 0x00000200 + #define WINED3DLINECAPS_TEXTURE 0x00000001 #define WINED3DLINECAPS_ZTEST 0x00000002 #define WINED3DLINECAPS_BLEND 0x00000004
1
0
0
0
H. Verbeet : wined3d: Add WINED3DLINECAPS flags and use them.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: da354c6dfa5f1b09ec15ee92717b3f367bfbdbf0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da354c6dfa5f1b09ec15ee927…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Feb 15 13:31:26 2007 +0100 wined3d: Add WINED3DLINECAPS flags and use them. --- dlls/wined3d/directx.c | 10 +++++----- include/wine/wined3d_caps.h | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9e128bf..3a36d56 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2093,12 +2093,12 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, } else *pCaps->VolumeTextureAddressCaps = 0; - *pCaps->LineCaps = D3DLINECAPS_TEXTURE | - D3DLINECAPS_ZTEST; + *pCaps->LineCaps = WINED3DLINECAPS_TEXTURE | + WINED3DLINECAPS_ZTEST; /* FIXME: Add - D3DLINECAPS_BLEND - D3DLINECAPS_ALPHACMP - D3DLINECAPS_FOG */ + WINED3DLINECAPS_BLEND + WINED3DLINECAPS_ALPHACMP + WINED3DLINECAPS_FOG */ *pCaps->MaxTextureWidth = GL_LIMITS(texture_size); *pCaps->MaxTextureHeight = GL_LIMITS(texture_size); diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 8456705..5cb95dd 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -19,6 +19,12 @@ #ifndef __WINE_WINED3D_CAPS_H #define __WINE_WINED3D_CAPS_H +#define WINED3DLINECAPS_TEXTURE 0x00000001 +#define WINED3DLINECAPS_ZTEST 0x00000002 +#define WINED3DLINECAPS_BLEND 0x00000004 +#define WINED3DLINECAPS_ALPHACMP 0x00000008 +#define WINED3DLINECAPS_FOG 0x00000010 + #define WINED3DPBLENDCAPS_ZERO 0x00000001 #define WINED3DPBLENDCAPS_ONE 0x00000002 #define WINED3DPBLENDCAPS_SRCCOLOR 0x00000004
1
0
0
0
Dmitry Timoshkov : comctl32: Change internal imagelist bitmap storage in the way applications with pre-compiled imagelists expect it .
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 79909e7e5ac29804c4b691d1859a02c4c877a11d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79909e7e5ac29804c4b691d18…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Feb 15 19:46:26 2007 +0800 comctl32: Change internal imagelist bitmap storage in the way applications with pre-compiled imagelists expect it. --- dlls/comctl32/imagelist.c | 50 ++++++++++++++++++++++---------------------- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index b24c4e7..0e314dd 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -77,7 +77,7 @@ typedef struct static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 }; -static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count, UINT height); +static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count, UINT width); static inline BOOL is_valid(HIMAGELIST himl) { @@ -97,21 +97,21 @@ static inline BOOL is_valid(HIMAGELIST himl) #define TILE_COUNT 4 -static inline UINT imagelist_width( UINT count ) +static inline UINT imagelist_height( UINT count ) { return ((count + TILE_COUNT - 1)/TILE_COUNT); } static inline void imagelist_point_from_index( HIMAGELIST himl, UINT index, LPPOINT pt ) { - pt->x = (index/TILE_COUNT) * himl->cx; - pt->y = (index%TILE_COUNT) * himl->cy; + pt->x = (index%TILE_COUNT) * himl->cx; + pt->y = (index/TILE_COUNT) * himl->cy; } -static inline void imagelist_get_bitmap_size( HIMAGELIST himl, UINT count, UINT cy, SIZE *sz ) +static inline void imagelist_get_bitmap_size( HIMAGELIST himl, UINT count, UINT cx, SIZE *sz ) { - sz->cx = imagelist_width( count ) * himl->cx; - sz->cy = cy*TILE_COUNT; + sz->cx = cx * TILE_COUNT; + sz->cy = imagelist_height( count ) * himl->cy; } /* @@ -131,8 +131,8 @@ static inline void imagelist_copy_images( HIMAGELIST himl, HDC hdcSrc, HDC hdcDe { imagelist_point_from_index( himl, src+i, &ptSrc ); imagelist_point_from_index( himl, dest+i, &ptDest ); - sz.cx = himl->cx * imagelist_width( count - i ); - sz.cy = himl->cy; + sz.cx = himl->cx; + sz.cy = himl->cy * imagelist_height( count - i ); BitBlt( hdcDest, ptDest.x, ptDest.y, sz.cx, sz.cy, hdcSrc, ptSrc.x, ptSrc.y, SRCCOPY ); @@ -166,15 +166,15 @@ IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cx, INT c && (himl->cy >= cy)) return; - if (cy == 0) cy = himl->cy; + if (cx == 0) cx = himl->cx; nNewCount = himl->cCurImage + nImageCount + himl->cGrow; - imagelist_get_bitmap_size(himl, nNewCount, cy, &sz); + imagelist_get_bitmap_size(himl, nNewCount, cx, &sz); TRACE("Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n", himl, sz.cx, cy, nNewCount); hdcBitmap = CreateCompatibleDC (0); - hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, cy); + hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, cx); if (hbmNewBitmap == 0) ERR("creating new image bitmap (x=%d y=%d)!\n", sz.cx, cy); @@ -638,7 +638,7 @@ ImageList_Create (INT cx, INT cy, UINT flags, himl->uBitsPixel = (UINT)GetDeviceCaps (himl->hdcImage, BITSPIXEL); if (himl->cMaxImage > 0) { - himl->hbmImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage, cy); + himl->hbmImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage, cx); SelectObject(himl->hdcImage, himl->hbmImage); } else himl->hbmImage = 0; @@ -646,7 +646,7 @@ ImageList_Create (INT cx, INT cy, UINT flags, if ((himl->cMaxImage > 0) && (himl->flags & ILC_MASK)) { SIZE sz; - imagelist_get_bitmap_size(himl, himl->cMaxImage, himl->cy, &sz); + imagelist_get_bitmap_size(himl, himl->cMaxImage, himl->cx, &sz); himl->hbmMask = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL); if (himl->hbmMask == 0) { ERR("Error creating mask bitmap!\n"); @@ -1307,7 +1307,7 @@ ImageList_Duplicate (HIMAGELIST himlSrc) { SIZE sz; - imagelist_get_bitmap_size(himlSrc, himlSrc->cCurImage, himlSrc->cy, &sz); + imagelist_get_bitmap_size(himlSrc, himlSrc->cCurImage, himlSrc->cx, &sz); BitBlt (himlDst->hdcImage, 0, 0, sz.cx, sz.cy, himlSrc->hdcImage, 0, 0, SRCCOPY); @@ -2072,14 +2072,14 @@ ImageList_Remove (HIMAGELIST himl, INT i) for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++) himl->nOvlIdx[nCount] = -1; - hbmNewImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage, himl->cy); + hbmNewImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage, himl->cx); SelectObject (himl->hdcImage, hbmNewImage); DeleteObject (himl->hbmImage); himl->hbmImage = hbmNewImage; if (himl->hbmMask) { - imagelist_get_bitmap_size(himl, himl->cMaxImage, himl->cy, &sz); + imagelist_get_bitmap_size(himl, himl->cMaxImage, himl->cx, &sz); hbmNewMask = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL); SelectObject (himl->hdcMask, hbmNewMask); DeleteObject (himl->hbmMask); @@ -2098,9 +2098,9 @@ ImageList_Remove (HIMAGELIST himl, INT i) TRACE(" - Max. number of images: %d / %d (Old/New)\n", himl->cMaxImage, himl->cCurImage + himl->cGrow - 1); - hbmNewImage = ImageList_CreateImage(himl->hdcImage, himl, nCount, himl->cy); + hbmNewImage = ImageList_CreateImage(himl->hdcImage, himl, nCount, himl->cx); - imagelist_get_bitmap_size(himl, nCount, himl->cy, &sz ); + imagelist_get_bitmap_size(himl, nCount, himl->cx, &sz ); if (himl->hbmMask) hbmNewMask = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL); else @@ -2524,14 +2524,14 @@ ImageList_SetIconSize (HIMAGELIST himl, INT cx, INT cy) for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++) himl->nOvlIdx[nCount] = -1; - hbmNew = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage, himl->cy); + hbmNew = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage, himl->cx); SelectObject (himl->hdcImage, hbmNew); DeleteObject (himl->hbmImage); himl->hbmImage = hbmNew; if (himl->hbmMask) { SIZE sz; - imagelist_get_bitmap_size(himl, himl->cMaxImage, himl->cy, &sz); + imagelist_get_bitmap_size(himl, himl->cMaxImage, himl->cx, &sz); hbmNew = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL); SelectObject (himl->hdcMask, hbmNew); DeleteObject (himl->hbmMask); @@ -2581,7 +2581,7 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount) hdcBitmap = CreateCompatibleDC (0); - hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, himl->cy); + hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, himl->cx); if (hbmNewBitmap != 0) { @@ -2600,7 +2600,7 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount) if (himl->hbmMask) { SIZE sz; - imagelist_get_bitmap_size( himl, nNewCount, himl->cy, &sz ); + imagelist_get_bitmap_size( himl, nNewCount, himl->cx, &sz ); hbmNewBitmap = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL); if (hbmNewBitmap != 0) { @@ -2798,13 +2798,13 @@ ImageList_Write (HIMAGELIST himl, LPSTREAM pstm) } -static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count, UINT height) +static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count, UINT width) { HBITMAP hbmNewBitmap; UINT ilc = (himl->flags & 0xFE); SIZE sz; - imagelist_get_bitmap_size( himl, count, height, &sz ); + imagelist_get_bitmap_size( himl, count, width, &sz ); if ((ilc >= ILC_COLOR4 && ilc <= ILC_COLOR32) || ilc == ILC_COLOR) {
1
0
0
0
Vitaliy Margolen : advapi32: Add more tests for DuplicateHandle security.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 78a28e6043fa9d84ad211b4970b3c6e4d616502b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=78a28e6043fa9d84ad211b497…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Feb 6 21:55:24 2007 -0700 advapi32: Add more tests for DuplicateHandle security. --- dlls/advapi32/tests/security.c | 84 +++++++++++++++++++++++++++++++++------- 1 files changed, 70 insertions(+), 14 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index bb5954c..89989f2 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1375,17 +1375,33 @@ static void test_granted_access(HANDLE handle, ACCESS_MASK access, int line) "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess); } +#define CHECK_SET_SECURITY(o,i,e) \ + do{ \ + BOOL res; \ + DWORD err; \ + SetLastError( 0xdeadbeef ); \ + res = SetKernelObjectSecurity( o, i, SecurityDescriptor ); \ + err = GetLastError(); \ + if (e == ERROR_SUCCESS) \ + ok(res, "SetKernelObjectSecurity failed with %d\n", err); \ + else \ + ok(!res && err == e, "SetKernelObjectSecurity should have failed " \ + "with %s, instead of %d\n", #e, err); \ + }while(0) + static void test_process_security(void) { BOOL res; + char owner[32], group[32]; PSID AdminSid = NULL, UsersSid = NULL; PACL Acl = NULL; SECURITY_DESCRIPTOR *SecurityDescriptor = NULL; - SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; char buffer[MAX_PATH]; PROCESS_INFORMATION info; STARTUPINFOA startup; SECURITY_ATTRIBUTES psa; + HANDLE token, event; + DWORD tmp; Acl = HeapAlloc(GetProcessHeap(), 0, 256); res = InitializeAcl(Acl, 256, ACL_REVISION); @@ -1396,12 +1412,20 @@ static void test_process_security(void) } ok(res, "InitializeAcl failed with error %d\n", GetLastError()); - res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdminSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + /* get owner from the token we might be running as a user not admin */ + res = OpenProcessToken( GetCurrentProcess(), MAXIMUM_ALLOWED, &token ); + ok(res, "OpenProcessToken failed with error %d\n", GetLastError()); + if (!res) return; + + res = GetTokenInformation( token, TokenOwner, owner, sizeof(owner), &tmp ); + ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); + AdminSid = ((TOKEN_OWNER*)owner)->Owner; + res = GetTokenInformation( token, TokenPrimaryGroup, group, sizeof(group), &tmp ); + ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); + UsersSid = ((TOKEN_PRIMARY_GROUP*)group)->PrimaryGroup; + + CloseHandle( token ); + if (!res) return; res = AddAccessDeniedAce(Acl, ACL_REVISION, PROCESS_VM_READ, AdminSid); ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError()); @@ -1412,14 +1436,24 @@ static void test_process_security(void) res = InitializeSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); ok(res, "InitializeSecurityDescriptor failed with error %d\n", GetLastError()); + event = CreateEvent( NULL, TRUE, TRUE, "test_event" ); + ok(event != NULL, "CreateEvent %d\n", GetLastError()); + + CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_INVALID_SECURITY_DESCR ); + CHECK_SET_SECURITY( event, GROUP_SECURITY_INFORMATION, ERROR_INVALID_SECURITY_DESCR ); + CHECK_SET_SECURITY( event, SACL_SECURITY_INFORMATION, ERROR_ACCESS_DENIED ); + CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); + /* Set owner and group and dacl */ res = SetSecurityDescriptorOwner(SecurityDescriptor, AdminSid, FALSE); ok(res, "SetSecurityDescriptorOwner failed with error %d\n", GetLastError()); - res = SetSecurityDescriptorGroup(SecurityDescriptor, UsersSid, TRUE); + CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_SUCCESS ); + res = SetSecurityDescriptorGroup(SecurityDescriptor, UsersSid, FALSE); ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + CHECK_SET_SECURITY( event, GROUP_SECURITY_INFORMATION, ERROR_SUCCESS ); res = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); - + CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); sprintf(buffer, "%s tests/security.c test", myARGV[0]); memset(&startup, 0, sizeof(startup)); @@ -1437,8 +1471,7 @@ static void test_process_security(void) TEST_GRANTED_ACCESS( info.hProcess, PROCESS_ALL_ACCESS ); ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - if (AdminSid) FreeSid(AdminSid); - if (UsersSid) FreeSid(UsersSid); + CloseHandle( event ); HeapFree(GetProcessHeap(), 0, Acl); HeapFree(GetProcessHeap(), 0, SecurityDescriptor); } @@ -1446,17 +1479,28 @@ static void test_process_security(void) static void test_process_security_child(void) { HANDLE handle, handle1; + BOOL ret; + DWORD err; handle = OpenProcess( PROCESS_TERMINATE, FALSE, GetCurrentProcessId() ); ok(handle != NULL, "OpenProcess(PROCESS_TERMINATE) with err:%d\n", GetLastError()); TEST_GRANTED_ACCESS( handle, PROCESS_TERMINATE ); ok(DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), - &handle1, PROCESS_ALL_ACCESS, TRUE, DUPLICATE_SAME_ACCESS), + &handle1, 0, TRUE, DUPLICATE_SAME_ACCESS ), "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( handle, PROCESS_TERMINATE ); + TEST_GRANTED_ACCESS( handle1, PROCESS_TERMINATE ); CloseHandle( handle1 ); + + SetLastError( 0xdeadbeef ); + ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), + &handle1, PROCESS_ALL_ACCESS, TRUE, 0 ); + err = GetLastError(); + todo_wine + ok(!ret && err == ERROR_ACCESS_DENIED, "duplicating handle should have failed " + "with STATUS_ACCESS_DENIED, instead of err:%d\n", err); + CloseHandle( handle ); /* These two should fail - they are denied by ACL */ @@ -1469,11 +1513,23 @@ static void test_process_security_child(void) /* Documented privilege elevation */ ok(DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), - &handle, PROCESS_ALL_ACCESS, TRUE, DUPLICATE_SAME_ACCESS), + &handle, 0, TRUE, DUPLICATE_SAME_ACCESS ), "duplicating handle err:%d\n", GetLastError()); TEST_GRANTED_ACCESS( handle, PROCESS_ALL_ACCESS ); CloseHandle( handle ); + + /* Same only explicitly asking for all access rights */ + ok(DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), + &handle, PROCESS_ALL_ACCESS, TRUE, 0 ), + "duplicating handle err:%d\n", GetLastError()); + TEST_GRANTED_ACCESS( handle, PROCESS_ALL_ACCESS ); + ok(DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), + &handle1, PROCESS_VM_READ, TRUE, 0 ), + "duplicating handle err:%d\n", GetLastError()); + TEST_GRANTED_ACCESS( handle1, PROCESS_VM_READ ); + CloseHandle( handle1 ); + CloseHandle( handle ); } START_TEST(security)
1
0
0
0
Vitaliy Margolen : ntdll/server: Implement NtSetSecurityObject. With tests.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: b0e9d7e0b59d902af27bc0b9a205592eadfce86d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0e9d7e0b59d902af27bc0b9a…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Feb 7 21:43:11 2007 -0700 ntdll/server: Implement NtSetSecurityObject. With tests. --- dlls/ntdll/sec.c | 81 ++++++++++++++++++++++++++--- include/wine/server_protocol.h | 17 ++++++- server/protocol.def | 6 ++ server/request.h | 2 + server/token.c | 114 ++++++++++++++++++++++++++++++++++++++++ server/trace.c | 11 ++++ 6 files changed, 223 insertions(+), 8 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b0e9d7e0b59d902af27bc…
1
0
0
0
Vitaliy Margolen : server: Add security descriptor field to object struct.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 5ec1718d745ef795ac890f4580e34a0b44bbc94d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ec1718d745ef795ac890f458…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Feb 6 21:44:15 2007 -0700 server: Add security descriptor field to object struct. --- server/object.c | 2 ++ server/object.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/server/object.c b/server/object.c index 63465f2..095d018 100644 --- a/server/object.c +++ b/server/object.c @@ -178,6 +178,7 @@ void *alloc_object( const struct object_ops *ops ) obj->refcount = 1; obj->ops = ops; obj->name = NULL; + obj->sd = NULL; list_init( &obj->wait_queue ); #ifdef DEBUG_OBJECTS list_add_head( &object_list, &obj->obj_list ); @@ -278,6 +279,7 @@ void release_object( void *ptr ) assert( list_empty( &obj->wait_queue )); obj->ops->destroy( obj ); if (obj->name) free_name( obj ); + free( obj->sd ); #ifdef DEBUG_OBJECTS list_remove( &obj->obj_list ); memset( obj, 0xaa, obj->ops->size ); diff --git a/server/object.h b/server/object.h index 1a75e4c..a2d7029 100644 --- a/server/object.h +++ b/server/object.h @@ -88,6 +88,7 @@ struct object const struct object_ops *ops; struct list wait_queue; struct object_name *name; + struct security_descriptor *sd; #ifdef DEBUG_OBJECTS struct list obj_list; #endif
1
0
0
0
Pedro Araujo Chaves Jr : gdi32: Fix for GetTextExtentExPointW() and ExtTextOutW().
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 2051bcccca872da2a975dfe987622ed3dab9f881 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2051bcccca872da2a975dfe98…
Author: Pedro Araujo Chaves Jr <inckie(a)gmail.com> Date: Thu Feb 8 13:12:08 2007 -0200 gdi32: Fix for GetTextExtentExPointW() and ExtTextOutW(). --- dlls/gdi32/font.c | 53 +++++++++++++++++--- dlls/gdi32/tests/font.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 876e49a..f237612 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -1231,6 +1231,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, LPINT dxs = NULL; DC *dc; BOOL ret = FALSE; + TEXTMETRICW tm; TRACE("(%p, %s, %d)\n",hdc,debugstr_wn(str,count),maxExt); @@ -1238,6 +1239,8 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, if (! dc) return FALSE; + GetTextMetricsW(hdc, &tm); + /* If we need to calculate nFit, then we need the partial extents even if the user hasn't provided us with an array. */ if (lpnFit) @@ -1263,22 +1266,49 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, /* Perform device size to world size transformations. */ if (ret) { - INT extra = dc->charExtra, breakRem = dc->breakRem; + INT extra = dc->charExtra, + breakExtra = dc->breakExtra, + breakRem = dc->breakRem, + i; if (dxs) { - INT i; for (i = 0; i < count; ++i) { dxs[i] = abs(INTERNAL_XDSTOWS(dc, dxs[i])); - dxs[i] += (i+1) * extra + breakRem; + dxs[i] += (i+1) * extra; + if (count > 1 && (breakExtra || breakRem) && str[i] == tm.tmBreakChar) + { + dxs[i] += breakExtra; + if (breakRem > 0) + { + breakRem--; + dxs[i]++; + } + } if (dxs[i] <= maxExt) ++nFit; } + breakRem = dc->breakRem; } size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx)); size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy)); - size->cx += count * extra + breakRem; + + if (!dxs && count > 1 && (breakExtra || breakRem)) + { + for (i = 0; i < count; i++) + { + if (str[i] == tm.tmBreakChar) + { + size->cx += breakExtra; + if (breakRem > 0) + { + breakRem--; + (size->cx)++; + } + } + } + } } if (lpnFit) @@ -1812,12 +1842,15 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, SIZE sz; RECT rc; BOOL done_extents = FALSE; - INT width, xwidth = 0, ywidth = 0; + INT width = 0, xwidth = 0, ywidth = 0; DWORD type; DC * dc = DC_GetDCUpdate( hdc ); + INT breakRem; if (!dc) return FALSE; + breakRem = dc->breakRem; + if (flags & (ETO_NUMERICSLOCAL | ETO_NUMERICSLATIN | ETO_PDY)) FIXME("flags ETO_NUMERICSLOCAL | ETO_NUMERICSLATIN | ETO_PDY unimplemented\n"); @@ -1927,8 +1960,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, y = pt.y; char_extra = GetTextCharacterExtra(hdc); - width = 0; - if(char_extra || dc->breakExtra || lpDx) + if(char_extra || dc->breakExtra || breakRem || lpDx) { UINT i; SIZE tmpsz; @@ -1949,9 +1981,14 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, deltas[i] = tmpsz.cx; } - if (!(flags & ETO_GLYPH_INDEX) && dc->breakExtra && reordered_str[i] == tm.tmBreakChar) + if (!(flags & ETO_GLYPH_INDEX) && (dc->breakExtra || breakRem) && reordered_str[i] == tm.tmBreakChar) { deltas[i] = deltas[i] + dc->breakExtra; + if (breakRem > 0) + { + breakRem--; + deltas[i]++; + } } deltas[i] = INTERNAL_XWSTODS(dc, deltas[i]); width += deltas[i]; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 5dddf3a..e8e2527 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -887,6 +887,129 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count return TRUE; } +static void testJustification(HDC hdc, PSTR str, RECT *clientArea) +{ + INT x, y, + breakCount, + outputWidth = 0, /* to test TabbedTextOut() */ + justifiedWidth = 0, /* to test GetTextExtentExPointW() */ + areaWidth = clientArea->right - clientArea->left, + nErrors = 0, e; + BOOL lastExtent = FALSE; + PSTR pFirstChar, pLastChar; + SIZE size; + TEXTMETRICA tm; + struct err + { + char extent[100]; + int GetTextExtentExPointWWidth; + int TabbedTextOutWidth; + } error[10]; + + GetTextMetricsA(hdc, &tm); + y = clientArea->top; + do { + breakCount = 0; + while (*str == tm.tmBreakChar) str++; /* skip leading break chars */ + pFirstChar = str; + + do { + pLastChar = str; + + /* if not at the end of the string, ... */ + if (*str == '\0') break; + /* ... add the next word to the current extent */ + while (*str != '\0' && *str++ != tm.tmBreakChar); + breakCount++; + SetTextJustification(hdc, 0, 0); + GetTextExtentPoint32(hdc, pFirstChar, str - pFirstChar - 1, &size); + } while ((int) size.cx < areaWidth); + + /* ignore trailing break chars */ + breakCount--; + while (*(pLastChar - 1) == tm.tmBreakChar) + { + pLastChar--; + breakCount--; + } + + if (*str == '\0' || breakCount <= 0) pLastChar = str; + + SetTextJustification(hdc, 0, 0); + GetTextExtentPoint32(hdc, pFirstChar, pLastChar - pFirstChar, &size); + + /* do not justify the last extent */ + if (*str != '\0' && breakCount > 0) + { + SetTextJustification(hdc, areaWidth - size.cx, breakCount); + GetTextExtentPoint32(hdc, pFirstChar, pLastChar - pFirstChar, &size); + justifiedWidth = size.cx; + } + else lastExtent = TRUE; + + x = clientArea->left; + + outputWidth = LOWORD(TabbedTextOut( + hdc, x, y, pFirstChar, pLastChar - pFirstChar, + 0, NULL, 0)); + /* catch errors and report them */ + if (!lastExtent && ((outputWidth != areaWidth) || (justifiedWidth != areaWidth))) + { + memset(error[nErrors].extent, 0, 100); + memcpy(error[nErrors].extent, pFirstChar, pLastChar - pFirstChar); + error[nErrors].TabbedTextOutWidth = outputWidth; + error[nErrors].GetTextExtentExPointWWidth = justifiedWidth; + nErrors++; + } + + y += size.cy; + str = pLastChar; + } while (*str && y < clientArea->bottom); + + for (e = 0; e < nErrors; e++) + { + ok(error[e].TabbedTextOutWidth == areaWidth, + "The output text (\"%s\") width should be %d, not %d.\n", + error[e].extent, areaWidth, error[e].TabbedTextOutWidth); + /* The width returned by GetTextExtentPoint32() is exactly the same + returned by GetTextExtentExPointW() - see dlls/gdi32/font.c */ + ok(error[e].GetTextExtentExPointWWidth == areaWidth, + "GetTextExtentPointW() for \"%s\" should have returned a width of %d, not %d.\n", + error[e].extent, areaWidth, error[e].GetTextExtentExPointWWidth); + } +} + +static void test_SetTextJustification(void) +{ + HDC hdc = GetDC(0); + RECT clientArea = {0, 0, 400, 400}; + LOGFONTA lf; + HFONT hfont; + static char testText[] = + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut " + "enim ad minim veniam, quis nostrud exercitation ullamco laboris " + "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in " + "reprehenderit in voluptate velit esse cillum dolore eu fugiat " + "nulla pariatur. Excepteur sint occaecat cupidatat non proident, " + "sunt in culpa qui officia deserunt mollit anim id est laborum."; + + memset(&lf, 0, sizeof lf); + lf.lfCharSet = ANSI_CHARSET; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfWeight = FW_DONTCARE; + lf.lfHeight = 20; + lf.lfQuality = DEFAULT_QUALITY; + lstrcpyA(lf.lfFaceName, "Times New Roman"); + hfont = create_font("Times New Roman", &lf); + SelectObject(hdc, hfont); + + testJustification(hdc, testText, &clientArea); + + DeleteObject(hfont); + ReleaseDC(0, hdc); +} + static void test_font_charset(void) { static struct charset_data @@ -940,5 +1063,6 @@ START_TEST(font) test_GetGlyphIndices(); test_GetKerningPairs(); test_GetOutlineTextMetrics(); + test_SetTextJustification(); test_font_charset(); }
1
0
0
0
H. Verbeet : wined3d: Add WINED3DPTADDRESSCAPS flags and use them.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 5c398c571fb468e29169f1ada469562efdb9b699 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c398c571fb468e29169f1ada…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Wed Feb 14 23:31:18 2007 +0100 wined3d: Add WINED3DPTADDRESSCAPS flags and use them. --- dlls/wined3d/directx.c | 24 ++++++++++++------------ include/wine/wined3d_caps.h | 7 +++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c71ce5b..9e128bf 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2063,32 +2063,32 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, } else *pCaps->VolumeTextureFilterCaps = 0; - *pCaps->TextureAddressCaps = D3DPTADDRESSCAPS_INDEPENDENTUV | - D3DPTADDRESSCAPS_CLAMP | - D3DPTADDRESSCAPS_WRAP; + *pCaps->TextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | + WINED3DPTADDRESSCAPS_CLAMP | + WINED3DPTADDRESSCAPS_WRAP; if (GL_SUPPORT(ARB_TEXTURE_BORDER_CLAMP)) { - *pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_BORDER; + *pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; } if (GL_SUPPORT(ARB_TEXTURE_MIRRORED_REPEAT)) { - *pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRROR; + *pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; } if (GL_SUPPORT(ATI_TEXTURE_MIRROR_ONCE)) { - *pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE; + *pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; } if (GL_SUPPORT(EXT_TEXTURE3D)) { - *pCaps->VolumeTextureAddressCaps = D3DPTADDRESSCAPS_INDEPENDENTUV | - D3DPTADDRESSCAPS_CLAMP | - D3DPTADDRESSCAPS_WRAP; + *pCaps->VolumeTextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | + WINED3DPTADDRESSCAPS_CLAMP | + WINED3DPTADDRESSCAPS_WRAP; if (GL_SUPPORT(ARB_TEXTURE_BORDER_CLAMP)) { - *pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_BORDER; + *pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; } if (GL_SUPPORT(ARB_TEXTURE_MIRRORED_REPEAT)) { - *pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRROR; + *pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; } if (GL_SUPPORT(ATI_TEXTURE_MIRROR_ONCE)) { - *pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE; + *pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; } } else *pCaps->VolumeTextureAddressCaps = 0; diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 68f80bc..8456705 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -62,6 +62,13 @@ #define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000 #define WINED3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000 +#define WINED3DPTADDRESSCAPS_WRAP 0x00000001 +#define WINED3DPTADDRESSCAPS_MIRROR 0x00000002 +#define WINED3DPTADDRESSCAPS_CLAMP 0x00000004 +#define WINED3DPTADDRESSCAPS_BORDER 0x00000008 +#define WINED3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010 +#define WINED3DPTADDRESSCAPS_MIRRORONCE 0x00000020 + #define WINED3DSTENCILCAPS_KEEP 0x00000001 #define WINED3DSTENCILCAPS_ZERO 0x00000002 #define WINED3DSTENCILCAPS_REPLACE 0x00000004
1
0
0
0
H. Verbeet : wined3d: Add WINED3DPCMPCAPS flags and use them.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: a58b156264fbcafb1e7f01677efd020b222054b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a58b156264fbcafb1e7f01677…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Wed Feb 14 23:31:11 2007 +0100 wined3d: Add WINED3DPCMPCAPS flags and use them. --- dlls/wined3d/directx.c | 32 ++++++++++++++++---------------- include/wine/wined3d_caps.h | 9 +++++++++ 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e6a6f6a..c71ce5b 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1930,14 +1930,14 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPRASTERCAPS_ZBUFFERLESSHSR WINED3DPRASTERCAPS_WBUFFER */ - *pCaps->ZCmpCaps = D3DPCMPCAPS_ALWAYS | - D3DPCMPCAPS_EQUAL | - D3DPCMPCAPS_GREATER | - D3DPCMPCAPS_GREATEREQUAL | - D3DPCMPCAPS_LESS | - D3DPCMPCAPS_LESSEQUAL | - D3DPCMPCAPS_NEVER | - D3DPCMPCAPS_NOTEQUAL; + *pCaps->ZCmpCaps = WINED3DPCMPCAPS_ALWAYS | + WINED3DPCMPCAPS_EQUAL | + WINED3DPCMPCAPS_GREATER | + WINED3DPCMPCAPS_GREATEREQUAL | + WINED3DPCMPCAPS_LESS | + WINED3DPCMPCAPS_LESSEQUAL | + WINED3DPCMPCAPS_NEVER | + WINED3DPCMPCAPS_NOTEQUAL; *pCaps->SrcBlendCaps = WINED3DPBLENDCAPS_BLENDFACTOR | WINED3DPBLENDCAPS_BOTHINVSRCALPHA | @@ -1969,14 +1969,14 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPBLENDCAPS_SRCCOLOR | WINED3DPBLENDCAPS_ZERO; - *pCaps->AlphaCmpCaps = D3DPCMPCAPS_ALWAYS | - D3DPCMPCAPS_EQUAL | - D3DPCMPCAPS_GREATER | - D3DPCMPCAPS_GREATEREQUAL | - D3DPCMPCAPS_LESS | - D3DPCMPCAPS_LESSEQUAL | - D3DPCMPCAPS_NEVER | - D3DPCMPCAPS_NOTEQUAL; + *pCaps->AlphaCmpCaps = WINED3DPCMPCAPS_ALWAYS | + WINED3DPCMPCAPS_EQUAL | + WINED3DPCMPCAPS_GREATER | + WINED3DPCMPCAPS_GREATEREQUAL | + WINED3DPCMPCAPS_LESS | + WINED3DPCMPCAPS_LESSEQUAL | + WINED3DPCMPCAPS_NEVER | + WINED3DPCMPCAPS_NOTEQUAL; *pCaps->ShadeCaps = WINED3DPSHADECAPS_SPECULARGOURAUDRGB | WINED3DPSHADECAPS_COLORGOURAUDRGB | diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 98a655d..68f80bc 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -34,6 +34,15 @@ #define WINED3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000 #define WINED3DPBLENDCAPS_BLENDFACTOR 0x00002000 +#define WINED3DPCMPCAPS_NEVER 0x00000001 +#define WINED3DPCMPCAPS_LESS 0x00000002 +#define WINED3DPCMPCAPS_EQUAL 0x00000004 +#define WINED3DPCMPCAPS_LESSEQUAL 0x00000008 +#define WINED3DPCMPCAPS_GREATER 0x00000010 +#define WINED3DPCMPCAPS_NOTEQUAL 0x00000020 +#define WINED3DPCMPCAPS_GREATEREQUAL 0x00000040 +#define WINED3DPCMPCAPS_ALWAYS 0x00000080 + #define WINED3DPMISCCAPS_MASKZ 0x00000002 #define WINED3DPMISCCAPS_LINEPATTERNREP 0x00000004 #define WINED3DPMISCCAPS_CULLNONE 0x00000010
1
0
0
0
H. Verbeet : wined3d: Add WINED3DPMISCCAPS flags and use them.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: fd8e0f1589c807a751b5b6592bc97ef295a05898 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd8e0f1589c807a751b5b6592…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Wed Feb 14 23:31:05 2007 +0100 wined3d: Add WINED3DPMISCCAPS flags and use them. --- dlls/wined3d/directx.c | 34 +++++++++++++++++----------------- include/wine/wined3d_caps.h | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 817fdf9..e6a6f6a 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1879,29 +1879,29 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DDEVCAPS_DRAWPRIMITIVES2 | WINED3DDEVCAPS_DRAWPRIMITIVES2EX; - *pCaps->PrimitiveMiscCaps = D3DPMISCCAPS_CULLNONE | - D3DPMISCCAPS_CULLCCW | - D3DPMISCCAPS_CULLCW | - D3DPMISCCAPS_COLORWRITEENABLE | - D3DPMISCCAPS_CLIPTLVERTS | - D3DPMISCCAPS_CLIPPLANESCALEDPOINTS | - D3DPMISCCAPS_MASKZ | - D3DPMISCCAPS_BLENDOP; + *pCaps->PrimitiveMiscCaps = WINED3DPMISCCAPS_CULLNONE | + WINED3DPMISCCAPS_CULLCCW | + WINED3DPMISCCAPS_CULLCW | + WINED3DPMISCCAPS_COLORWRITEENABLE | + WINED3DPMISCCAPS_CLIPTLVERTS | + WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS | + WINED3DPMISCCAPS_MASKZ | + WINED3DPMISCCAPS_BLENDOP; /* TODO: - D3DPMISCCAPS_NULLREFERENCE - D3DPMISCCAPS_INDEPENDENTWRITEMASKS - D3DPMISCCAPS_FOGANDSPECULARALPHA - D3DPMISCCAPS_SEPARATEALPHABLEND - D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS - D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING - D3DPMISCCAPS_FOGVERTEXCLAMPED */ + WINED3DPMISCCAPS_NULLREFERENCE + WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS + WINED3DPMISCCAPS_FOGANDSPECULARALPHA + WINED3DPMISCCAPS_SEPARATEALPHABLEND + WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS + WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING + WINED3DPMISCCAPS_FOGVERTEXCLAMPED */ /* The caps below can be supported but aren't handled yet in utils.c 'd3dta_to_combiner_input', disable them until support is fixed */ #if 0 if (GL_SUPPORT(NV_REGISTER_COMBINERS)) - *pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_TSSARGTEMP; + *pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_TSSARGTEMP; if (GL_SUPPORT(NV_REGISTER_COMBINERS2)) - *pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_PERSTAGECONSTANT; + *pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_PERSTAGECONSTANT; #endif *pCaps->RasterCaps = WINED3DPRASTERCAPS_DITHER | diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 1cedae7..98a655d 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -34,6 +34,25 @@ #define WINED3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000 #define WINED3DPBLENDCAPS_BLENDFACTOR 0x00002000 +#define WINED3DPMISCCAPS_MASKZ 0x00000002 +#define WINED3DPMISCCAPS_LINEPATTERNREP 0x00000004 +#define WINED3DPMISCCAPS_CULLNONE 0x00000010 +#define WINED3DPMISCCAPS_CULLCW 0x00000020 +#define WINED3DPMISCCAPS_CULLCCW 0x00000040 +#define WINED3DPMISCCAPS_COLORWRITEENABLE 0x00000080 +#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100 +#define WINED3DPMISCCAPS_CLIPTLVERTS 0x00000200 +#define WINED3DPMISCCAPS_TSSARGTEMP 0x00000400 +#define WINED3DPMISCCAPS_BLENDOP 0x00000800 +#define WINED3DPMISCCAPS_NULLREFERENCE 0x00001000 +#define WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS 0x00004000 +#define WINED3DPMISCCAPS_PERSTAGECONSTANT 0x00008000 +#define WINED3DPMISCCAPS_FOGANDSPECULARALPHA 0x00010000 +#define WINED3DPMISCCAPS_SEPARATEALPHABLEND 0x00020000 +#define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x00040000 +#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000 +#define WINED3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000 + #define WINED3DSTENCILCAPS_KEEP 0x00000001 #define WINED3DSTENCILCAPS_ZERO 0x00000002 #define WINED3DSTENCILCAPS_REPLACE 0x00000004
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
84
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
84
Results per page:
10
25
50
100
200