Author: greatlrd
Date: Thu Apr 17 17:25:38 2008
New Revision: 33012
URL:
http://svn.reactos.org/svn/reactos?rev=33012&view=rev
Log:
optimze more redirect call and start kill the bad macro DXG_GET_INDEX_FUNCTION that is
instable
the dx hal for graphic interface started being bit more stable.
Modified:
trunk/reactos/subsystems/win32/win32k/ntddraw/d3d.c
trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c
trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c
trunk/reactos/subsystems/win32/win32k/ntddraw/dvp.c
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/d3d.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/d3d.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/d3d.c [iso-8859-1] Thu Apr 17 17:25:38
2008
@@ -289,11 +289,8 @@
STDCALL
NtGdiDdDestroyD3DBuffer(HANDLE hSurface)
{
- PGD_DXDDDESTROYD3DBUFFER pfnDdDestroyD3DBuffer = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDestroyD3DBuffer, pfnDdDestroyD3DBuffer);
-
+ PGD_DXDDDESTROYD3DBUFFER pfnDdDestroyD3DBuffer =
(PGD_DXDDDESTROYD3DBUFFER)gpDxFuncs[DXG_INDEX_DxDdDestroyD3DBuffer].pfn;
+
if (pfnDdDestroyD3DBuffer == NULL)
{
DPRINT1("Warring no pfnDdDestroyD3DBuffer");
@@ -317,11 +314,8 @@
FLATPTR *pfpVidMemVtx,
DWORD *pdwSizeVtx)
{
- PGD_D3DDRAWPRIMITIVES2 pfnD3dDrawPrimitives2 = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dDrawPrimitives2, pfnD3dDrawPrimitives2);
-
+ PGD_D3DDRAWPRIMITIVES2 pfnD3dDrawPrimitives2 =
(PGD_D3DDRAWPRIMITIVES2)gpDxFuncs[DXG_INDEX_DxD3dDrawPrimitives2].pfn;
+
if (pfnD3dDrawPrimitives2 == NULL)
{
DPRINT1("Warring no pfnD3dDrawPrimitives2");
@@ -341,11 +335,8 @@
NtGdiDdLockD3D(HANDLE hSurface,
PDD_LOCKDATA puLockData)
{
- PGD_DXDDLOCKD3D pfnDdLockD3D = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdLockD3D, pfnDdLockD3D);
-
+ PGD_DXDDLOCKD3D pfnDdLockD3D =
(PGD_DXDDLOCKD3D)gpDxFuncs[DXG_INDEX_DxDdLockD3D].pfn;
+
if (pfnDdLockD3D == NULL)
{
DPRINT1("Warring no pfnDdLockD3D");
@@ -363,11 +354,8 @@
STDCALL
NtGdiD3dValidateTextureStageState(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData)
{
- PGD_D3DVALIDATETEXTURESTAGESTATE pfnD3dValidateTextureStageState = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dValidateTextureStageState,
pfnD3dValidateTextureStageState);
-
+ PGD_D3DVALIDATETEXTURESTAGESTATE pfnD3dValidateTextureStageState =
(PGD_D3DVALIDATETEXTURESTAGESTATE)gpDxFuncs[DXG_INDEX_DxD3dValidateTextureStageState].pfn;
+
if (pfnD3dValidateTextureStageState == NULL)
{
DPRINT1("Warring no pfnD3dValidateTextureStageState");
@@ -386,11 +374,8 @@
NtGdiDdUnlockD3D(HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData)
{
- PGD_DXDDUNLOCKD3D pfnDdUnlockD3D = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdUnlockD3D, pfnDdUnlockD3D);
-
+ PGD_DXDDUNLOCKD3D pfnDdUnlockD3D =
(PGD_DXDDUNLOCKD3D)gpDxFuncs[DXG_INDEX_DxDdUnlockD3D].pfn;
+
if (pfnDdUnlockD3D == NULL)
{
DPRINT1("Warring no pfnDdUnlockD3D");
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c [iso-8859-1] Thu Apr 17 17:25:38
2008
@@ -25,11 +25,8 @@
PDD_CREATESURFACEDATA puCreateSurfaceData,
HANDLE *puhSurface)
{
- PGD_DDCREATESURFACE pfnDdCreateSurface = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCreateSurface, pfnDdCreateSurface);
-
+ PGD_DDCREATESURFACE pfnDdCreateSurface =
(PGD_DDCREATESURFACE)gpDxFuncs[DXG_INDEX_DxDdCreateSurface].pfn;
+
if (pfnDdCreateSurface == NULL)
{
DPRINT1("Warring no pfnDdCreateSurface");
@@ -49,11 +46,8 @@
NtGdiDdWaitForVerticalBlank(HANDLE hDirectDraw,
PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
{
- PGD_DXDDWAITFORVERTICALBLANK pfnDdWaitForVerticalBlank = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdWaitForVerticalBlank,
pfnDdWaitForVerticalBlank);
-
+ PGD_DXDDWAITFORVERTICALBLANK pfnDdWaitForVerticalBlank =
(PGD_DXDDWAITFORVERTICALBLANK)gpDxFuncs[DXG_INDEX_DxDdWaitForVerticalBlank].pfn;
+
if (pfnDdWaitForVerticalBlank == NULL)
{
DPRINT1("Warring no pfnDdWaitForVerticalBlank");
@@ -72,11 +66,8 @@
NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal,
PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
{
- PGD_DDCANCREATESURFACE pfnDdCanCreateSurface = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCanCreateSurface, pfnDdCanCreateSurface);
-
+ PGD_DDCANCREATESURFACE pfnDdCanCreateSurface =
(PGD_DDCANCREATESURFACE)gpDxFuncs[DXG_INDEX_DxDdCanCreateSurface].pfn;
+
if (pfnDdCanCreateSurface == NULL)
{
DPRINT1("Warring no pfnDdCanCreateSurface");
@@ -95,11 +86,8 @@
NtGdiDdGetScanLine(HANDLE hDirectDrawLocal,
PDD_GETSCANLINEDATA puGetScanLineData)
{
- PGD_DXDDGETSCANLINE pfnDdGetScanLine = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetScanLine, pfnDdGetScanLine);
-
+ PGD_DXDDGETSCANLINE pfnDdGetScanLine =
(PGD_DXDDGETSCANLINE)gpDxFuncs[DXG_INDEX_DxDdGetScanLine].pfn;
+
if (pfnDdGetScanLine == NULL)
{
DPRINT1("Warring no pfnDdGetScanLine");
@@ -125,11 +113,8 @@
HANDLE hSurface,
DWORD dwSurfaceHandle)
{
- PGD_DXDDCREATESURFACEEX pfnDdCreateSurfaceEx = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCreateSurfaceEx, pfnDdCreateSurfaceEx);
-
+ PGD_DXDDCREATESURFACEEX pfnDdCreateSurfaceEx =
(PGD_DXDDCREATESURFACEEX)gpDxFuncs[DXG_INDEX_DxDdCreateSurfaceEx].pfn;
+
if (pfnDdCreateSurfaceEx == NULL)
{
DPRINT1("Warring no pfnDdCreateSurfaceEx");
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c [iso-8859-1] Thu Apr 17
17:25:38 2008
@@ -18,11 +18,8 @@
STDCALL
NtGdiDdDestroySurface(HANDLE hSurface, BOOL bRealDestroy)
{
- PGD_DXDDDESTROYSURFACE pfnDdDestroySurface = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdDestroySurface, pfnDdDestroySurface);
-
+ PGD_DXDDDESTROYSURFACE pfnDdDestroySurface =
(PGD_DXDDDESTROYSURFACE)gpDxFuncs[DXG_INDEX_DxDdDestroySurface].pfn;
+
if (pfnDdDestroySurface == NULL)
{
DPRINT1("Warring no pfnDdDestroySurface");
@@ -44,11 +41,8 @@
HANDLE hSurfaceTargetLeft,
PDD_FLIPDATA puFlipData)
{
- PGD_DXDDFLIP pfnDdDdFlip = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdFlip, pfnDdDdFlip);
-
+ PGD_DXDDFLIP pfnDdDdFlip = (PGD_DXDDFLIP)gpDxFuncs[DXG_INDEX_DxDdFlip].pfn;
+
if (pfnDdDdFlip == NULL)
{
DPRINT1("Warring no pfnDdDdFlip");
@@ -68,11 +62,8 @@
PDD_LOCKDATA puLockData,
HDC hdcClip)
{
- PGD_DXDDLOCK pfnDdLock = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdLock, pfnDdLock);
-
+ PGD_DXDDLOCK pfnDdLock = (PGD_DXDDLOCK)gpDxFuncs[DXG_INDEX_DxDdLock].pfn;
+
if (pfnDdLock == NULL)
{
DPRINT1("Warring no pfnDdLock");
@@ -91,11 +82,8 @@
NtGdiDdUnlock(HANDLE hSurface,
PDD_UNLOCKDATA puUnlockData)
{
- PGD_DXDDUNLOCK pfnDdUnlock = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdUnlock, pfnDdUnlock);
-
+ PGD_DXDDUNLOCK pfnDdUnlock = (PGD_DXDDUNLOCK)gpDxFuncs[DXG_INDEX_DxDdUnlock].pfn;
+
if (pfnDdUnlock == NULL)
{
DPRINT1("Warring no pfnDdUnlock");
@@ -115,11 +103,8 @@
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData)
{
- PGD_DDBLT pfnDdBlt = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdBlt, pfnDdBlt);
-
+ PGD_DDBLT pfnDdBlt = (PGD_DDBLT)gpDxFuncs[DXG_INDEX_DxDdBlt].pfn;
+
if (pfnDdBlt == NULL)
{
DPRINT1("Warring no pfnDdBlt");
@@ -138,11 +123,8 @@
NtGdiDdSetColorKey(HANDLE hSurface,
PDD_SETCOLORKEYDATA puSetColorKeyData)
{
- PGD_DXDDSETCOLORKEY pfnDdSetColorKey = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdSetColorKey, pfnDdSetColorKey);
-
+ PGD_DXDDSETCOLORKEY pfnDdSetColorKey =
(PGD_DXDDSETCOLORKEY)gpDxFuncs[DXG_INDEX_DxDdSetColorKey].pfn;
+
if (pfnDdSetColorKey == NULL)
{
DPRINT1("Warring no pfnDdSetColorKey");
@@ -164,11 +146,8 @@
HANDLE hSurfaceAttached,
PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData)
{
- PGD_DDADDATTACHEDSURFACE pfnDdAddAttachedSurface = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdAddAttachedSurface, pfnDdAddAttachedSurface);
-
+ PGD_DDADDATTACHEDSURFACE pfnDdAddAttachedSurface =
(PGD_DDADDATTACHEDSURFACE)gpDxFuncs[DXG_INDEX_DxDdAddAttachedSurface].pfn;
+
if (pfnDdAddAttachedSurface == NULL)
{
DPRINT1("Warring no pfnDdAddAttachedSurface");
@@ -187,11 +166,8 @@
NtGdiDdGetBltStatus(HANDLE hSurface,
PDD_GETBLTSTATUSDATA puGetBltStatusData)
{
- PGD_DXDDGETBLTSTATUS pfnDdGetBltStatus = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetBltStatus, pfnDdGetBltStatus);
-
+ PGD_DXDDGETBLTSTATUS pfnDdGetBltStatus =
(PGD_DXDDGETBLTSTATUS)gpDxFuncs[DXG_INDEX_DxDdGetBltStatus].pfn;
+
if (pfnDdGetBltStatus == NULL)
{
DPRINT1("Warring no pfnDdGetBltStatus");
@@ -210,11 +186,8 @@
NtGdiDdGetFlipStatus(HANDLE hSurface,
PDD_GETFLIPSTATUSDATA puGetFlipStatusData)
{
- PGD_DXDDGETFLIPSTATUS pfnDdGetFlipStatus = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetFlipStatus, pfnDdGetFlipStatus);
-
+ PGD_DXDDGETFLIPSTATUS pfnDdGetFlipStatus =
(PGD_DXDDGETFLIPSTATUS)gpDxFuncs[DXG_INDEX_DxDdGetFlipStatus].pfn;
+
if (pfnDdGetFlipStatus == NULL)
{
DPRINT1("Warring no pfnDdGetFlipStatus");
@@ -234,11 +207,8 @@
HANDLE hSurfaceSource,
PDD_UPDATEOVERLAYDATA puUpdateOverlayData)
{
- PGD_DXDDUPDATEOVERLAY pfnDdUpdateOverlay = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdUpdateOverlay, pfnDdUpdateOverlay);
-
+ PGD_DXDDUPDATEOVERLAY pfnDdUpdateOverlay =
(PGD_DXDDUPDATEOVERLAY)gpDxFuncs[DXG_INDEX_DxDdUpdateOverlay].pfn;
+
if (pfnDdUpdateOverlay == NULL)
{
DPRINT1("Warring no pfnDdUpdateOverlay");
@@ -259,11 +229,8 @@
HANDLE hSurfaceDestination,
PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData)
{
- PGD_DXDDSETOVERLAYPOSITION pfnDdSetOverlayPosition = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdSetOverlayPosition, pfnDdSetOverlayPosition);
-
+ PGD_DXDDSETOVERLAYPOSITION pfnDdSetOverlayPosition =
(PGD_DXDDSETOVERLAYPOSITION)gpDxFuncs[DXG_INDEX_DxDdSetOverlayPosition].pfn;
+
if (pfnDdSetOverlayPosition == NULL)
{
DPRINT1("Warring no pfnDdSetOverlayPosition");
@@ -289,11 +256,8 @@
HANDLE hSurfaceSrc,
PDD_BLTDATA puBltData)
{
- PGD_DDALPHABLT pfnDdAlphaBlt = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdAlphaBlt, pfnDdAlphaBlt);
-
+ PGD_DDALPHABLT pfnDdAlphaBlt =
(PGD_DDALPHABLT)gpDxFuncs[DXG_INDEX_DxDdAlphaBlt].pfn;
+
if (pfnDdAlphaBlt == NULL)
{
DPRINT1("Warring no pfnDdAlphaBlt");
@@ -313,11 +277,8 @@
HANDLE hSurfaceTo
)
{
- PGD_DDATTACHSURFACE pfnDdAttachSurface = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdAttachSurface, pfnDdAttachSurface);
-
+ PGD_DDATTACHSURFACE pfnDdAttachSurface =
(PGD_DDATTACHSURFACE)gpDxFuncs[DXG_INDEX_DxDdAttachSurface].pfn;
+
if (pfnDdAttachSurface == NULL)
{
DPRINT1("Warring no pfnDdAttachSurface");
@@ -340,11 +301,7 @@
NtGdiDdUnattachSurface(HANDLE hSurface,
HANDLE hSurfaceAttached)
{
- PGD_DXDDUNATTACHSURFACE pfnDdUnattachSurface = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdUnattachSurface, pfnDdUnattachSurface);
-
+ PGD_DXDDUNATTACHSURFACE pfnDdUnattachSurface =
(PGD_DXDDUNATTACHSURFACE)gpDxFuncs[DXG_INDEX_DxDdUnattachSurface].pfn;
if (pfnDdUnattachSurface == NULL)
{
DPRINT1("Warring no pfnDdUnattachSurface");
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dvp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dvp.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dvp.c [iso-8859-1] Thu Apr 17 17:25:38
2008
@@ -21,11 +21,8 @@
NtGdiDvpCanCreateVideoPort(HANDLE hDirectDraw,
PDD_CANCREATEVPORTDATA puCanCreateVPortData)
{
- PGD_DVPCANCREATEVIDEOPORT pfnDvpCanCreateVideoPort = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpCanCreateVideoPort, pfnDvpCanCreateVideoPort);
-
+ PGD_DVPCANCREATEVIDEOPORT pfnDvpCanCreateVideoPort =
(PGD_DVPCANCREATEVIDEOPORT)gpDxFuncs[DXG_INDEX_DxDvpCanCreateVideoPort].pfn;
+
if (pfnDvpCanCreateVideoPort == NULL)
{
DPRINT1("Warring no pfnDvpCanCreateVideoPort");
@@ -44,11 +41,8 @@
NtGdiDvpColorControl(HANDLE hVideoPort,
PDD_VPORTCOLORDATA puVPortColorData)
{
- PGD_DVPCOLORCONTROL pfnDvpColorControl = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpColorControl, pfnDvpColorControl);
-
+ PGD_DVPCOLORCONTROL pfnDvpColorControl =
(PGD_DVPCOLORCONTROL)gpDxFuncs[DXG_INDEX_DxDvpColorControl].pfn;
+
if (pfnDvpColorControl == NULL)
{
DPRINT1("Warring no pfnDvpColorControl");
@@ -67,11 +61,8 @@
NtGdiDvpCreateVideoPort(HANDLE hDirectDraw,
PDD_CREATEVPORTDATA puCreateVPortData)
{
- PGD_DVPCREATEVIDEOPORT pfnDvpCreateVideoPort = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpCreateVideoPort, pfnDvpCreateVideoPort);
-
+ PGD_DVPCREATEVIDEOPORT pfnDvpCreateVideoPort =
(PGD_DVPCREATEVIDEOPORT)gpDxFuncs[DXG_INDEX_DxDvpCreateVideoPort].pfn;
+
if (pfnDvpCreateVideoPort == NULL)
{
DPRINT1("Warring no pfnDvpCreateVideoPort");
@@ -90,11 +81,8 @@
NtGdiDvpDestroyVideoPort(HANDLE hVideoPort,
PDD_DESTROYVPORTDATA puDestroyVPortData)
{
- PGD_DVPDESTROYVIDEOPORT pfnDvpDestroyVideoPort = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpDestroyVideoPort, pfnDvpDestroyVideoPort);
-
+ PGD_DVPDESTROYVIDEOPORT pfnDvpDestroyVideoPort =
(PGD_DVPDESTROYVIDEOPORT)gpDxFuncs[DXG_INDEX_DxDvpDestroyVideoPort].pfn;
+
if (pfnDvpDestroyVideoPort == NULL)
{
DPRINT1("Warring no pfnDvpDestroyVideoPort");