Author: greatlrd
Date: Thu May 1 11:36:42 2008
New Revision: 33217
URL:
http://svn.reactos.org/svn/reactos?rev=33217&view=rev
Log:
Fixed DRIVER_FUNCTIONS this struct are being passdown to ms dxg.sys and it access it
direcly so we need it match eacly windows xp/2003 layout
Fixed DRIVER_BuildDDIFunctions it now setup all api from the drv to DRIVER_FUNCTIONS
struct. it is update to windows 2003, we can now use all hw acc api that exists in the
drv.
we do not doing that yet.
Modified:
trunk/reactos/include/ddk/winddi.h
trunk/reactos/include/reactos/drivers/directx/directxint.h
trunk/reactos/include/reactos/win32k/ntgdityp.h
trunk/reactos/subsystems/win32/win32k/misc/driver.c
trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
Modified: trunk/reactos/include/ddk/winddi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddi.h?rev=3…
==============================================================================
--- trunk/reactos/include/ddk/winddi.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddi.h [iso-8859-1] Thu May 1 11:36:42 2008
@@ -337,6 +337,7 @@
#define INDEX_DrvOffset 6L
#define INDEX_DrvResetPDEV 7L
#define INDEX_DrvDisableDriver 8L
+#define INDEX_DrvUnknown1 9L
#define INDEX_DrvCreateDeviceBitmap 10L
#define INDEX_DrvDeleteDeviceBitmap 11L
#define INDEX_DrvRealizeBrush 12L
@@ -348,6 +349,7 @@
#define INDEX_DrvBitBlt 18L
#define INDEX_DrvCopyBits 19L
#define INDEX_DrvStretchBlt 20L
+#define INDEX_DrvUnknown2 21L
#define INDEX_DrvSetPalette 22L
#define INDEX_DrvTextOut 23L
#define INDEX_DrvEscape 24L
@@ -362,8 +364,10 @@
#define INDEX_DrvStartPage 33L
#define INDEX_DrvEndDoc 34L
#define INDEX_DrvStartDoc 35L
+#define INDEX_DrvUnknown3 36L
#define INDEX_DrvGetGlyphMode 37L
#define INDEX_DrvSynchronize 38L
+#define INDEX_DrvUnknown4 39L
#define INDEX_DrvSaveScreenBits 40L
#define INDEX_DrvGetModes 41L
#define INDEX_DrvFree 42L
@@ -387,6 +391,7 @@
#define INDEX_DrvEnableDirectDraw 60L
#define INDEX_DrvDisableDirectDraw 61L
#define INDEX_DrvQuerySpoolType 62L
+#define INDEX_DrvUnknown5 63L
#define INDEX_DrvIcmCreateColorTransform 64L
#define INDEX_DrvIcmDeleteColorTransform 65L
#define INDEX_DrvIcmCheckBitmapBits 66L
@@ -3622,6 +3627,7 @@
IN LPWSTR pwszDeviceName,
IN HANDLE hDriver);
#endif
+
typedef HSURF
(APIENTRY *PFN_DrvEnableSurface)(
IN DHPDEV dhpdev);
Modified: trunk/reactos/include/reactos/drivers/directx/directxint.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/di…
==============================================================================
--- trunk/reactos/include/reactos/drivers/directx/directxint.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/drivers/directx/directxint.h [iso-8859-1] Thu May 1
11:36:42 2008
@@ -140,7 +140,7 @@
/* 0x034 */ VIDEOMEMORY *pvmList; // 0x034 <--
verified to match Windows XP, pvmList
/* 0x038 */ DWORD dwNumFourCC;
/* 0x03C */ PDWORD pdwFourCC;
-/* 0x040 */ DD_HALINFO ddHalInfo;
+/* 0x040 */ DD_HALINFO ddHalInfo; // 0x040 <--
verified to match Windows XP, ddHalInfo
/* 0x1E0 */ ULONG unk_1e0[46];
/* 0x298 */ DD_CALLBACKS ddCallbacks; // 0x298 <--
verified to match Windows XP, ddCallbacks
/* 0x2C0 */ DD_SURFACECALLBACKS ddSurfaceCallbacks; // 0x2C4 <--
verified to match Windows XP, ddSurfaceCallbacks
Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdityp.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntgdityp.h [iso-8859-1] Thu May 1 11:36:42 2008
@@ -130,28 +130,28 @@
GDIObjType_DRVOBJ_TYPE = 0x1c,
GDIObjType_DCIOBJ_TYPE = 0x1d,
GDIObjType_SPOOL_TYPE = 0x1e,
- GDIObjType_MAX_TYPE = 0x1e,
- GDIObjTypeTotal = 0x1f,
+ GDIObjType_MAX_TYPE = 0x1e,
+ GDIObjTypeTotal = 0x1f,
} GDIOBJTYPE, *PGDIOBJTYPE;
-
-typedef enum GDILoObjType
-{
- GDILoObjType_LO_BRUSH_TYPE = 0x100000,
- GDILoObjType_LO_DC_TYPE = 0x10000,
- GDILoObjType_LO_BITMAP_TYPE = 0x50000,
- GDILoObjType_LO_PALETTE_TYPE = 0x80000,
- GDILoObjType_LO_FONT_TYPE = 0xa0000,
- GDILoObjType_LO_REGION_TYPE = 0x40000,
- GDILoObjType_LO_ICMLCS_TYPE = 0x90000,
- GDILoObjType_LO_CLIENTOBJ_TYPE = 0x60000,
- GDILoObjType_LO_ALTDC_TYPE = 0x210000,
- GDILoObjType_LO_PEN_TYPE = 0x300000,
- GDILoObjType_LO_EXTPEN_TYPE = 0x500000,
- GDILoObjType_LO_DIBSECTION_TYPE = 0x250000,
- GDILoObjType_LO_METAFILE16_TYPE = 0x260000,
- GDILoObjType_LO_METAFILE_TYPE = 0x460000,
- GDILoObjType_LO_METADC16_TYPE = 0x660000
-} GDILOOBJTYPE, *PGDILOOBJTYPE;
+
+typedef enum GDILoObjType
+{
+ GDILoObjType_LO_BRUSH_TYPE = 0x100000,
+ GDILoObjType_LO_DC_TYPE = 0x10000,
+ GDILoObjType_LO_BITMAP_TYPE = 0x50000,
+ GDILoObjType_LO_PALETTE_TYPE = 0x80000,
+ GDILoObjType_LO_FONT_TYPE = 0xa0000,
+ GDILoObjType_LO_REGION_TYPE = 0x40000,
+ GDILoObjType_LO_ICMLCS_TYPE = 0x90000,
+ GDILoObjType_LO_CLIENTOBJ_TYPE = 0x60000,
+ GDILoObjType_LO_ALTDC_TYPE = 0x210000,
+ GDILoObjType_LO_PEN_TYPE = 0x300000,
+ GDILoObjType_LO_EXTPEN_TYPE = 0x500000,
+ GDILoObjType_LO_DIBSECTION_TYPE = 0x250000,
+ GDILoObjType_LO_METAFILE16_TYPE = 0x260000,
+ GDILoObjType_LO_METAFILE_TYPE = 0x460000,
+ GDILoObjType_LO_METADC16_TYPE = 0x660000
+} GDILOOBJTYPE, *PGDILOOBJTYPE;
#define GdiWorldSpaceToPageSpace 0x203
@@ -531,102 +531,102 @@
//
typedef struct _DRIVER_FUNCTIONS
{
- PGD_ENABLEDRIVER EnableDriver; //ReactOS Extra
- PGD_ENABLEPDEV EnablePDEV;
- PGD_COMPLETEPDEV CompletePDEV;
- PGD_DISABLEPDEV DisablePDEV;
- PGD_ENABLESURFACE EnableSurface;
- PGD_DISABLESURFACE DisableSurface;
- PGD_ASSERTMODE AssertMode;
- PGD_OFFSET Offset;
- PGD_RESETPDEV ResetPDEV;
- PGD_DISABLEDRIVER DisableDriver;
- PVOID Unknown0;
- PGD_CREATEDEVICEBITMAP CreateDeviceBitmap;
- PGD_DELETEDEVICEBITMAP DeleteDeviceBitmap;
- PGD_REALIZEBRUSH RealizeBrush;
- PGD_DITHERCOLOR DitherColor;
- PGD_STROKEPATH StrokePath;
- PGD_FILLPATH FillPath;
- PGD_STROKEANDFILLPATH StrokeAndFillPath;
- PGD_PAINT Paint;
- PGD_BITBLT BitBlt;
- PGD_COPYBITS CopyBits;
- PGD_STRETCHBLT StretchBlt;
- PVOID Unknown1;
- PGD_SETPALETTE SetPalette;
- PGD_TEXTOUT TextOut;
- PGD_ESCAPE Escape;
- PGD_DRAWESCAPE DrawEscape;
- PGD_QUERYFONT QueryFont;
- PGD_QUERYFONTTREE QueryFontTree;
- PGD_QUERYFONTDATA QueryFontData;
- PGD_SETPOINTERSHAPE SetPointerShape;
- PGD_MOVEPOINTER MovePointer;
- PGD_LINETO LineTo;
- PGD_SENDPAGE SendPage;
- PGD_STARTPAGE StartPage;
- PGD_ENDDOC EndDoc;
- PGD_STARTDOC StartDoc;
- PVOID Unknown2;
- PGD_GETGLYPHMODE GetGlyphMode;
- PGD_SYNCHRONIZE Synchronize;
- PVOID Unknown3;
- PGD_SAVESCREENBITS SaveScreenBits;
- PGD_GETMODES GetModes;
- PGD_FREE Free;
- PGD_DESTROYFONT DestroyFont;
- PGD_QUERYFONTCAPS QueryFontCaps;
- PGD_LOADFONTFILE LoadFontFile;
- PGD_UNLOADFONTFILE UnloadFontFile;
- PGD_FONTMANAGEMENT FontManagement;
- PGD_QUERYTRUETYPETABLE QueryTrueTypeTable;
- PGD_QUERYTRUETYPEOUTLINE QueryTrueTypeOutline;
- PGD_GETTRUETYPEFILE GetTrueTypeFile;
- PGD_QUERYFONTFILE QueryFontFile;
- PFN_DrvMovePanning MovePanning;
- PGD_QUERYADVANCEWIDTHS QueryAdvanceWidths;
- PGD_SETPIXELFORMAT SetPixelFormat;
- PGD_DESCRIBEPIXELFORMAT DescribePixelFormat;
- PGD_SWAPBUFFERS SwapBuffers;
- PGD_STARTBANDING StartBanding;
- PGD_NEXTBAND NextBand;
- PGD_GETDIRECTDRAWINFO GetDirectDrawInfo;
- PGD_ENABLEDIRECTDRAW EnableDirectDraw;
- PGD_DISABLEDIRECTDRAW DisableDirectDraw;
- PGD_QUERYSPOOLTYPE QuerySpoolType;
- PVOID Unknown4;
- PFN_DrvIcmCreateColorTransform IcmCreateColorTransform;
- PFN_DrvIcmDeleteColorTransform IcmDeleteColorTransform;
- PFN_DrvIcmCheckBitmapBits IcmCheckBitmapBits;
- PFN_DrvIcmSetDeviceGammaRamp IcmSetDeviceGammaRamp;
- PGD_GRADIENTFILL GradientFill;
- PGD_STRETCHBLTROP StretchBltROP;
- PFN_DrvPlgBlt PlgBlt;
- PGD_ALPHABLEND AlphaBlend;
- PVOID SynthesizeFont;
- PVOID Unknown5;
- PVOID GetSynthesizedFontFiles;
- PVOID Unknown6;
- PGD_TRANSPARENTBLT TransparentBlt;
- PFN_DrvQueryPerBandInfo QueryPerBandInfo;
- PFN_DrvQueryDeviceSupport QueryDeviceSupport;
- PVOID Reserved1;
- PVOID Reserved2;
- PVOID Reserved3;
- PVOID Reserved4;
- PVOID Reserved5;
- PVOID Reserved6;
- PVOID Reserved7;
- PVOID Reserved8;
- PFN_DrvDeriveSurface DeriveSurface;
- PFN_DrvQueryGlyphAttrs QueryGlyphAttrs;
- PFN_DrvNotify Notify;
- PGD_SYNCHRONIZESURFACE SynchronizeSurface;
- PFN_DrvResetDevice ResetDevice;
- PVOID Reserved9;
- PVOID Reserved10;
- PVOID Reserved11;
+ PGD_ENABLEPDEV EnablePDEV;
+ PGD_COMPLETEPDEV CompletePDEV;
+ PGD_DISABLEPDEV DisablePDEV;
+ PGD_ENABLESURFACE EnableSurface;
+ PGD_DISABLESURFACE DisableSurface;
+ PGD_ASSERTMODE AssertMode;
+ PGD_OFFSET Offset;
+ PGD_RESETPDEV ResetPDEV;
+ PGD_DISABLEDRIVER DisableDriver;
+ PVOID Unknown1;
+ PGD_CREATEDEVICEBITMAP CreateDeviceBitmap;
+ PGD_DELETEDEVICEBITMAP DeleteDeviceBitmap;
+ PGD_REALIZEBRUSH RealizeBrush;
+ PGD_DITHERCOLOR DitherColor;
+ PGD_STROKEPATH StrokePath;
+ PGD_FILLPATH FillPath;
+ PGD_STROKEANDFILLPATH StrokeAndFillPath;
+ PGD_PAINT Paint;
+ PGD_BITBLT BitBlt;
+ PGD_COPYBITS CopyBits;
+ PGD_STRETCHBLT StretchBlt;
+ PVOID Unknown2;
+ PGD_SETPALETTE SetPalette;
+ PGD_TEXTOUT TextOut;
+ PGD_ESCAPE Escape;
+ PGD_DRAWESCAPE DrawEscape;
+ PGD_QUERYFONT QueryFont;
+ PGD_QUERYFONTTREE QueryFontTree;
+ PGD_QUERYFONTDATA QueryFontData;
+ PGD_SETPOINTERSHAPE SetPointerShape;
+ PGD_MOVEPOINTER MovePointer;
+ PGD_LINETO LineTo;
+ PGD_SENDPAGE SendPage;
+ PGD_STARTPAGE StartPage;
+ PGD_ENDDOC EndDoc;
+ PGD_STARTDOC StartDoc;
+ PVOID Unknown3;
+ PGD_GETGLYPHMODE GetGlyphMode;
+ PGD_SYNCHRONIZE Synchronize;
+ PVOID Unknown4;
+ PGD_SAVESCREENBITS SaveScreenBits;
+ PGD_GETMODES GetModes;
+ PGD_FREE Free;
+ PGD_DESTROYFONT DestroyFont;
+ PGD_QUERYFONTCAPS QueryFontCaps;
+ PGD_LOADFONTFILE LoadFontFile;
+ PGD_UNLOADFONTFILE UnloadFontFile;
+ PGD_FONTMANAGEMENT FontManagement;
+ PGD_QUERYTRUETYPETABLE QueryTrueTypeTable;
+ PGD_QUERYTRUETYPEOUTLINE QueryTrueTypeOutline;
+ PGD_GETTRUETYPEFILE GetTrueTypeFile;
+ PGD_QUERYFONTFILE QueryFontFile;
+ PFN_DrvMovePanning MovePanning;
+ PGD_QUERYADVANCEWIDTHS QueryAdvanceWidths;
+ PGD_SETPIXELFORMAT SetPixelFormat;
+ PGD_DESCRIBEPIXELFORMAT DescribePixelFormat;
+ PGD_SWAPBUFFERS SwapBuffers;
+ PGD_STARTBANDING StartBanding;
+ PGD_NEXTBAND NextBand;
+ PGD_GETDIRECTDRAWINFO GetDirectDrawInfo;
+ PGD_ENABLEDIRECTDRAW EnableDirectDraw;
+ PGD_DISABLEDIRECTDRAW DisableDirectDraw;
+ PGD_QUERYSPOOLTYPE QuerySpoolType;
+ PVOID Unknown5;
+ PFN_DrvIcmCreateColorTransform IcmCreateColorTransform;
+ PFN_DrvIcmDeleteColorTransform IcmDeleteColorTransform;
+ PFN_DrvIcmCheckBitmapBits IcmCheckBitmapBits;
+ PFN_DrvIcmSetDeviceGammaRamp IcmSetDeviceGammaRamp;
+ PGD_GRADIENTFILL GradientFill;
+ PGD_STRETCHBLTROP StretchBltROP;
+ PFN_DrvPlgBlt PlgBlt;
+ PGD_ALPHABLEND AlphaBlend;
+ PVOID SynthesizeFont;
+ PVOID GetSynthesizedFontFiles;
+ PGD_TRANSPARENTBLT TransparentBlt;
+ PFN_DrvQueryPerBandInfo QueryPerBandInfo;
+ PFN_DrvQueryDeviceSupport QueryDeviceSupport;
+ PVOID Reserved1;
+ PVOID Reserved2;
+ PVOID Reserved3;
+ PVOID Reserved4;
+ PVOID Reserved5;
+ PVOID Reserved6;
+ PVOID Reserved7;
+ PVOID Reserved8;
+ PFN_DrvDeriveSurface DeriveSurface;
+ PFN_DrvQueryGlyphAttrs QueryGlyphAttrs;
+ PFN_DrvNotify Notify;
+ PGD_SYNCHRONIZESURFACE SynchronizeSurface;
+ PFN_DrvResetDevice ResetDevice;
+ PVOID Reserved9;
+ PVOID Reserved10;
+ PVOID Reserved11; /* 92 */
+
+ /* ReactOS specify */
+ PGD_ENABLEDRIVER EnableDriver; //ReactOS Extra
} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
#endif
Modified: trunk/reactos/subsystems/win32/win32k/misc/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/mi…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/misc/driver.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/misc/driver.c [iso-8859-1] Thu May 1 11:36:42
2008
@@ -30,6 +30,7 @@
/* #define TRACE_DRV_CALLS to get a log of all calls into the display driver. */
#undef TRACE_DRV_CALLS
+
typedef struct _GRAPHICS_DRIVER
{
@@ -391,8 +392,7 @@
PDRIVER_FUNCTIONS DF)
{
BEGIN_FUNCTION_MAP();
-
- DRIVER_FUNCTION(EnablePDEV);
+ DRIVER_FUNCTION(EnablePDEV);
DRIVER_FUNCTION(CompletePDEV);
DRIVER_FUNCTION(DisablePDEV);
DRIVER_FUNCTION(EnableSurface);
@@ -401,6 +401,7 @@
DRIVER_FUNCTION(Offset);
DRIVER_FUNCTION(ResetPDEV);
DRIVER_FUNCTION(DisableDriver);
+ DRIVER_FUNCTION(Unknown1);
DRIVER_FUNCTION(CreateDeviceBitmap);
DRIVER_FUNCTION(DeleteDeviceBitmap);
DRIVER_FUNCTION(RealizeBrush);
@@ -410,10 +411,9 @@
DRIVER_FUNCTION(StrokeAndFillPath);
DRIVER_FUNCTION(Paint);
DRIVER_FUNCTION(BitBlt);
- DRIVER_FUNCTION(TransparentBlt);
DRIVER_FUNCTION(CopyBits);
DRIVER_FUNCTION(StretchBlt);
- DRIVER_FUNCTION(StretchBltROP);
+ DRIVER_FUNCTION(Unknown2);
DRIVER_FUNCTION(SetPalette);
DRIVER_FUNCTION(TextOut);
DRIVER_FUNCTION(Escape);
@@ -428,8 +428,10 @@
DRIVER_FUNCTION(StartPage);
DRIVER_FUNCTION(EndDoc);
DRIVER_FUNCTION(StartDoc);
+ DRIVER_FUNCTION(Unknown3);
DRIVER_FUNCTION(GetGlyphMode);
DRIVER_FUNCTION(Synchronize);
+ DRIVER_FUNCTION(Unknown4);
DRIVER_FUNCTION(SaveScreenBits);
DRIVER_FUNCTION(GetModes);
DRIVER_FUNCTION(Free);
@@ -452,11 +454,36 @@
DRIVER_FUNCTION(EnableDirectDraw);
DRIVER_FUNCTION(DisableDirectDraw);
DRIVER_FUNCTION(QuerySpoolType);
- DRIVER_FUNCTION(IcmSetDeviceGammaRamp);
- DRIVER_FUNCTION(GradientFill);
- DRIVER_FUNCTION(SynchronizeSurface);
- DRIVER_FUNCTION(AlphaBlend);
-
+ DRIVER_FUNCTION(Unknown5);
+ DRIVER_FUNCTION(IcmCreateColorTransform);
+ DRIVER_FUNCTION(IcmDeleteColorTransform);
+ DRIVER_FUNCTION(IcmCheckBitmapBits);
+ DRIVER_FUNCTION(IcmSetDeviceGammaRamp);
+ DRIVER_FUNCTION(GradientFill);
+ DRIVER_FUNCTION(StretchBltROP);
+ DRIVER_FUNCTION(PlgBlt);
+ DRIVER_FUNCTION(AlphaBlend);
+ DRIVER_FUNCTION(SynthesizeFont);
+ DRIVER_FUNCTION(GetSynthesizedFontFiles);
+ DRIVER_FUNCTION(TransparentBlt);
+ DRIVER_FUNCTION(QueryPerBandInfo);
+ DRIVER_FUNCTION(QueryDeviceSupport);
+ DRIVER_FUNCTION(Reserved1);
+ DRIVER_FUNCTION(Reserved2);
+ DRIVER_FUNCTION(Reserved3);
+ DRIVER_FUNCTION(Reserved4);
+ DRIVER_FUNCTION(Reserved5);
+ DRIVER_FUNCTION(Reserved6);
+ DRIVER_FUNCTION(Reserved7);
+ DRIVER_FUNCTION(Reserved8);
+ DRIVER_FUNCTION(DeriveSurface);
+ DRIVER_FUNCTION(QueryGlyphAttrs);
+ DRIVER_FUNCTION(Notify);
+ DRIVER_FUNCTION(SynchronizeSurface);
+ DRIVER_FUNCTION(ResetDevice);
+ DRIVER_FUNCTION(Reserved9);
+ DRIVER_FUNCTION(Reserved10);
+ DRIVER_FUNCTION(Reserved11);
END_FUNCTION_MAP();
return TRUE;
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] Thu May 1 11:36:42
2008
@@ -737,6 +737,8 @@
/************************************************************************/
BOOL STDCALL DxEngSetDCOwner(HGDIOBJ hObject, DWORD OwnerMask)
{
+ DPRINT1("ReactX Calling : DxEngSetDCOwner \n");
+
return IntGdiSetDCOwnerEx( hObject, OwnerMask, FALSE);
}