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.

50 lines
1.6 KiB

  1. /******************************Module*Header**********************************\
  2. *
  3. * *******************
  4. * * SAMPLE CODE *
  5. * *******************
  6. *
  7. * Module Name: p2ctxt.h
  8. *
  9. * Content:
  10. * Context switching for P2. Used to create and swap contexts in and out.
  11. * The GDI, DDraw and D3D part each have another context.
  12. *
  13. * Copyright (c) 1994-1998 3Dlabs Inc. Ltd. All rights reserved.
  14. * Copyright (c) 1995-1999 Microsoft Corporation. All rights reserved.
  15. \*****************************************************************************/
  16. #ifndef __p2ctxt__
  17. #define __p2ctxt__
  18. // each time round allocate this many entries
  19. #define CTXT_CHUNK 8
  20. typedef VOID(*PCtxtUserFunc)(PPDev);
  21. // each context consists of a set of tags and the corresponding data. so after
  22. // ntags we have 2*ntags*sizeof(DWORD) bytes of memory.
  23. typedef struct tagP2CtxtData {
  24. DWORD dwTag;
  25. DWORD dwData;
  26. } P2CtxtData;
  27. typedef struct tagP2CtxtRec {
  28. BOOL bInitialized;
  29. P2CtxtType dwCtxtType;
  30. LONG lNumOfTags;
  31. ULONG ulTexelLUTEntries; // number of registers to save for the Texel LUT context
  32. ULONG *pTexelLUTCtxt; // Texel LUT context array
  33. PCtxtUserFunc P2UserFunc;
  34. P2CtxtData pData[1];
  35. // more follows in memory
  36. } P2CtxtRec;
  37. typedef struct tagP2CtxtTableRec {
  38. ULONG lSize; // in bytes of the table
  39. ULONG lEntries;
  40. P2CtxtPtr pEntry[CTXT_CHUNK];
  41. // more to be allocated in memory if needed
  42. } P2CtxtTableRec, *P2CtxtTablePtr;
  43. #endif