BsRenderAPICapabilities.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsGpuProgram.h"
  6. #include <cstdint>
  7. #define CAPS_CATEGORY_SIZE INT64_C(8)
  8. #define BS_CAPS_BITSHIFT (INT64_C(64) - CAPS_CATEGORY_SIZE)
  9. #define CAPS_CATEGORY_MASK (((INT64_C(1) << CAPS_CATEGORY_SIZE) - INT64_C(1)) << BS_CAPS_BITSHIFT)
  10. #define BS_CAPS_VALUE(cat, val) ((cat << BS_CAPS_BITSHIFT) | (INT64_C(1) << val))
  11. #define MAX_BOUND_VERTEX_BUFFERS 32
  12. namespace BansheeEngine
  13. {
  14. /** @addtogroup RenderAPI-Internal
  15. * @{
  16. */
  17. /** Categories of render API capabilities. */
  18. enum CapabilitiesCategory : UINT64
  19. {
  20. CAPS_CATEGORY_COMMON = 0,
  21. CAPS_CATEGORY_D3D9 = 1,
  22. CAPS_CATEGORY_GL = 2,
  23. CAPS_CATEGORY_D3D11 = 3,
  24. CAPS_CATEGORY_COUNT = 32 /**< Maximum number of categories. */
  25. };
  26. /** Enum describing the different hardware capabilities we can check for. */
  27. enum Capabilities : UINT64
  28. {
  29. RSC_AUTOMIPMAP = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 0), /**< Supports generating mipmaps in hardware. */
  30. RSC_ANISOTROPY = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 1), /**< Supports anisotropic texture filtering. */
  31. RSC_CUBEMAPPING = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 2), /**< Supports cube mapping. */
  32. RSC_TWO_SIDED_STENCIL = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 3), /**< Supports separate stencil updates for both front and back faces. */
  33. RSC_STENCIL_WRAP = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 4), /**< Supports wrapping the stencil value at the range extremes. */
  34. RSC_HWOCCLUSION = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 5), /**< Supports hardware occlusion queries. */
  35. RSC_USER_CLIP_PLANES = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 6), /**< Supports user clipping planes. */
  36. RSC_VERTEX_FORMAT_UBYTE4 = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 7), /**< Supports the VET_UBYTE4 vertex element type. */
  37. RSC_INFINITE_FAR_PLANE = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 8), /**< Supports infinite far plane projection. */
  38. RSC_HWRENDER_TO_TEXTURE = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 9), /**< Supports hardware render-to-texture. */
  39. RSC_TEXTURE_FLOAT = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 10), /**< Supports float textures and render targets. */
  40. RSC_NON_POWER_OF_2_TEXTURES = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 11), /**< Supports non-power of two textures. */
  41. RSC_TEXTURE_3D = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 12), /**< Supports 3d (volume) textures. */
  42. RSC_POINT_SPRITES = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 13), /**< Supports basic point sprite rendering. */
  43. RSC_POINT_EXTENDED_PARAMETERS = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 14), /**< Supports extra point parameters (minsize, maxsize, attenuation). */
  44. RSC_VERTEX_TEXTURE_FETCH = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 15), /**< Supports vertex texture fetch. */
  45. RSC_MIPMAP_LOD_BIAS = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 16), /**< Supports mipmap LOD biasing. */
  46. RSC_GEOMETRY_PROGRAM = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 17), /**< Supports hardware geometry programs. */
  47. RSC_TEXTURE_COMPRESSION = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 18), /**< Supports compressed textures. */
  48. RSC_TEXTURE_COMPRESSION_DXT = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 19), /**< Supports compressed textures in the DXT/ST3C formats. */
  49. RSC_TEXTURE_COMPRESSION_VTC = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 20), /**< Supports compressed textures in the VTC format. */
  50. RSC_TEXTURE_COMPRESSION_PVRTC = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 21), /**< Supports compressed textures in the PVRTC format. */
  51. RSC_MRT_DIFFERENT_BIT_DEPTHS = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 22), /**< Supports multiple render targets with different bit depths. */
  52. RSC_ALPHA_TO_COVERAGE = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 23), /**< Supports Alpha to Coverage. */
  53. RSC_ADVANCED_BLEND_OPERATIONS = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 24), /**< Supports blend operations like subtract, min, max. */
  54. RSC_SHADER_SUBROUTINE = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 25), /**< Supports dynamic shader linking. */
  55. RSC_HWOCCLUSION_ASYNCHRONOUS = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 26), /**< Support for async occlusion queries. */
  56. RSC_HWRENDER_TO_VERTEX_BUFFER = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 27), /**< Supports rendering to vertex buffers. */
  57. RSC_TESSELLATION_PROGRAM = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 28), /**< Supports hardware tessellation programs. */
  58. RSC_COMPUTE_PROGRAM = BS_CAPS_VALUE(CAPS_CATEGORY_COMMON, 29), /**< Supports hardware compute programs. */
  59. // ***** DirectX 9 specific caps *****
  60. RSC_PERSTAGECONSTANT = BS_CAPS_VALUE(CAPS_CATEGORY_D3D9, 0), /**< Are per stage constants supported. */
  61. // ***** GL Specific caps *****
  62. RSC_FBO = BS_CAPS_VALUE(CAPS_CATEGORY_GL, 0), /**< Support for Frame Buffer Objects. */
  63. RSC_PBUFFER = BS_CAPS_VALUE(CAPS_CATEGORY_GL, 1), /**< Support for PBuffers. */
  64. };
  65. /** Holds data about render system driver version. */
  66. struct BS_CORE_EXPORT DriverVersion
  67. {
  68. int major;
  69. int minor;
  70. int release;
  71. int build;
  72. DriverVersion()
  73. {
  74. major = minor = release = build = 0;
  75. }
  76. /** Returns the driver version as a single string. */
  77. String toString() const
  78. {
  79. StringStream str;
  80. str << major << "." << minor << "." << release << "." << build;
  81. return str.str();
  82. }
  83. /** Parses a string in the major.minor.release.build format and stores the version numbers. */
  84. void fromString(const String& versionString)
  85. {
  86. Vector<BansheeEngine::String> tokens = StringUtil::split(versionString, ".");
  87. if(!tokens.empty())
  88. {
  89. major = parseINT32(tokens[0]);
  90. if (tokens.size() > 1)
  91. minor = parseINT32(tokens[1]);
  92. if (tokens.size() > 2)
  93. release = parseINT32(tokens[2]);
  94. if (tokens.size() > 3)
  95. build = parseINT32(tokens[3]);
  96. }
  97. }
  98. };
  99. /** Types of GPU vendors. */
  100. enum GPUVendor
  101. {
  102. GPU_UNKNOWN = 0,
  103. GPU_NVIDIA = 1,
  104. GPU_AMD = 2,
  105. GPU_INTEL = 3,
  106. GPU_VENDOR_COUNT = 4
  107. };
  108. /**
  109. * Holds information about render hardware and driver capabilities and allows you to easily set and query those
  110. * capabilities.
  111. */
  112. class BS_CORE_EXPORT RenderAPICapabilities
  113. {
  114. public:
  115. RenderAPICapabilities ();
  116. virtual ~RenderAPICapabilities ();
  117. /** Sets the current driver version. */
  118. void setDriverVersion(const DriverVersion& version)
  119. {
  120. mDriverVersion = version;
  121. }
  122. /** Returns current driver version. */
  123. DriverVersion getDriverVersion() const
  124. {
  125. return mDriverVersion;
  126. }
  127. /** Returns vendor of the currently used GPU. */
  128. GPUVendor getVendor() const
  129. {
  130. return mVendor;
  131. }
  132. /** Sets the GPU vendor. */
  133. void setVendor(GPUVendor v)
  134. {
  135. mVendor = v;
  136. }
  137. /** Parses a vendor string and returns an enum with the vendor if parsed succesfully. */
  138. static GPUVendor vendorFromString(const String& vendorString);
  139. /** Converts a vendor enum to a string. */
  140. static String vendorToString(GPUVendor v);
  141. /** Sets the maximum number of texture units per pipeline stage. */
  142. void setNumTextureUnits(GpuProgramType type, UINT16 num)
  143. {
  144. mNumTextureUnitsPerStage[type] = num;
  145. }
  146. /** Sets the maximum number of texture units in all pipeline stages. */
  147. void setNumCombinedTextureUnits(UINT16 num)
  148. {
  149. mNumCombinedTextureUnits = num;
  150. }
  151. /** Sets the maximum number of load-store texture units per pipeline stage. */
  152. void setNumLoadStoreTextureUnits(GpuProgramType type, UINT16 num)
  153. {
  154. mNumLoadStoreTextureUnitsPerStage[type] = num;
  155. }
  156. /** Sets the maximum number of load-store texture units in all pipeline stages. */
  157. void setNumCombinedLoadStoreTextureUnits(UINT16 num)
  158. {
  159. mNumCombinedLoadStoreTextureUnits = num;
  160. }
  161. /** Sets the maximum number of GPU param block buffers per pipeline stage. */
  162. void setNumGpuParamBlockBuffers(GpuProgramType type, UINT16 num)
  163. {
  164. mNumGpuParamBlocksPerStage[type] = num;
  165. }
  166. /** Sets the maximum number of GPU param block buffers in all pipeline stages. */
  167. void setNumCombinedGpuParamBlockBuffers(UINT16 num)
  168. {
  169. mNumCombinedUniformBlocks = num;
  170. }
  171. /** Sets maximum stencil buffer depth in bits. */
  172. void setStencilBufferBitDepth(UINT16 num)
  173. {
  174. mStencilBufferBitDepth = num;
  175. }
  176. /** Sets maximum number of bound vertex buffers. */
  177. void setMaxBoundVertexBuffers(UINT32 num)
  178. {
  179. mMaxBoundVertexBuffers = num;
  180. }
  181. /** Sets maximum number of simultaneously set render targets. */
  182. void setNumMultiRenderTargets(UINT16 num)
  183. {
  184. mNumMultiRenderTargets = num;
  185. }
  186. /** Returns the number of texture units supported per pipeline stage. */
  187. UINT16 getNumTextureUnits(GpuProgramType type) const
  188. {
  189. auto iterFind = mNumTextureUnitsPerStage.find(type);
  190. if(iterFind != mNumTextureUnitsPerStage.end())
  191. return iterFind->second;
  192. else
  193. return 0;
  194. }
  195. /** Returns the number of texture units supported in all pipeline stages. */
  196. UINT16 getNumCombinedTextureUnits() const
  197. {
  198. return mNumCombinedTextureUnits;
  199. }
  200. /** Returns the number of load-store texture units supported per pipeline stage. */
  201. UINT16 getNumLoadStoreTextureUnits(GpuProgramType type) const
  202. {
  203. auto iterFind = mNumLoadStoreTextureUnitsPerStage.find(type);
  204. if (iterFind != mNumLoadStoreTextureUnitsPerStage.end())
  205. return iterFind->second;
  206. else
  207. return 0;
  208. }
  209. /** Returns the number of load-store texture units supported in all pipeline stages. */
  210. UINT16 getNumCombinedLoadStoreTextureUnits() const
  211. {
  212. return mNumCombinedLoadStoreTextureUnits;
  213. }
  214. /** Returns the maximum number of bound GPU program param block buffers per pipeline stage. */
  215. UINT16 getNumGpuParamBlockBuffers(GpuProgramType type) const
  216. {
  217. auto iterFind = mNumGpuParamBlocksPerStage.find(type);
  218. if(iterFind != mNumGpuParamBlocksPerStage.end())
  219. return iterFind->second;
  220. else
  221. return 0;
  222. }
  223. /** Returns the maximum number of bound GPU program param block buffers in all pipeline stages. */
  224. UINT16 getNumCombinedGpuParamBlockBuffers() const
  225. {
  226. return mNumCombinedUniformBlocks;
  227. }
  228. /** Returns the maximum number of bits available for the stencil buffer. */
  229. UINT16 getStencilBufferBitDepth() const
  230. {
  231. return mStencilBufferBitDepth;
  232. }
  233. /** Returns the maximum number of vertex buffers that can be bound at once. */
  234. UINT32 getMaxBoundVertexBuffers() const
  235. {
  236. return mMaxBoundVertexBuffers;
  237. }
  238. /** Returns the maximum number of render targets we can render to simultaneously. */
  239. UINT16 getNumMultiRenderTargets() const
  240. {
  241. return mNumMultiRenderTargets;
  242. }
  243. /** Sets a capability flag indicating this capability is supported. */
  244. void setCapability(const Capabilities c)
  245. {
  246. UINT64 index = (CAPS_CATEGORY_MASK & c) >> BS_CAPS_BITSHIFT;
  247. mCapabilities[index] |= (c & ~CAPS_CATEGORY_MASK);
  248. }
  249. /** Remove a capability flag indicating this capability is not supported (default). */
  250. void unsetCapability(const Capabilities c)
  251. {
  252. UINT64 index = (CAPS_CATEGORY_MASK & c) >> BS_CAPS_BITSHIFT;
  253. mCapabilities[index] &= (~c | CAPS_CATEGORY_MASK);
  254. }
  255. /** Checks is the specified capability supported. */
  256. bool hasCapability(const Capabilities c) const
  257. {
  258. UINT64 index = (CAPS_CATEGORY_MASK & c) >> BS_CAPS_BITSHIFT;
  259. return (mCapabilities[index] & (c & ~CAPS_CATEGORY_MASK)) != 0;
  260. }
  261. /** Adds a shader profile to the list of render-system specific supported profiles. */
  262. void addShaderProfile(const String& profile)
  263. {
  264. mSupportedShaderProfiles.insert(profile);
  265. }
  266. /** Adds a mapping between GPU program profile enum and render-system specific profile name. */
  267. void addGpuProgramProfile(GpuProgramProfile gpuProgProfile, const String& rsSpecificProfile)
  268. {
  269. mGenericToSpecificShaderProfileMap[gpuProgProfile] = rsSpecificProfile;
  270. }
  271. /** Returns true if the provided profile is supported. */
  272. bool isShaderProfileSupported(const String& profile) const
  273. {
  274. return (mSupportedShaderProfiles.end() != mSupportedShaderProfiles.find(profile));
  275. }
  276. /** Returns a set of all supported shader profiles. */
  277. const Set<String>& getSupportedShaderProfiles() const
  278. {
  279. return mSupportedShaderProfiles;
  280. }
  281. /**
  282. * Converts a generic GpuProgramProfile identifier into a render-system specific one. Returns an empty string if
  283. * conversion cannot be done.
  284. */
  285. String gpuProgProfileToRSSpecificProfile(GpuProgramProfile gpuProgProfile) const
  286. {
  287. auto iterFind = mGenericToSpecificShaderProfileMap.find(gpuProgProfile);
  288. if(mGenericToSpecificShaderProfileMap.end() != iterFind)
  289. {
  290. return iterFind->second;
  291. }
  292. return "";
  293. }
  294. /** Gets the number of floating-point constants vertex programs support. */
  295. UINT16 getVertexProgramConstantFloatCount() const
  296. {
  297. return mVertexProgramConstantFloatCount;
  298. }
  299. /** Gets the number of integer constants vertex programs support. */
  300. UINT16 getVertexProgramConstantIntCount() const
  301. {
  302. return mVertexProgramConstantIntCount;
  303. }
  304. /** Gets the number of boolean constants vertex programs support. */
  305. UINT16 getVertexProgramConstantBoolCount() const
  306. {
  307. return mVertexProgramConstantBoolCount;
  308. }
  309. /** Gets the number of floating-point constants geometry programs support. */
  310. UINT16 getGeometryProgramConstantFloatCount() const
  311. {
  312. return mGeometryProgramConstantFloatCount;
  313. }
  314. /** Gets the number of integer constants geometry programs support. */
  315. UINT16 getGeometryProgramConstantIntCount() const
  316. {
  317. return mGeometryProgramConstantIntCount;
  318. }
  319. /** Gets the number of boolean constants geometry programs support. */
  320. UINT16 getGeometryProgramConstantBoolCount() const
  321. {
  322. return mGeometryProgramConstantBoolCount;
  323. }
  324. /** Gets the number of floating-point constants fragment programs support. */
  325. UINT16 getFragmentProgramConstantFloatCount() const
  326. {
  327. return mFragmentProgramConstantFloatCount;
  328. }
  329. /** Gets the number of integer constants fragment programs support. */
  330. UINT16 getFragmentProgramConstantIntCount() const
  331. {
  332. return mFragmentProgramConstantIntCount;
  333. }
  334. /** Gets the number of boolean constants fragment programs support. */
  335. UINT16 getFragmentProgramConstantBoolCount() const
  336. {
  337. return mFragmentProgramConstantBoolCount;
  338. }
  339. /** Sets the current GPU device name. */
  340. void setDeviceName(const String& name)
  341. {
  342. mDeviceName = name;
  343. }
  344. /** Gets the current GPU device name. */
  345. String getDeviceName() const
  346. {
  347. return mDeviceName;
  348. }
  349. /** Sets the number of floating-point constants vertex programs support. */
  350. void setVertexProgramConstantFloatCount(UINT16 c)
  351. {
  352. mVertexProgramConstantFloatCount = c;
  353. }
  354. /** Sets the number of integer constants vertex programs support. */
  355. void setVertexProgramConstantIntCount(UINT16 c)
  356. {
  357. mVertexProgramConstantIntCount = c;
  358. }
  359. /** Sets the number of boolean constants vertex programs support. */
  360. void setVertexProgramConstantBoolCount(UINT16 c)
  361. {
  362. mVertexProgramConstantBoolCount = c;
  363. }
  364. /** Sets the number of floating-point constants geometry programs support. */
  365. void setGeometryProgramConstantFloatCount(UINT16 c)
  366. {
  367. mGeometryProgramConstantFloatCount = c;
  368. }
  369. /** Sets the number of integer constants geometry programs support. */
  370. void setGeometryProgramConstantIntCount(UINT16 c)
  371. {
  372. mGeometryProgramConstantIntCount = c;
  373. }
  374. /** Sets the number of boolean constants geometry programs support. */
  375. void setGeometryProgramConstantBoolCount(UINT16 c)
  376. {
  377. mGeometryProgramConstantBoolCount = c;
  378. }
  379. /** Sets the number of floating-point constants fragment programs support. */
  380. void setFragmentProgramConstantFloatCount(UINT16 c)
  381. {
  382. mFragmentProgramConstantFloatCount = c;
  383. }
  384. /** Sets the number of integer constants fragment programs support. */
  385. void setFragmentProgramConstantIntCount(UINT16 c)
  386. {
  387. mFragmentProgramConstantIntCount = c;
  388. }
  389. /** Sets the number of boolean constants fragment programs support. */
  390. void setFragmentProgramConstantBoolCount(UINT16 c)
  391. {
  392. mFragmentProgramConstantBoolCount = c;
  393. }
  394. /** Sets the maximum point screen size in pixels. */
  395. void setMaxPointSize(float s)
  396. {
  397. mMaxPointSize = s;
  398. }
  399. /** Gets the maximum point screen size in pixels. */
  400. float getMaxPointSize(void) const
  401. {
  402. return mMaxPointSize;
  403. }
  404. /** Sets the number of vertices a single geometry program run can emit. */
  405. void setGeometryProgramNumOutputVertices(int numOutputVertices)
  406. {
  407. mGeometryProgramNumOutputVertices = numOutputVertices;
  408. }
  409. /** Gets the number of vertices a single geometry program run can emit. */
  410. int getGeometryProgramNumOutputVertices(void) const
  411. {
  412. return mGeometryProgramNumOutputVertices;
  413. }
  414. /** Get the identifier of the render system from which these capabilities were generated. */
  415. StringID getRenderAPIName() const
  416. {
  417. return mRenderAPIName;
  418. }
  419. /** Set the identifier of the render system from which these capabilities were generated. */
  420. void setRenderAPIName(const StringID& rs)
  421. {
  422. mRenderAPIName = rs;
  423. }
  424. private:
  425. /** Initializes vendor enum -> vendor name mappings. */
  426. static void initVendorStrings();
  427. private:
  428. static Vector<String> msGPUVendorStrings;
  429. DriverVersion mDriverVersion;
  430. GPUVendor mVendor = GPU_UNKNOWN;
  431. // The number of texture units available per stage
  432. Map<GpuProgramType, UINT16> mNumTextureUnitsPerStage;
  433. // Total number of texture units available
  434. UINT16 mNumCombinedTextureUnits = 0;
  435. // The number of uniform blocks available per stage
  436. Map<GpuProgramType, UINT16> mNumGpuParamBlocksPerStage;
  437. // Total number of uniform blocks available
  438. UINT16 mNumCombinedUniformBlocks = 0;
  439. // The number of load-store texture unitss available per stage
  440. Map<GpuProgramType, UINT16> mNumLoadStoreTextureUnitsPerStage;
  441. // Total number of load-store texture units available
  442. UINT16 mNumCombinedLoadStoreTextureUnits = 0;
  443. // The stencil buffer bit depth
  444. UINT16 mStencilBufferBitDepth = 0;
  445. // Maximum number of vertex buffers we can bind at once
  446. UINT32 mMaxBoundVertexBuffers = 0;
  447. // Stores the capabilities flags.
  448. UINT32 mCapabilities[CAPS_CATEGORY_COUNT];
  449. // The name of the device as reported by the render system
  450. String mDeviceName;
  451. // The identifier associated with the render API for which these capabilities are valid
  452. StringID mRenderAPIName;
  453. // The number of floating-point constants vertex programs support
  454. UINT16 mVertexProgramConstantFloatCount = 0;
  455. // The number of integer constants vertex programs support
  456. UINT16 mVertexProgramConstantIntCount = 0;
  457. // The number of boolean constants vertex programs support
  458. UINT16 mVertexProgramConstantBoolCount = 0;
  459. // The number of floating-point constants geometry programs support
  460. UINT16 mGeometryProgramConstantFloatCount = 0;
  461. // The number of integer constants vertex geometry support
  462. UINT16 mGeometryProgramConstantIntCount = 0;
  463. // The number of boolean constants vertex geometry support
  464. UINT16 mGeometryProgramConstantBoolCount = 0;
  465. // The number of floating-point constants fragment programs support
  466. UINT16 mFragmentProgramConstantFloatCount = 0;
  467. // The number of integer constants fragment programs support
  468. UINT16 mFragmentProgramConstantIntCount = 0;
  469. // The number of boolean constants fragment programs support
  470. UINT16 mFragmentProgramConstantBoolCount = 0;
  471. // The number of simultaneous render targets supported
  472. UINT16 mNumMultiRenderTargets = 0;
  473. // The maximum point size in pixels
  474. float mMaxPointSize = 0.0f;
  475. // The number of vertices a geometry program can emit in a single run
  476. UINT32 mGeometryProgramNumOutputVertices = 0;
  477. // The list of supported shader profiles
  478. Set<String> mSupportedShaderProfiles;
  479. // Allows us to convert a generic shader profile to a render-system specific one
  480. UnorderedMap<GpuProgramProfile, String> mGenericToSpecificShaderProfileMap;
  481. };
  482. /** @} */
  483. }