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.

107 lines
3.1 KiB

  1. /******************************Module*Header***********************************\
  2. * Module Name: precomp.h
  3. *
  4. * Common headers used throughout the display driver. This entire include
  5. * file will typically be pre-compiled.
  6. *
  7. * Copyright (c) 1994-1998 3Dlabs Inc. Ltd. All rights reserved.
  8. * Copyright (c) 1995-1999 Microsoft Corporation. All rights reserved.
  9. \******************************************************************************/
  10. #define __NTDDKCOMP__
  11. #include <stddef.h>
  12. #include <stdarg.h>
  13. #include <limits.h>
  14. #include <windef.h>
  15. #include <d3d.h>
  16. #include <winerror.h>
  17. #include <wingdi.h>
  18. #include <math.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /*****************************************************************************\
  23. * *
  24. * NT 5.0 -> NT 4.0 single binary support: *
  25. * *
  26. \*****************************************************************************/
  27. // The following macros thunk the corresponding APIs to Dynamically loaded ones
  28. // when running on NT5 or later and no-ops on NT4. This is because on NT5+ we
  29. // use the direct draw heap and other newly added Eng function calls which are
  30. // not available on NT4. All the thunks are implemented in thunks.c. The
  31. // macros are defined prior to including winddi.h to insure correct typing.
  32. // NT5.0 Thunks
  33. #define EngAlphaBlend THUNK_EngAlphaBlend
  34. #define EngGradientFill THUNK_EngGradientFill
  35. #define EngTransparentBlt THUNK_EngTransparentBlt
  36. #define EngMapFile THUNK_EngMapFile
  37. #define EngUnmapFile THUNK_EngUnmapFile
  38. #define EngQuerySystemAttribute THUNK_EngQuerySystemAttribute
  39. #define EngDitherColor THUNK_EngDitherColor
  40. #define EngModifySurface THUNK_EngModifySurface
  41. #define EngQueryDeviceAttribute THUNK_EngQueryDeviceAttribute
  42. #define HeapVidMemAllocAligned THUNK_HeapVidMemAllocAligned
  43. #define VidMemFree THUNK_VidMemFree
  44. // NT5.1 Thunks
  45. #define EngHangNotification THUNK_EngHangNotification
  46. #include <winddi.h>
  47. #include <devioctl.h>
  48. #include <ntddvdeo.h>
  49. #include <ioaccess.h>
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #include <memory.h>
  54. #include <stdio.h>
  55. #include <stdlib.h>
  56. #include <math.h>
  57. #include <dmemmgr.h>
  58. #include "dx95type.h"
  59. // define Size for DMA Buffer.
  60. #if defined(_ALPHA_)
  61. #define DMA_BUFFERSIZE 0x2000
  62. #else
  63. #define DMA_BUFFERSIZE 0x40000
  64. #endif
  65. // DX7 Stereo support
  66. #define DX7_STEREO 1
  67. //@@BEGIN_DDKSPLIT
  68. // for now DX7_STEREO should only be enabled in the build,
  69. // not in the DDK, because some defs are still missing.
  70. #define DX7_ALPHABLT 0
  71. //@@END_DDKSPLIT
  72. //@@BEGIN_DDKSPLIT
  73. // enable GDI testing
  74. #define GDI_TEST 0
  75. //@@END_DDKSPLIT
  76. // enable memory tracking
  77. // to find leaking memory
  78. #define TRACKMEMALLOC 0
  79. #include "pointer.h"
  80. #include "brush.h"
  81. #include "driver.h"
  82. #include "debug.h"
  83. #include "permedia.h"
  84. #include "hw.h"
  85. #include "pmdef.h"
  86. #include "lines.h"
  87. #include "math64.h"
  88. #include "rops.h"
  89. #include "registry.h"