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.

45 lines
1.7 KiB

  1. /******************************Module*Header**********************************\
  2. *
  3. * *******************
  4. * * GDI SAMPLE CODE *
  5. * *******************
  6. *
  7. * Module Name: glntctxt.h
  8. *
  9. * Content: Defines for context switching code.
  10. *
  11. * Copyright (c) 1994-1999 3Dlabs Inc. Ltd. All rights reserved.
  12. * Copyright (c) 1995-2003 Microsoft Corporation. All rights reserved.
  13. \*****************************************************************************/
  14. // each time round allocate this many entries
  15. #define CTXT_CHUNK 8
  16. // each context consists of a set of tags and the corresponding data. so after
  17. // ntags we have 2*ntags*sizeof(DWORD) bytes of memory.
  18. typedef struct _glint_ctxt_data {
  19. DWORD tag;
  20. DWORD data;
  21. } CtxtData;
  22. typedef struct _glint_ctxt {
  23. LONG ntags;
  24. PVOID priv; // opaque handle passed by caller
  25. DWORD DoubleWrite; // Racer double write control
  26. DWORD DMAControl; // AGP or PCI on P2 and Gamma
  27. ULONG endIndex; // endIndex for the interrupt driven DMA Q
  28. ULONG inFifoDisc; // disconnect
  29. ULONG VideoControl; // Video Control
  30. ContextType type; // To support reduced size context switching
  31. ContextFixedFunc dumpFunc; // Function for dumping a fixed context
  32. CtxtData pData[1];
  33. // more follows in memory
  34. } GlintCtxtRec;
  35. typedef struct _glint_ctxt_table {
  36. LONG size; // in bytes of the table
  37. LONG nEntries;
  38. GlintCtxtRec* pEntry[CTXT_CHUNK];
  39. // more to be allocated in memory if needed
  40. } GlintCtxtTable;