svga3d_limits.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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_limits.h --
  28. *
  29. * SVGA 3d hardware limits
  30. */
  31. #ifndef _SVGA3D_LIMITS_H_
  32. #define _SVGA3D_LIMITS_H_
  33. #define INCLUDE_ALLOW_MODULE
  34. #define INCLUDE_ALLOW_USERLEVEL
  35. #define INCLUDE_ALLOW_VMCORE
  36. #include "includeCheck.h"
  37. #define SVGA3D_NUM_CLIPPLANES 6
  38. #define SVGA3D_MAX_RENDER_TARGETS 8
  39. #define SVGA3D_MAX_SIMULTANEOUS_RENDER_TARGETS (SVGA3D_MAX_RENDER_TARGETS)
  40. #define SVGA3D_MAX_UAVIEWS 8
  41. #define SVGA3D_MAX_CONTEXT_IDS 256
  42. #define SVGA3D_MAX_SURFACE_IDS (32 * 1024)
  43. /*
  44. * Maximum ID a shader can be assigned on a given context.
  45. */
  46. #define SVGA3D_MAX_SHADERIDS 5000
  47. /*
  48. * Maximum number of shaders of a given type that can be defined
  49. * (including all contexts).
  50. */
  51. #define SVGA3D_MAX_SIMULTANEOUS_SHADERS 20000
  52. #define SVGA3D_NUM_TEXTURE_UNITS 32
  53. #define SVGA3D_NUM_LIGHTS 8
  54. /*
  55. * Maximum size in dwords of shader text the SVGA device will allow.
  56. * Currently 8 MB.
  57. */
  58. #define SVGA3D_MAX_SHADER_MEMORY (8 * 1024 * 1024 / sizeof(uint32))
  59. #define SVGA3D_MAX_CLIP_PLANES 6
  60. /*
  61. * This is the limit to the number of fixed-function texture
  62. * transforms and texture coordinates we can support. It does *not*
  63. * correspond to the number of texture image units (samplers) we
  64. * support!
  65. */
  66. #define SVGA3D_MAX_TEXTURE_COORDS 8
  67. /*
  68. * Number of faces in a cubemap.
  69. */
  70. #define SVGA3D_MAX_SURFACE_FACES 6
  71. /*
  72. * Maximum number of array indexes in a GB surface (with DX enabled).
  73. */
  74. #define SVGA3D_MAX_SURFACE_ARRAYSIZE 512
  75. /*
  76. * The maximum number of vertex arrays we're guaranteed to support in
  77. * SVGA_3D_CMD_DRAWPRIMITIVES.
  78. */
  79. #define SVGA3D_MAX_VERTEX_ARRAYS 32
  80. /*
  81. * The maximum number of primitive ranges we're guaranteed to support
  82. * in SVGA_3D_CMD_DRAWPRIMITIVES.
  83. */
  84. #define SVGA3D_MAX_DRAW_PRIMITIVE_RANGES 32
  85. #endif /* _SVGA3D_LIMITS_H_ */