Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1998 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddagp.h
  6. * Content: AGP memory header file
  7. * History:
  8. * Date By Reason
  9. * ==== == ======
  10. * 03-Feb-98 DrewB Split from ddrawpr.h for user/kernel portability.
  11. *
  12. ***************************************************************************/
  13. #ifndef __DDAGP_INCLUDED__
  14. #define __DDAGP_INCLUDED__
  15. // This value controls how big a chunk of GART memory to commit each time
  16. // we need to (rather than commiting just what we need to satisfy a surface
  17. // request). This value is in bytes. Currently 256KB.
  18. #define DEFAULT_AGP_COMMIT_DELTA (256 * 1024)
  19. extern DWORD dwAGPPolicyMaxBytes;
  20. extern DWORD dwAGPPolicyCommitDelta;
  21. //
  22. // OS-specific functions for AGP manipulation.
  23. //
  24. #ifdef WIN95
  25. #define OsGetAGPDeviceHandle(pHeap) GetDXVxdHandle()
  26. #define OsCloseAGPDeviceHandle(h) CloseHandle(h)
  27. #else
  28. #define OsGetAGPDeviceHandle(pHeap) ((pHeap)->hdevAGP)
  29. #define OsCloseAGPDeviceHandle(h)
  30. #endif
  31. BOOL OsAGPReserve( HANDLE hdev, DWORD dwNumPages, BOOL fIsUC, BOOL fIsWC,
  32. FLATPTR *pfpLinStart, LARGE_INTEGER *pliDevStart,
  33. LPVOID *ppvReservation );
  34. BOOL OsAGPCommit( HANDLE hdev, LPVOID pvReservation,
  35. DWORD dwPageOffset, DWORD dwNumPages );
  36. BOOL OsAGPDecommitAll( HANDLE hdev, LPVOID pvReservation, DWORD dwNumPages );
  37. BOOL OsAGPFree( HANDLE hdev, LPVOID pvReservation );
  38. //
  39. // Generic functions that use the OS-specific functions.
  40. //
  41. DWORD AGPReserve( HANDLE hdev, DWORD dwSize, BOOL fIsUC, BOOL fIsWC,
  42. FLATPTR *pfpLinStart, LARGE_INTEGER *pliDevStart,
  43. LPVOID *ppvReservation );
  44. BOOL AGPCommit( HANDLE hdev, LPVOID pvReservation,
  45. DWORD dwOffset, DWORD dwSize );
  46. BOOL AGPDecommitAll( HANDLE hdev, LPVOID pvReservation, DWORD dwSize );
  47. BOOL AGPFree( HANDLE hdev, LPVOID pvReservation );
  48. #ifndef __NTDDKCOMP__
  49. #ifdef WIN95
  50. BOOL vxdIsVMMAGPAware ( HANDLE hvxd );
  51. #endif
  52. BOOL OSIsAGPAware( HANDLE hdev );
  53. #endif
  54. #endif // __DDAGP_INCLUDED__