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
October 2006
----- 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
3 participants
1032 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11.drv: Fixed the prototype of many OpenGL functions.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 8310d4ae15f5d87992f636e571aabffceacd9e68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8310d4ae15f5d87992f636e57…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 31 21:41:02 2006 +0100 winex11.drv: Fixed the prototype of many OpenGL functions. --- dlls/winex11.drv/opengl.c | 41 +++++++++++++++++++------------------ dlls/winex11.drv/winex11.drv.spec | 10 ++++---- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 92ca29c..37703eb 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -248,7 +248,7 @@ MAKE_FUNCPTR(glNewList) MAKE_FUNCPTR(glPixelStorei) #undef MAKE_FUNCPTR -BOOL X11DRV_WineGL_InitOpenglInfo() +static BOOL X11DRV_WineGL_InitOpenglInfo(void) { static BOOL infoInitialized = FALSE; @@ -1246,7 +1246,7 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDE } /* OpenGL32 wglDeleteContext */ -BOOL WINAPI X11DRV_wglDeleteContext(HGLRC hglrc) +BOOL X11DRV_wglDeleteContext(HGLRC hglrc) { Wine_GLContext *ctx = (Wine_GLContext *) hglrc; BOOL ret = TRUE; @@ -1408,7 +1408,7 @@ BOOL X11DRV_wglMakeContextCurrentARB(X11 } /* OpenGL32 wglShaderLists */ -BOOL WINAPI X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { +BOOL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { Wine_GLContext *org = (Wine_GLContext *) hglrc1; Wine_GLContext *dest = (Wine_GLContext *) hglrc2; @@ -1585,7 +1585,7 @@ BOOL X11DRV_wglUseFontBitmapsW(X11DRV_PD } /* WGL helper function which handles differences in glGetIntegerv from WGL and GLX */ -void X11DRV_wglGetIntegerv(GLenum pname, GLint* params) { +static void WINAPI X11DRV_wglGetIntegerv(GLenum pname, GLint* params) { TRACE("pname: 0x%x, params: %p\n", pname, params); if (pname == GL_DEPTH_BITS) { GLXContext gl_ctx = pglXGetCurrentContext(); @@ -1967,7 +1967,7 @@ static GLboolean WINAPI X11DRV_wglSetPbu } /* WGL_ARB_pixel_format: wglChoosePixelFormatARB */ -GLboolean WINAPI X11DRV_wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats) +static GLboolean WINAPI X11DRV_wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats) { int gl_test = 0; int attribs[256]; @@ -2093,14 +2093,14 @@ GLboolean WINAPI X11DRV_wglChoosePixelFo } /* WGL_ARB_pixel_format: wglGetPixelFormatAttribfvARB */ -GLboolean WINAPI X11DRV_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues) +static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues) { FIXME("(%p, %d, %d, %d, %p, %p): stub\n", hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); return GL_FALSE; } /* WGL_ARB_pixel_format: wglGetPixelFormatAttribivARB */ -GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues) +static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues) { UINT i; GLXFBConfig* cfgs = NULL; @@ -2403,19 +2403,19 @@ static GLboolean WINAPI X11DRV_wglReleas } /* WGL_EXT_extensions_string: wglGetExtensionsStringEXT */ -const char * WINAPI X11DRV_wglGetExtensionsStringEXT(void) { +static const char * WINAPI X11DRV_wglGetExtensionsStringEXT(void) { TRACE("() returning \"%s\"\n", WineGLInfo.wglExtensions); return WineGLInfo.wglExtensions; } /* WGL_EXT_swap_control: wglGetSwapIntervalEXT */ -int WINAPI X11DRV_wglGetSwapIntervalEXT(VOID) { +static int WINAPI X11DRV_wglGetSwapIntervalEXT(VOID) { FIXME("(),stub!\n"); return swap_interval; } /* WGL_EXT_swap_control: wglSwapIntervalEXT */ -BOOL WINAPI X11DRV_wglSwapIntervalEXT(int interval) { +static BOOL WINAPI X11DRV_wglSwapIntervalEXT(int interval) { TRACE("(%d)\n", interval); swap_interval = interval; if (NULL != pglXSwapIntervalSGI) { @@ -2713,10 +2713,6 @@ XVisualInfo *X11DRV_setup_opengl_visual( #else /* no OpenGL includes */ -void X11DRV_OpenGL_Init(Display *display) -{ -} - /*********************************************************************** * ChoosePixelFormat (X11DRV.@) */ @@ -2769,13 +2765,13 @@ BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE * } /* OpenGL32 wglCreateContext */ -HGLRC WINAPI X11DRV_wglCreateContext(HDC hdc) { +HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev) { ERR_(opengl)("No OpenGL support compiled in.\n"); return NULL; } /* OpenGL32 wglDeleteContext */ -BOOL WINAPI X11DRV_wglDeleteContext(HGLRC hglrc) { +BOOL X11DRV_wglDeleteContext(HGLRC hglrc) { ERR_(opengl)("No OpenGL support compiled in.\n"); return FALSE; } @@ -2786,27 +2782,32 @@ PROC X11DRV_wglGetProcAddress(LPCSTR lps return NULL; } +BOOL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* hDrawDev, X11DRV_PDEVICE* hReadDev, HGLRC hglrc) { + ERR_(opengl)("No OpenGL support compiled in.\n"); + return FALSE; +} + /* OpenGL32 wglMakeCurrent */ -BOOL WINAPI X11DRV_wglMakeCurrent(HDC hdc, HGLRC hglrc) { +BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) { ERR_(opengl)("No OpenGL support compiled in.\n"); return FALSE; } /* OpenGL32 wglShaderLists */ -BOOL WINAPI X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { +BOOL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { ERR_(opengl)("No OpenGL support compiled in.\n"); return FALSE; } /* OpenGL32 wglUseFontBitmapsA */ -BOOL WINAPI X11DRV_wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD listBase) +BOOL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase) { ERR_(opengl)("No OpenGL support compiled in.\n"); return FALSE; } /* OpenGL32 wglUseFontBitmapsW */ -BOOL WINAPI X11DRV_wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase) +BOOL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase) { ERR_(opengl)("No OpenGL support compiled in.\n"); return FALSE; diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 2c9a07e..b5b65b4 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -131,11 +131,11 @@ # XIM @ cdecl ForceXIMReset(long) X11DRV_ForceXIMReset # OpenGL -@ cdecl wglCreateContext(long) X11DRV_wglCreateContext +@ cdecl wglCreateContext(ptr) X11DRV_wglCreateContext @ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext -@ cdecl wglGetProcAddress(ptr) X11DRV_wglGetProcAddress +@ cdecl wglGetProcAddress(str) X11DRV_wglGetProcAddress @ cdecl wglMakeContextCurrentARB(ptr ptr long) X11DRV_wglMakeContextCurrentARB -@ cdecl wglMakeCurrent(long long) X11DRV_wglMakeCurrent +@ cdecl wglMakeCurrent(ptr long) X11DRV_wglMakeCurrent @ cdecl wglShareLists(long long) X11DRV_wglShareLists -@ cdecl wglUseFontBitmapsA(long long long long) X11DRV_wglUseFontBitmapsA -@ cdecl wglUseFontBitmapsW(long long long long) X11DRV_wglUseFontBitmapsW +@ cdecl wglUseFontBitmapsA(ptr long long long) X11DRV_wglUseFontBitmapsA +@ cdecl wglUseFontBitmapsW(ptr long long long) X11DRV_wglUseFontBitmapsW
1
0
0
0
Roderick Colenbrander : winex11.drv: Route wglMakeContextCurrentARB through gdi32.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 2506677c60d140aff3e27290af7c218e5baf9c9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2506677c60d140aff3e27290a…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Tue Oct 31 18:29:14 2006 +0100 winex11.drv: Route wglMakeContextCurrentARB through gdi32. --- dlls/gdi32/driver.c | 1 + dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/opengl.c | 40 ++++++++++++++++++++++++++++++++++++- dlls/winex11.drv/opengl.c | 10 ++++---- dlls/winex11.drv/winex11.drv.spec | 1 + 5 files changed, 47 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index a751c72..16bde65 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -199,6 +199,7 @@ #define GET_FUNC(name) driver->funcs.p## GET_FUNC(wglCreateContext); GET_FUNC(wglDeleteContext); GET_FUNC(wglGetProcAddress); + GET_FUNC(wglMakeContextCurrentARB); GET_FUNC(wglMakeCurrent); GET_FUNC(wglShareLists); GET_FUNC(wglUseFontBitmapsA); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index d173151..eda9827 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -188,6 +188,7 @@ typedef struct tagDC_FUNCS BOOL (*pwglDeleteContext)(HGLRC); PROC (*pwglGetProcAddress)(LPCSTR); BOOL (*pwglMakeCurrent)(PHYSDEV, HGLRC); + BOOL (*pwglMakeContextCurrentARB)(PHYSDEV, PHYSDEV, HGLRC); BOOL (*pwglShareLists)(HGLRC hglrc1, HGLRC hglrc2); BOOL (*pwglUseFontBitmapsA)(PHYSDEV, DWORD, DWORD, DWORD); BOOL (*pwglUseFontBitmapsW)(PHYSDEV, DWORD, DWORD, DWORD); diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c index 2be485e..03ce10d 100644 --- a/dlls/gdi32/opengl.c +++ b/dlls/gdi32/opengl.c @@ -161,6 +161,36 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLR } /*********************************************************************** + * wglMakeContextCurrentARB + */ +static BOOL WINAPI wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) +{ + BOOL ret = FALSE; + DC *DrawDC; + DC *ReadDC; + + TRACE("hDrawDC: (%p), hReadDC: (%p) hglrc: (%p)\n", hDrawDC, hReadDC, hglrc); + + /* Both hDrawDC and hReadDC need to be valid */ + DrawDC = DC_GetDCPtr( hDrawDC); + if (!DrawDC) return FALSE; + + ReadDC = DC_GetDCPtr( hReadDC); + if (!ReadDC) { + GDI_ReleaseObj(hDrawDC); + return FALSE; + } + + if (!DrawDC->funcs->pwglMakeContextCurrentARB) FIXME(" :stub\n"); + else ret = DrawDC->funcs->pwglMakeContextCurrentARB(DrawDC->physDev, ReadDC->physDev, hglrc); + + GDI_ReleaseObj(hDrawDC); + GDI_ReleaseObj(hReadDC); + + return ret; +} + +/*********************************************************************** * wglShareLists (OPENGL32.@) */ BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2) @@ -228,7 +258,7 @@ BOOL WINAPI wglUseFontBitmapsW(HDC hdc, PROC WINAPI wglGetProcAddress(LPCSTR func) { PROC ret = NULL; - DC * dc = NULL; + DC *dc; if(!func) return NULL; @@ -244,5 +274,13 @@ PROC WINAPI wglGetProcAddress(LPCSTR fun GDI_ReleaseObj(default_hdc); + /* At the moment we implement one WGL extension which requires a HDC. When we + * are looking up this call and when the Extension is available (that is the case + * when a non-NULL value is returned by wglGetProcAddress), we return the address + * of a wrapper function which will handle the HDC->PhysDev conversion. + */ + if(ret && strcmp(func, "wglMakeContextCurrentARB") == 0) + return wglMakeContextCurrentARB; + return ret; } diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 046c57b..92ca29c 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1376,10 +1376,10 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVIC } /* OpenGL32 wglMakeContextCurrentARB */ -static BOOL WINAPI X11DRV_wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) +BOOL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* hDrawDev, X11DRV_PDEVICE* hReadDev, HGLRC hglrc) { BOOL ret; - TRACE("(%p,%p,%p)\n", hDrawDC, hReadDC, hglrc); + TRACE("(%p,%p,%p)\n", hDrawDev, hReadDev, hglrc); wine_tsx11_lock(); if (hglrc == NULL) { @@ -1390,11 +1390,11 @@ static BOOL WINAPI X11DRV_wglMakeContext ret = FALSE; } else { Wine_GLContext *ctx = (Wine_GLContext *) hglrc; - Drawable d_draw = get_drawable( hDrawDC ); - Drawable d_read = get_drawable( hReadDC ); + Drawable d_draw = get_glxdrawable(hDrawDev); + Drawable d_read = get_glxdrawable(hReadDev); if (ctx->ctx == NULL) { - ctx->ctx = pglXCreateContext(ctx->display, ctx->vis, NULL, GetObjectType(hDrawDC) == OBJ_MEMDC ? False : True); + ctx->ctx = pglXCreateContext(ctx->display, ctx->vis, NULL, GetObjectType(hDrawDev->hdc) == OBJ_MEMDC ? False : True); TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx); } ret = pglXMakeContextCurrent(ctx->display, d_draw, d_read, ctx->ctx); diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 56c2c1a..2c9a07e 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -134,6 +134,7 @@ # OpenGL @ cdecl wglCreateContext(long) X11DRV_wglCreateContext @ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext @ cdecl wglGetProcAddress(ptr) X11DRV_wglGetProcAddress +@ cdecl wglMakeContextCurrentARB(ptr ptr long) X11DRV_wglMakeContextCurrentARB @ cdecl wglMakeCurrent(long long) X11DRV_wglMakeCurrent @ cdecl wglShareLists(long long) X11DRV_wglShareLists @ cdecl wglUseFontBitmapsA(long long long long) X11DRV_wglUseFontBitmapsA
1
0
0
0
Alexandre Julliard : winedos: Use NT instead of Unix calls to identify DOS device pseudo-files.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: d2abcecd945fd6aad01fe700c81de059df5506af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2abcecd945fd6aad01fe700c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 31 20:24:14 2006 +0100 winedos: Use NT instead of Unix calls to identify DOS device pseudo-files. --- dlls/winedos/int21.c | 36 +++++++++++++++--------------------- 1 files changed, 15 insertions(+), 21 deletions(-) diff --git a/dlls/winedos/int21.c b/dlls/winedos/int21.c index 139ea1a..86224ae 100644 --- a/dlls/winedos/int21.c +++ b/dlls/winedos/int21.c @@ -267,8 +267,7 @@ struct magic_device { WCHAR name[10]; HANDLE handle; - dev_t dev; - ino_t ino; + LARGE_INTEGER index; void (*ioctl_handler)(CONTEXT86 *); }; @@ -278,9 +277,9 @@ static void INT21_IoctlHPScanHandler( CO static struct magic_device magic_devices[] = { - { {'s','c','s','i','m','g','r','$',0}, NULL, 0, 0, INT21_IoctlScsiMgrHandler }, - { {'e','m','m','x','x','x','x','0',0}, NULL, 0, 0, INT21_IoctlEMSHandler }, - { {'h','p','s','c','a','n',0}, NULL, 0, 0, INT21_IoctlHPScanHandler }, + { {'s','c','s','i','m','g','r','$',0}, NULL, { { 0, 0 } }, INT21_IoctlScsiMgrHandler }, + { {'e','m','m','x','x','x','x','0',0}, NULL, { { 0, 0 } }, INT21_IoctlEMSHandler }, + { {'h','p','s','c','a','n',0}, NULL, { { 0, 0 } }, INT21_IoctlHPScanHandler }, }; #define NB_MAGIC_DEVICES (sizeof(magic_devices)/sizeof(magic_devices[0])) @@ -911,15 +910,13 @@ static HANDLE INT21_OpenMagicDevice( LPC if (!magic_devices[i].handle) /* need to open it */ { - int fd; - struct stat st; + IO_STATUS_BLOCK io; + FILE_INTERNAL_INFORMATION info; if (!(handle = INT21_CreateMagicDeviceHandle( magic_devices[i].name ))) return 0; - wine_server_handle_to_fd( handle, 0, &fd, NULL ); - fstat( fd, &st ); - wine_server_release_fd( handle, fd ); - magic_devices[i].dev = st.st_dev; - magic_devices[i].ino = st.st_ino; + + NtQueryInformationFile( handle, &io, &info, sizeof(info), FileInternalInformation ); + magic_devices[i].index = info.IndexNumber; magic_devices[i].handle = handle; } if (!DuplicateHandle( GetCurrentProcess(), magic_devices[i].handle, @@ -2732,12 +2729,13 @@ static void INT21_IoctlHPScanHandler( CO */ static void INT21_Ioctl_Char( CONTEXT86 *context ) { - struct stat st; - int status, i, fd; + int status, i; int IsConsoleIOHandle = 0; + IO_STATUS_BLOCK io; + FILE_INTERNAL_INFORMATION info; HANDLE handle = DosFileHandleToWin32Handle(BX_reg(context)); - status = wine_server_handle_to_fd( handle, 0, &fd, NULL ); + status = NtQueryInformationFile( handle, &io, &info, sizeof(info), FileInternalInformation ); if (status) { if( VerifyConsoleIoHandle( handle)) @@ -2748,14 +2746,10 @@ static void INT21_Ioctl_Char( CONTEXT86 return; } } else { - fstat( fd, &st ); - IsConsoleIOHandle = isatty( fd); - wine_server_release_fd( handle, fd ); for (i = 0; i < NB_MAGIC_DEVICES; i++) { if (!magic_devices[i].handle) continue; - if (magic_devices[i].dev == st.st_dev && - magic_devices[i].ino == st.st_ino) + if (magic_devices[i].index.QuadPart == info.IndexNumber.QuadPart) { /* found it */ magic_devices[i].ioctl_handler( context ); @@ -2770,7 +2764,7 @@ static void INT21_Ioctl_Char( CONTEXT86 { case 0x00: /* GET DEVICE INFORMATION */ TRACE( "IOCTL - GET DEVICE INFORMATION - %d\n", BX_reg(context) ); - if (IsConsoleIOHandle || S_ISCHR(st.st_mode)) + if (IsConsoleIOHandle || GetFileType(handle) == FILE_TYPE_CHAR) { /* * Returns attribute word in DX:
1
0
0
0
Alexandre Julliard : kernel32: Use NT instead of Unix calls to identify VxD pseudo-files.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 7472ffd8d26ac21059a476ceae77441dfa3c61c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7472ffd8d26ac21059a476cea…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 31 20:23:56 2006 +0100 kernel32: Use NT instead of Unix calls to identify VxD pseudo-files. --- dlls/kernel32/vxd.c | 39 ++++++++++++++------------------------- 1 files changed, 14 insertions(+), 25 deletions(-) diff --git a/dlls/kernel32/vxd.c b/dlls/kernel32/vxd.c index bdb93e4..b08c020 100644 --- a/dlls/kernel32/vxd.c +++ b/dlls/kernel32/vxd.c @@ -52,11 +52,10 @@ typedef DWORD (WINAPI *VxDCallProc)(DWOR struct vxd_module { - dev_t dev; - ino_t ino; - HANDLE handle; - HMODULE module; - DeviceIoProc proc; + LARGE_INTEGER index; + HANDLE handle; + HMODULE module; + DeviceIoProc proc; }; struct vxdcall_service @@ -134,30 +133,24 @@ static HANDLE open_vxd_handle( LPCWSTR n /* retrieve the DeviceIoControl function for a Vxd given a file handle */ static DeviceIoProc get_vxd_proc( HANDLE handle ) { - struct stat st; DeviceIoProc ret = NULL; - int status, i, fd; + int status, i; + IO_STATUS_BLOCK io; + FILE_INTERNAL_INFORMATION info; - status = wine_server_handle_to_fd( handle, 0, &fd, NULL ); + status = NtQueryInformationFile( handle, &io, &info, sizeof(info), FileInternalInformation ); if (status) { SetLastError( RtlNtStatusToDosError(status) ); return NULL; } - if (fstat( fd, &st ) == -1) - { - wine_server_release_fd( handle, fd ); - SetLastError( ERROR_INVALID_HANDLE ); - return NULL; - } - wine_server_release_fd( handle, fd ); RtlEnterCriticalSection( &vxd_section ); for (i = 0; i < MAX_VXD_MODULES; i++) { if (!vxd_modules[i].module) break; - if (vxd_modules[i].dev == st.st_dev && vxd_modules[i].ino == st.st_ino) + if (vxd_modules[i].index.QuadPart == info.IndexNumber.QuadPart) { if (!(ret = vxd_modules[i].proc)) SetLastError( ERROR_INVALID_FUNCTION ); goto done; @@ -230,8 +223,8 @@ HANDLE VXD_Open( LPCWSTR filenameW, DWOR } if (!vxd_modules[i].module) /* new one, register it */ { - struct stat st; - int fd; + IO_STATUS_BLOCK io; + FILE_INTERNAL_INFORMATION info; /* get a file handle to the dummy file */ if (!(handle = open_vxd_handle( name ))) @@ -239,16 +232,12 @@ HANDLE VXD_Open( LPCWSTR filenameW, DWOR FreeLibrary( module ); goto done; } - wine_server_handle_to_fd( handle, 0, &fd, NULL ); - if (fstat( fd, &st ) != -1) - { - vxd_modules[i].dev = st.st_dev; - vxd_modules[i].ino = st.st_ino; - } + if (!NtQueryInformationFile( handle, &io, &info, sizeof(info), FileInternalInformation )) + vxd_modules[i].index = info.IndexNumber; + vxd_modules[i].module = module; vxd_modules[i].handle = handle; vxd_modules[i].proc = (DeviceIoProc)GetProcAddress( module, "DeviceIoControl" ); - wine_server_release_fd( handle, fd ); goto done; } }
1
0
0
0
Ivan Gyurdiev : wined3d: Add D3DLINEPATTERN to the WINED3D namespace.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 4934b7ae79d3c7cc8dc2837bdc113c6a72b9ed62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4934b7ae79d3c7cc8dc2837bd…
Author: Ivan Gyurdiev <ivg231(a)gmail.com> Date: Tue Oct 31 03:21:15 2006 -0500 wined3d: Add D3DLINEPATTERN to the WINED3D namespace. --- dlls/wined3d/device.c | 2 +- dlls/wined3d/stateblock.c | 2 +- include/wine/wined3d_types.h | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b2b693c..481517e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4100,7 +4100,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl { union { DWORD d; - D3DLINEPATTERN lp; + WINED3DLINEPATTERN lp; } tmppattern; tmppattern.d = Value; diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index a724749..8974501 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -813,7 +813,7 @@ static HRESULT WINAPI IWineD3DStateBloc IWineD3DDevice *device = (IWineD3DDevice *)This->wineD3DDevice; IWineD3DDeviceImpl *ThisDevice = (IWineD3DDeviceImpl *)device; union { - D3DLINEPATTERN lp; + WINED3DLINEPATTERN lp; DWORD d; } lp; union { diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 800e24e..6b71cd9 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -118,6 +118,11 @@ typedef struct _WINED3DGAMMARAMP { WORD blue [256]; } WINED3DGAMMARAMP; +typedef struct _WINED3DLINEPATTERN { + WORD wRepeatFactor; + WORD wLinePattern; +} WINED3DLINEPATTERN; + #define WINED3D_VSHADER_MAX_CONSTANTS 96 #define WINED3D_PSHADER_MAX_CONSTANTS 32
1
0
0
0
Ivan Gyurdiev : wined3d: Use D3DCUBEMAP_FACES consistently in the WINED3D namespace.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 8d7a01963e1cd1e0a0af7e07794d6efc2c1b24ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d7a01963e1cd1e0a0af7e077…
Author: Ivan Gyurdiev <ivg231(a)gmail.com> Date: Tue Oct 31 03:20:12 2006 -0500 wined3d: Use D3DCUBEMAP_FACES consistently in the WINED3D namespace. --- dlls/wined3d/cubetexture.c | 10 +++++----- dlls/wined3d/device.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index 6250975..c16740a 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -145,7 +145,7 @@ static void WINAPI IWineD3DCubeTextureIm /* If were dirty then reload the surfaces */ if (This->baseTexture.dirty) { for (i = 0; i < This->baseTexture.levels; i++) { - for (j = D3DCUBEMAP_FACE_POSITIVE_X; j <= D3DCUBEMAP_FACE_NEGATIVE_Z ; j++) { + for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) { if(setGlTextureDesc) IWineD3DSurface_SetGlTextureDesc(This->surfaces[j][i], This->baseTexture.textureName, cube_targets[j]); IWineD3DSurface_LoadTexture(This->surfaces[j][i]); @@ -280,7 +280,7 @@ static HRESULT WINAPI IWineD3DCubeTextur IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; HRESULT hr = WINED3DERR_INVALIDCALL; - if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { + if (Level < This->baseTexture.levels && FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) { *ppCubeMapSurface = This->surfaces[FaceType][Level]; IWineD3DSurface_AddRef(*ppCubeMapSurface); @@ -299,7 +299,7 @@ static HRESULT WINAPI IWineD3DCubeTextur HRESULT hr = WINED3DERR_INVALIDCALL; IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { + if (Level < This->baseTexture.levels && FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) { hr = IWineD3DSurface_LockRect(This->surfaces[FaceType][Level], pLockedRect, pRect, Flags); } @@ -316,7 +316,7 @@ static HRESULT WINAPI IWineD3DCubeTextur HRESULT hr = WINED3DERR_INVALIDCALL; IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { + if (Level < This->baseTexture.levels && FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) { hr = IWineD3DSurface_UnlockRect(This->surfaces[FaceType][Level]); } @@ -333,7 +333,7 @@ static HRESULT WINAPI IWineD3DCubeTextu IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; This->baseTexture.dirty = TRUE; TRACE("(%p) : dirtyfication of faceType(%d) Level (0)\n", This, FaceType); - if (FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { + if (FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) { hr = IWineD3DSurface_AddDirtyRect(This->surfaces[FaceType][0], pDirtyRect); } else { WARN("(%p) overflow FaceType(%d)\n", This, FaceType); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 31644b2..0ee1045 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6343,7 +6343,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl for (i = 0 ; i < levels ; ++i) { /* Update each cube face */ - for (faceType = D3DCUBEMAP_FACE_POSITIVE_X; faceType <= D3DCUBEMAP_FACE_NEGATIVE_Z; ++faceType){ + for (faceType = WINED3DCUBEMAP_FACE_POSITIVE_X; faceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z; ++faceType){ hr = IWineD3DCubeTexture_GetCubeMapSurface((IWineD3DCubeTexture *)pSourceTexture, faceType, i, &srcSurface); if (WINED3D_OK != hr) { FIXME("(%p) : Failed to get src cube surface facetype %d, level %d\n", This, faceType, i);
1
0
0
0
Ivan Gyurdiev : wined3d: Use D3DDEGREE consistently in the WINED3D namespace.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: aa164647e6b55abc0bcac97edaa6fcb17c110035 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa164647e6b55abc0bcac97ed…
Author: Ivan Gyurdiev <ivg231(a)gmail.com> Date: Tue Oct 31 03:19:45 2006 -0500 wined3d: Use D3DDEGREE consistently in the WINED3D namespace. --- dlls/wined3d/device.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8ae51fb..31644b2 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4493,14 +4493,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_POSITIONDEGREE : { - if(D3DDEGREE_CUBIC != Value) + if(WINED3DDEGREE_CUBIC != Value) ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value); break; } case WINED3DRS_NORMALDEGREE : { - if(D3DDEGREE_LINEAR != Value) + if(WINED3DDEGREE_LINEAR != Value) ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value); break; }
1
0
0
0
Ivan Gyurdiev : wined3d: Add D3DPATCHEDGESTYLE to the WINED3D namespace.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 50130fdfdb4bfd72d770530954c38d9f2fbc9b17 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50130fdfdb4bfd72d77053095…
Author: Ivan Gyurdiev <ivg231(a)gmail.com> Date: Tue Oct 31 03:20:48 2006 -0500 wined3d: Add D3DPATCHEDGESTYLE to the WINED3D namespace. --- dlls/wined3d/device.c | 2 +- dlls/wined3d/stateblock.c | 2 +- include/wine/wined3d_types.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0ee1045..b2b693c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4463,7 +4463,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_PATCHEDGESTYLE : { - if(D3DPATCHEDGE_DISCRETE != Value) + if(WINED3DPATCHEDGE_DISCRETE != Value) ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value); break; } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 0a850e5..a724749 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -925,7 +925,7 @@ static HRESULT WINAPI IWineD3DStateBloc IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSCALE_C, tmpfloat.d); IWineD3DDevice_SetRenderState(device, WINED3DRS_MULTISAMPLEANTIALIAS, TRUE); IWineD3DDevice_SetRenderState(device, WINED3DRS_MULTISAMPLEMASK, 0xFFFFFFFF); - IWineD3DDevice_SetRenderState(device, WINED3DRS_PATCHEDGESTYLE, D3DPATCHEDGE_DISCRETE); + IWineD3DDevice_SetRenderState(device, WINED3DRS_PATCHEDGESTYLE, WINED3DPATCHEDGE_DISCRETE); tmpfloat.f = 1.0f; IWineD3DDevice_SetRenderState(device, WINED3DRS_PATCHSEGMENTS, tmpfloat.d); IWineD3DDevice_SetRenderState(device, WINED3DRS_DEBUGMONITORTOKEN, 0xbaadcafe); diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 9e26550..800e24e 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -560,6 +560,13 @@ typedef enum _WINED3DMATERIALCOLORSOURCE WINED3DMCS_FORCE_DWORD = 0x7fffffff } WINED3DMATERIALCOLORSOURCE; +typedef enum _WINED3DPATCHEDGESTYLE { + WINED3DPATCHEDGE_DISCRETE = 0, + WINED3DPATCHEDGE_CONTINUOUS = 1, + + WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff, +} WINED3DPATCHEDGESTYLE; + typedef struct _WINED3DDISPLAYMODE { UINT Width; UINT Height;
1
0
0
0
Ivan Gyurdiev : wined3d: Add D3DSTREAMSOURCE codes to the WINED3D namespace .
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: 4c723a76622204b97b97a13f926dccaca73b14de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c723a76622204b97b97a13f9…
Author: Ivan Gyurdiev <ivg231(a)gmail.com> Date: Tue Oct 31 03:19:13 2006 -0500 wined3d: Add D3DSTREAMSOURCE codes to the WINED3D namespace. --- dlls/wined3d/device.c | 18 +++++++++--------- dlls/wined3d/wined3d_private.h | 2 +- include/wine/wined3d_types.h | 4 ++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7eb1a60..8ae51fb 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2368,17 +2368,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl /* D3d9 only, but shouldn't hurt d3d8 */ UINT streamFlags; - streamFlags = StreamNumber &(D3DSTREAMSOURCE_INDEXEDDATA | D3DSTREAMSOURCE_INSTANCEDATA); + streamFlags = StreamNumber &(WINED3DSTREAMSOURCE_INDEXEDDATA | WINED3DSTREAMSOURCE_INSTANCEDATA); if (streamFlags) { - if (streamFlags & D3DSTREAMSOURCE_INDEXEDDATA) { + if (streamFlags & WINED3DSTREAMSOURCE_INDEXEDDATA) { FIXME("stream index data not supported\n"); } - if (streamFlags & D3DSTREAMSOURCE_INDEXEDDATA) { + if (streamFlags & WINED3DSTREAMSOURCE_INDEXEDDATA) { FIXME("stream instance data not supported\n"); } } - StreamNumber&= ~(D3DSTREAMSOURCE_INDEXEDDATA | D3DSTREAMSOURCE_INSTANCEDATA); + StreamNumber&= ~(WINED3DSTREAMSOURCE_INDEXEDDATA | WINED3DSTREAMSOURCE_INSTANCEDATA); if (StreamNumber >= MAX_STREAMS) { WARN("Stream out of range %d\n", StreamNumber); @@ -2434,17 +2434,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl This->stateBlock->streamSource[StreamNumber], This->stateBlock->streamStride[StreamNumber]); - streamFlags = StreamNumber &(D3DSTREAMSOURCE_INDEXEDDATA | D3DSTREAMSOURCE_INSTANCEDATA); + streamFlags = StreamNumber &(WINED3DSTREAMSOURCE_INDEXEDDATA | WINED3DSTREAMSOURCE_INSTANCEDATA); if (streamFlags) { - if (streamFlags & D3DSTREAMSOURCE_INDEXEDDATA) { + if (streamFlags & WINED3DSTREAMSOURCE_INDEXEDDATA) { FIXME("stream index data not supported\n"); } - if (streamFlags & D3DSTREAMSOURCE_INDEXEDDATA) { + if (streamFlags & WINED3DSTREAMSOURCE_INDEXEDDATA) { FIXME("stream instance data not supported\n"); } } - StreamNumber&= ~(D3DSTREAMSOURCE_INDEXEDDATA | D3DSTREAMSOURCE_INSTANCEDATA); + StreamNumber&= ~(WINED3DSTREAMSOURCE_INDEXEDDATA | WINED3DSTREAMSOURCE_INSTANCEDATA); if (StreamNumber >= MAX_STREAMS) { WARN("Stream out of range %d\n", StreamNumber); @@ -2479,7 +2479,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) StreamNumber(%d), Divider(%d)\n", This, StreamNumber, Divider); - This->updateStateBlock->streamFlags[StreamNumber] = Divider & (D3DSTREAMSOURCE_INSTANCEDATA | D3DSTREAMSOURCE_INDEXEDDATA ); + This->updateStateBlock->streamFlags[StreamNumber] = Divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA ); This->updateStateBlock->changed.streamFreq[StreamNumber] = TRUE; This->updateStateBlock->set.streamFreq[StreamNumber] = TRUE; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4d38f5c..1d8bb10 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1102,7 +1102,7 @@ struct IWineD3DStateBlockImpl UINT streamOffset[MAX_STREAMS]; IWineD3DVertexBuffer *streamSource[MAX_STREAMS]; UINT streamFreq[MAX_STREAMS]; - UINT streamFlags[MAX_STREAMS]; /*0 | D3DSTREAMSOURCE_INSTANCEDATA | D3DSTREAMSOURCE_INDEXEDDATA */ + UINT streamFlags[MAX_STREAMS]; /*0 | WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA */ /* Indices */ IWineD3DIndexBuffer* pIndexData; diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 48613e3..9e26550 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1533,4 +1533,8 @@ #define WINED3DCLEAR_TARGET 0x00000001 #define WINED3DCLEAR_ZBUFFER 0x00000002 #define WINED3DCLEAR_STENCIL 0x00000004 +/* Stream source flags */ +#define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30) +#define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30) + #endif
1
0
0
0
Ivan Gyurdiev : wined3d: Add D3DCOLORWRITEENABLE codes to the WINED3D namespace.
by Alexandre Julliard
31 Oct '06
31 Oct '06
Module: wine Branch: master Commit: f71edf223fa03b9769c202d6a662fa81a253fbab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f71edf223fa03b9769c202d6a…
Author: Ivan Gyurdiev <ivg231(a)gmail.com> Date: Tue Oct 31 03:18:32 2006 -0500 wined3d: Add D3DCOLORWRITEENABLE codes to the WINED3D namespace. --- dlls/wined3d/device.c | 24 ++++++++++++------------ include/wine/wined3d_types.h | 5 +++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b6e56c1..7eb1a60 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4237,14 +4237,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_COLORWRITEENABLE : { TRACE("Color mask: r(%d) g(%d) b(%d) a(%d)\n", - Value & D3DCOLORWRITEENABLE_RED ? 1 : 0, - Value & D3DCOLORWRITEENABLE_GREEN ? 1 : 0, - Value & D3DCOLORWRITEENABLE_BLUE ? 1 : 0, - Value & D3DCOLORWRITEENABLE_ALPHA ? 1 : 0); - glColorMask(Value & D3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE, - Value & D3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE, - Value & D3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE, - Value & D3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE); + Value & WINED3DCOLORWRITEENABLE_RED ? 1 : 0, + Value & WINED3DCOLORWRITEENABLE_GREEN ? 1 : 0, + Value & WINED3DCOLORWRITEENABLE_BLUE ? 1 : 0, + Value & WINED3DCOLORWRITEENABLE_ALPHA ? 1 : 0); + glColorMask(Value & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE, + Value & WINED3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE, + Value & WINED3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE, + Value & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE); checkGLcall("glColorMask(...)"); } break; @@ -6128,10 +6128,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl old_color_clear_value[1], old_color_clear_value[2], old_color_clear_value[3]); - glColorMask(This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE, - This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE, - This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE, - This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & D3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE); + glColorMask(This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE, + This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE, + This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE, + This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE] & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE); } glDisable(GL_SCISSOR_TEST); diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 1787859..48613e3 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -442,6 +442,11 @@ typedef enum _WINED3DRENDERSTATETYPE { #define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA /* Highest WINED3DRS_ value */ +#define WINED3DCOLORWRITEENABLE_RED (1<<0) +#define WINED3DCOLORWRITEENABLE_GREEN (1<<1) +#define WINED3DCOLORWRITEENABLE_BLUE (1<<2) +#define WINED3DCOLORWRITEENABLE_ALPHA (1<<3) + typedef enum _WINED3DBLEND { WINED3DBLEND_ZERO = 1, WINED3DBLEND_ONE = 2,
1
0
0
0
← Newer
1
2
3
4
5
...
104
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Results per page:
10
25
50
100
200