svga3d_caps.h 3.4 KB

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