svga3d_caps.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /**********************************************************
  2. * Copyright 2007-2015 VMware, Inc. All rights reserved.
  3. *
  4. * Permission is hereby granted, free of charge, to any person
  5. * obtaining a copy of this software and associated documentation
  6. * files (the "Software"), to deal in the Software without
  7. * restriction, including without limitation the rights to use, copy,
  8. * modify, merge, publish, distribute, sublicense, and/or sell copies
  9. * of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be
  13. * included in all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  19. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  20. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  22. * SOFTWARE.
  23. *
  24. **********************************************************/
  25. /*
  26. * svga3d_caps.h --
  27. *
  28. * Definitions for SVGA3D hardware capabilities. Capabilities
  29. * are used to query for optional rendering features during
  30. * driver initialization. The capability data is stored as very
  31. * basic key/value dictionary within the "FIFO register" memory
  32. * area at the beginning of BAR2.
  33. *
  34. * Note that these definitions are only for 3D capabilities.
  35. * The SVGA device also has "device capabilities" and "FIFO
  36. * capabilities", which are non-3D-specific and are stored as
  37. * bitfields rather than key/value pairs.
  38. */
  39. #ifndef _SVGA3D_CAPS_H_
  40. #define _SVGA3D_CAPS_H_
  41. #define INCLUDE_ALLOW_MODULE
  42. #define INCLUDE_ALLOW_USERLEVEL
  43. #include "includeCheck.h"
  44. #include "svga_reg.h"
  45. #define SVGA_FIFO_3D_CAPS_SIZE (SVGA_FIFO_3D_CAPS_LAST - \
  46. SVGA_FIFO_3D_CAPS + 1)
  47. /*
  48. * SVGA3dCapsRecordType
  49. *
  50. * Record types that can be found in the caps block.
  51. * Related record types are grouped together numerically so that
  52. * SVGA3dCaps_FindRecord() can be applied on a range of record
  53. * types.
  54. */
  55. typedef enum {
  56. SVGA3DCAPS_RECORD_UNKNOWN = 0,
  57. SVGA3DCAPS_RECORD_DEVCAPS_MIN = 0x100,
  58. SVGA3DCAPS_RECORD_DEVCAPS = 0x100,
  59. SVGA3DCAPS_RECORD_DEVCAPS_MAX = 0x1ff,
  60. } SVGA3dCapsRecordType;
  61. /*
  62. * SVGA3dCapsRecordHeader
  63. *
  64. * Header field leading each caps block record. Contains the offset (in
  65. * register words, NOT bytes) to the next caps block record (or the end
  66. * of caps block records which will be a zero word) and the record type
  67. * as defined above.
  68. */
  69. typedef
  70. #include "vmware_pack_begin.h"
  71. struct SVGA3dCapsRecordHeader {
  72. uint32 length;
  73. SVGA3dCapsRecordType type;
  74. }
  75. #include "vmware_pack_end.h"
  76. SVGA3dCapsRecordHeader;
  77. /*
  78. * SVGA3dCapsRecord
  79. *
  80. * Caps block record; "data" is a placeholder for the actual data structure
  81. * contained within the record;
  82. */
  83. typedef
  84. #include "vmware_pack_begin.h"
  85. struct SVGA3dCapsRecord {
  86. SVGA3dCapsRecordHeader header;
  87. uint32 data[1];
  88. }
  89. #include "vmware_pack_end.h"
  90. SVGA3dCapsRecord;
  91. typedef uint32 SVGA3dCapPair[2];
  92. #endif