Author: greatlrd
Date: Tue Jul 18 19:57:42 2006
New Revision: 23155
URL:
http://svn.reactos.org/svn/reactos?rev=23155&view=rev
Log:
setup almost all info it need in DrvGetDirectDrawInfo, left todo is the rop table.
and debugging see if everything went right. it is eunght for me continue on next
step in debugging
Modified:
trunk/reactos/drivers/video/displays/framebuf/ddenable.c
trunk/reactos/drivers/video/displays/framebuf/framebuf.h
trunk/reactos/drivers/video/displays/framebuf/screen.c
Modified: trunk/reactos/drivers/video/displays/framebuf/ddenable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/ddenable.c (original)
+++ trunk/reactos/drivers/video/displays/framebuf/ddenable.c Tue Jul 18 19:57:42 2006
@@ -55,6 +55,8 @@
ppdev->ddpfDisplay.dwRGBAlphaBitMask = 0;
ppdev->ddpfDisplay.dwFlags = DDPF_RGB;
+ ppdev->pvmList = NULL;
+
switch(ppdev->iDitherFormat)
{
case BMF_8BPP:
@@ -135,8 +137,10 @@
OUT DWORD *pdwFourCC)
{
PPDEV ppdev = (PPDEV)dhpdev;
- int i;
-
+ LONG i;
+ DWORD heap = 1; /* we always alloc one heap */
+ BOOL bDDrawHeap = FALSE;
+
if (ppdev == NULL)
return FALSE;
@@ -152,11 +156,21 @@
if (pdwNumFourCCCodes == NULL)
return FALSE;
-
- /* rest some data */
+
+ /* Setup heap */
+ if ( (ppdev->ScreenWidth < ppdev->MemWidth) || (ppdev->ScreenHeight <
ppdev->MemHeight))
+ {
+ bDDrawHeap = TRUE;
+ heap++;
+ }
+
+ ppdev->dwHeap = heap;
+ *pdwNumHeaps = heap;
+
+ /* We do not support other fourcc */
*pdwNumFourCCCodes = 0;
- *pdwNumHeaps = 0;
-
+
+
/*
check see if pvmList and pdwFourCC are frist call
or frist. Secon call we fill in pHalInfo info
@@ -218,8 +232,28 @@
}
}
- /* Now fix the memory alloc and other stuff */
-
+ /* Now build pvmList info */
+ if(pvmList)
+ {
+ ppdev->pvmList = pvmList;
+
+ if ( bDDrawHeap == TRUE)
+ {
+ pvmList->dwFlags = VIDMEM_ISLINEAR ;
+ pvmList->fpStart = ppdev->ScreenHeight * ppdev->ScreenDelta;
+ pvmList->fpEnd = ppdev->MemHeight * ppdev->ScreenDelta -
1;
+ pvmList->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
+ pvmList++;
+ }
+
+ pvmList->fpStart = 0;
+ pvmList->fpEnd = (ppdev->MemHeight * ppdev->ScreenDelta) - 1;
+ pvmList->dwFlags = VIDMEM_ISNONLOCAL | VIDMEM_ISLINEAR | VIDMEM_ISWC;
+ pvmList->ddsCaps.dwCaps = DDSCAPS_FRONTBUFFER | DDSCAPS_BACKBUFFER ;
+ pvmList->ddsCapsAlt.dwCaps = DDSCAPS_FRONTBUFFER | DDSCAPS_BACKBUFFER;
+
+ pvmList = ppdev->pvmList;
+ }
return TRUE;
}
Modified: trunk/reactos/drivers/video/displays/framebuf/framebuf.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/framebuf.h (original)
+++ trunk/reactos/drivers/video/displays/framebuf/framebuf.h Tue Jul 18 19:57:42 2006
@@ -65,9 +65,12 @@
/* DirectX Support */
DWORD iDitherFormat;
ULONG MemHeight;
+ ULONG MemWidth;
+ DWORD dwHeap;
+ VIDEOMEMORY* pvmList;
BOOL bDDInitialized;
DDPIXELFORMAT ddpfDisplay;
- DDHALINFO dxHalInfo;
+ DDHALINFO dxHalInfo;
} PDEV, *PPDEV;
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) +
((D)<<24))
Modified: trunk/reactos/drivers/video/displays/framebuf/screen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/screen.c (original)
+++ trunk/reactos/drivers/video/displays/framebuf/screen.c Tue Jul 18 19:57:42 2006
@@ -191,6 +191,7 @@
ppdev->ScreenDelta = SelectedMode->ScreenStride;
ppdev->BitsPerPixel = SelectedMode->BitsPerPlane *
SelectedMode->NumberOfPlanes;
+ ppdev->MemWidth = SelectedMode->VideoMemoryBitmapWidth;
ppdev->MemHeight = SelectedMode->VideoMemoryBitmapHeight;
ppdev->RedMask = SelectedMode->RedMask;