AGP.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:5k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       AGP.h
  3.  
  4.      Contains:   API for Accelerated Graphics Port (AGP)
  5.  
  6.      Version:    Technology: 1.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __AGP__
  18. #define __AGP__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __MACTYPES__
  23. #include "MacTypes.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=power
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. /* AGP related property names*/
  42. #define kAGPMasterProperty "AGP_Master"
  43. #define kAGPTargetProperty "AGP_Target"
  44. #define kAGPAddressRange "AGP_Address_Range"
  45. #define kAGPAddressBlock "AGP_Address_Block"
  46. #define kAGPAlignment "AGP_Alignment"
  47. #define kAGPAllowOverlap "AGP_AllowOverlap"
  48. #define kAGPMajorRevision "AGP_MajorRevision"
  49. #define kAGPMinorRevision "AGP_MinorRevision"
  50. #define kAGPDepth "AGP_Depth"
  51. #define kAGPSBASupport "AGP_SBA_Support"
  52. #define AGPTransferType "AGP_Transfer_Type"
  53. #define kAGPFourGig "AGP_4Gig_Enabled"
  54. #define kAGPFastWrite "AGP_FastWrite_Enabled"
  55. #define kAGPEnabled "AGP_Enabled"
  56. /* AGP Capabilities Register definitions*/
  57. enum {
  58.                                                                 /* AGP Register Offsets*/
  59.     kAGPRevisionOffset          = 0x02,
  60.     kAGPStatusOffset            = 0x04,
  61.     kAGPCommandOffset           = 0x08,                         /* Major/Minor Rev Bits*/
  62.     kAGPMinorRevMask            = 0x0F,
  63.     kAGPMajorRevMask            = 0xF0,
  64.     kAGPMinorRevBit             = 0x00,
  65.     kAGPMajorRevBit             = 0x04,                         /* AGP Status Register definitions*/
  66.     kAGPDataRateMask            = 0x00000003,
  67.     kAGPFastWriteMask           = 0x00000010,
  68.     kAGPFourGigAddrMask         = 0x00000020,
  69.     kAGPSideBandAddrMask        = 0x00000200,
  70.     kAGPRequestDepthMask        = (long)0xFF000000,
  71.     kAGPDataRateBit             = 0x00,
  72.     kAGPFastWriteBit            = 0x04,
  73.     kAGPFourGigAddrBit          = 0x05,
  74.     kAGPSideBandAddrBit         = 0x09,
  75.     kAGPRequestDepthBit         = 0x18,                         /* AGP Command Register definitions*/
  76.     kAGPEnableBit               = 0x08,
  77.     kAGPEnableMask              = 0x00000100
  78. };
  79. /* AGP Speed definitions*/
  80. enum {
  81.     kAGPOneX                    = 1,
  82.     kAGPTwoX                    = 2,
  83.     kAGPFourX                   = 4
  84. };
  85. enum {
  86.     kAGPQueryBaseAddress        = 1,
  87.     kAGPQueryEnabled            = 2,
  88.     kAGPQueryMaxAGPMemory       = 3,
  89.     kAGPQueryFreeAGPMemory      = 4,
  90.     kAGPEnabledStatus           = 1,
  91.     kAGPDisabledStatus          = 0
  92. };
  93. struct AGPAddressPair {
  94.     LogicalAddress                  systemLogicalAddress;
  95.     LogicalAddress                  agpLogicalAddress;
  96.     UInt32                          internalInfo[4];
  97. };
  98. typedef struct AGPAddressPair           AGPAddressPair;
  99. typedef UInt32                          AGPQuery;
  100. #if CALL_NOT_IN_CARBON
  101. EXTERN_API_C( OSStatus )
  102. AGPNewMemory                    (AGPAddressPair *       agpAddressPair,
  103.                                  ByteCount              byteSize,
  104.                                  Boolean                clear);
  105. EXTERN_API_C( OSStatus )
  106. AGPReserveMemory                (AGPAddressPair *       agpAddressPair,
  107.                                  ByteCount              byteSize);
  108. EXTERN_API_C( OSStatus )
  109. AGPDisposeMemory                (AGPAddressPair *       agpAddress);
  110. EXTERN_API_C( OSStatus )
  111. AGPReleaseMemory                (AGPAddressPair *       agpAddress);
  112. EXTERN_API_C( OSStatus )
  113. AGPCommitMemory                 (AGPAddressPair *       agpAddress,
  114.                                  Boolean                agpClientManagesCaches);
  115. EXTERN_API_C( OSStatus )
  116. AGPGetAGPLogicalAddress         (AGPAddressPair *       agpAddressPair);
  117. EXTERN_API_C( OSStatus )
  118. AGPGetSystemLogicalAddress      (AGPAddressPair *       agpAddressPair);
  119. EXTERN_API_C( OSStatus )
  120. AGPGetStatus                    (AGPQuery               query,
  121.                                  void *                 result);
  122. EXTERN_API_C( OSStatus )
  123. AGPDecommitMemory               (AGPAddressPair *       agpAddress);
  124. EXTERN_API_C( OSStatus )
  125. AGPRestoreCacheState            (AGPAddressPair *       agpAddress);
  126. #endif  /* CALL_NOT_IN_CARBON */
  127. #if PRAGMA_STRUCT_ALIGN
  128.     #pragma options align=reset
  129. #elif PRAGMA_STRUCT_PACKPUSH
  130.     #pragma pack(pop)
  131. #elif PRAGMA_STRUCT_PACK
  132.     #pragma pack()
  133. #endif
  134. #ifdef PRAGMA_IMPORT_OFF
  135. #pragma import off
  136. #elif PRAGMA_IMPORT
  137. #pragma import reset
  138. #endif
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #endif /* __AGP__ */