BsRenderSystemCapabilities.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #pragma once
  5. #include "BsCorePrerequisites.h"
  6. #include "BsString.h"
  7. #include "BsGpuProgram.h"
  8. #define CAPS_CATEGORY_SIZE 8i64
  9. #define BS_CAPS_BITSHIFT (64i64 - CAPS_CATEGORY_SIZE)
  10. #define CAPS_CATEGORY_MASK (((1i64 << CAPS_CATEGORY_SIZE) - 1i64) << BS_CAPS_BITSHIFT)
  11. #define BS_CAPS_VALUE(cat, val) ((cat << BS_CAPS_BITSHIFT) | (1i64 << val))
  12. #define MAX_BOUND_VERTEX_BUFFERS 32
  13. namespace BansheeEngine
  14. {
  15. /// Enumerates the categories of capabilities
  16. enum CapabilitiesCategory : UINT64
  17. {
  18. CAPS_CATEGORY_COMMON = 0,
  19. CAPS_CATEGORY_D3D9 = 1,
  20. CAPS_CATEGORY_GL = 2,
  21. CAPS_CATEGORY_D3D11 = 3,
  22. CAPS_CATEGORY_COUNT = 32 /**< Maximum number of categories. */
  23. };
  24. /**
  25. * @brief Enum describing the different hardware capabilities we can check for.
  26. */
  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. /**
  66. * @brief Holds data about render system driver version.
  67. */
  68. struct BS_CORE_EXPORT DriverVersion
  69. {
  70. int major;
  71. int minor;
  72. int release;
  73. int build;
  74. DriverVersion()
  75. {
  76. major = minor = release = build = 0;
  77. }
  78. /**
  79. * @brief Returns the driver version as a single string.
  80. */
  81. String toString() const
  82. {
  83. StringStream str;
  84. str << major << "." << minor << "." << release << "." << build;
  85. return str.str();
  86. }
  87. /**
  88. * @brief Parses a string in the major.minor.release.build format
  89. * and stores the version numbers.
  90. */
  91. void fromString(const String& versionString)
  92. {
  93. Vector<BansheeEngine::String> tokens = StringUtil::split(versionString, ".");
  94. if(!tokens.empty())
  95. {
  96. major = parseInt(tokens[0]);
  97. if (tokens.size() > 1)
  98. minor = parseInt(tokens[1]);
  99. if (tokens.size() > 2)
  100. release = parseInt(tokens[2]);
  101. if (tokens.size() > 3)
  102. build = parseInt(tokens[3]);
  103. }
  104. }
  105. };
  106. /**
  107. * @brief Types of GPU vendors
  108. */
  109. enum GPUVendor
  110. {
  111. GPU_UNKNOWN = 0,
  112. GPU_NVIDIA = 1,
  113. GPU_AMD = 2,
  114. GPU_INTEL = 3,
  115. GPU_VENDOR_COUNT = 4
  116. };
  117. /**
  118. * @brief Holds information about render hardware and driver capabilities
  119. * and allows you to easily set and query those capabilities.
  120. */
  121. class BS_CORE_EXPORT RenderSystemCapabilities
  122. {
  123. public:
  124. RenderSystemCapabilities ();
  125. virtual ~RenderSystemCapabilities ();
  126. /**
  127. * @brief Sets the current driver version.
  128. */
  129. void setDriverVersion(const DriverVersion& version)
  130. {
  131. mDriverVersion = version;
  132. }
  133. /**
  134. * @brief Returns current driver version.
  135. */
  136. DriverVersion getDriverVersion() const
  137. {
  138. return mDriverVersion;
  139. }
  140. /**
  141. * @brief Returns vendor of the currently used GPU.
  142. */
  143. GPUVendor getVendor() const
  144. {
  145. return mVendor;
  146. }
  147. /**
  148. * @brief Sets the GPU vendor.
  149. */
  150. void setVendor(GPUVendor v)
  151. {
  152. mVendor = v;
  153. }
  154. /**
  155. * @brief Parses a vendor string and returns an enum with the vendor
  156. * if parsed succesfully.
  157. */
  158. static GPUVendor vendorFromString(const String& vendorString);
  159. /**
  160. * @brief Converts a vendor enum to a string.
  161. */
  162. static String vendorToString(GPUVendor v);
  163. /**
  164. * @brief Sets the maximum number of texture units per pipeline stage.
  165. */
  166. void setNumTextureUnits(GpuProgramType type, UINT16 num)
  167. {
  168. mNumTextureUnitsPerStage[type] = num;
  169. }
  170. /**
  171. * @brief Sets the maximum number of texture units in all pipeline stages.
  172. */
  173. void setNumCombinedTextureUnits(UINT16 num)
  174. {
  175. mNumCombinedTextureUnits = num;
  176. }
  177. /**
  178. * @brief Sets the maximum number of GPU param block buffers per pipeline stage.
  179. */
  180. void setNumGpuParamBlockBuffers(GpuProgramType type, UINT16 num)
  181. {
  182. mNumGpuParamBlocksPerStage[type] = num;
  183. }
  184. /**
  185. * @brief Sets the maximum number of GPU param block buffers in all pipeline stages.
  186. */
  187. void setNumCombinedGpuParamBlockBuffers(UINT16 num)
  188. {
  189. mNumCombinedUniformBlocks = num;
  190. }
  191. /**
  192. * @brief Sets maximum stencil buffer depth in bits.
  193. */
  194. void setStencilBufferBitDepth(UINT16 num)
  195. {
  196. mStencilBufferBitDepth = num;
  197. }
  198. /**
  199. * @brief Sets maximum number of bound vertex buffers.
  200. */
  201. void setMaxBoundVertexBuffers(UINT32 num)
  202. {
  203. mMaxBoundVertexBuffers = num;
  204. }
  205. /**
  206. * @brief Sets maximum number of simultaneously set render targets.
  207. */
  208. void setNumMultiRenderTargets(UINT16 num)
  209. {
  210. mNumMultiRenderTargets = num;
  211. }
  212. /**
  213. * @brief Returns the number of texture units supported per pipeline stage.
  214. */
  215. UINT16 getNumTextureUnits(GpuProgramType type) const
  216. {
  217. auto iterFind = mNumTextureUnitsPerStage.find(type);
  218. if(iterFind != mNumTextureUnitsPerStage.end())
  219. return iterFind->second;
  220. else
  221. return 0;
  222. }
  223. /**
  224. * @brief Returns the number of texture units supported in all pipeline stages.
  225. */
  226. UINT16 getNumCombinedTextureUnits() const
  227. {
  228. return mNumCombinedTextureUnits;
  229. }
  230. /**
  231. * @brief Returns the maximum number of bound GPU program param block
  232. * buffers per pipeline stage.
  233. */
  234. UINT16 getNumGpuParamBlockBuffers(GpuProgramType type) const
  235. {
  236. auto iterFind = mNumGpuParamBlocksPerStage.find(type);
  237. if(iterFind != mNumGpuParamBlocksPerStage.end())
  238. return iterFind->second;
  239. else
  240. return 0;
  241. }
  242. /**
  243. * @brief Returns the maximum number of bound GPU program param block
  244. * buffers in all pipeline stages.
  245. */
  246. UINT16 getNumCombinedGpuParamBlockBuffers() const
  247. {
  248. return mNumCombinedUniformBlocks;
  249. }
  250. /**
  251. * @brief Returns the maximum number of bits available for
  252. * the stencil buffer.
  253. */
  254. UINT16 getStencilBufferBitDepth() const
  255. {
  256. return mStencilBufferBitDepth;
  257. }
  258. /**
  259. * @brief Returns the maximum number of vertex buffers that can be bound
  260. * at once.
  261. */
  262. UINT32 getMaxBoundVertexBuffers() const
  263. {
  264. return mMaxBoundVertexBuffers;
  265. }
  266. /**
  267. * @brief Returns the maximum number of render targets we can render to
  268. * simultaneously.
  269. */
  270. UINT16 getNumMultiRenderTargets() const
  271. {
  272. return mNumMultiRenderTargets;
  273. }
  274. /**
  275. * @brief Sets a capability flag indicating this capability is supported.
  276. */
  277. void setCapability(const Capabilities c)
  278. {
  279. UINT64 index = (CAPS_CATEGORY_MASK & c) >> BS_CAPS_BITSHIFT;
  280. mCapabilities[index] |= (c & ~CAPS_CATEGORY_MASK);
  281. }
  282. /**
  283. * @brief Remove a capability flag indicating this capability is
  284. * not supported (default).
  285. */
  286. void unsetCapability(const Capabilities c)
  287. {
  288. UINT64 index = (CAPS_CATEGORY_MASK & c) >> BS_CAPS_BITSHIFT;
  289. mCapabilities[index] &= (~c | CAPS_CATEGORY_MASK);
  290. }
  291. /**
  292. * @brief Checks is the specified capability supported.
  293. */
  294. bool hasCapability(const Capabilities c) const
  295. {
  296. UINT64 index = (CAPS_CATEGORY_MASK & c) >> BS_CAPS_BITSHIFT;
  297. return (mCapabilities[index] & (c & ~CAPS_CATEGORY_MASK)) != 0;
  298. }
  299. /**
  300. * @brief Adds a shader profile to the list of render-system specific supported profiles.
  301. */
  302. void addShaderProfile(const String& profile)
  303. {
  304. mSupportedShaderProfiles.insert(profile);
  305. }
  306. /**
  307. * @brief Adds a mapping between GPU program profile enum and render-system specific profile name.
  308. */
  309. void addGpuProgramProfile(GpuProgramProfile gpuProgProfile, const String& rsSpecificProfile)
  310. {
  311. mGenericToSpecificShaderProfileMap[gpuProgProfile] = rsSpecificProfile;
  312. }
  313. /**
  314. * @brief Returns true if the provided profile is supported.
  315. */
  316. bool isShaderProfileSupported(const String& profile) const
  317. {
  318. return (mSupportedShaderProfiles.end() != mSupportedShaderProfiles.find(profile));
  319. }
  320. /**
  321. * @brief Returns a set of all supported shader profiles.
  322. */
  323. const Set<String>& getSupportedShaderProfiles() const
  324. {
  325. return mSupportedShaderProfiles;
  326. }
  327. /**
  328. * @brief Converts a generic GpuProgramProfile identifier into a render-system specific one.
  329. * Returns an empty string if conversion cannot be done.
  330. */
  331. String gpuProgProfileToRSSpecificProfile(GpuProgramProfile gpuProgProfile) const
  332. {
  333. auto iterFind = mGenericToSpecificShaderProfileMap.find(gpuProgProfile);
  334. if(mGenericToSpecificShaderProfileMap.end() != iterFind)
  335. {
  336. return iterFind->second;
  337. }
  338. return "";
  339. }
  340. /**
  341. * @brief Gets the number of floating-point constants vertex programs support.
  342. */
  343. UINT16 getVertexProgramConstantFloatCount() const
  344. {
  345. return mVertexProgramConstantFloatCount;
  346. }
  347. /**
  348. * @brief Gets the number of integer constants vertex programs support.
  349. */
  350. UINT16 getVertexProgramConstantIntCount() const
  351. {
  352. return mVertexProgramConstantIntCount;
  353. }
  354. /**
  355. * @brief Gets the number of boolean constants vertex programs support.
  356. */
  357. UINT16 getVertexProgramConstantBoolCount() const
  358. {
  359. return mVertexProgramConstantBoolCount;
  360. }
  361. /**
  362. * @brief Gets the number of floating-point constants geometry programs support.
  363. */
  364. UINT16 getGeometryProgramConstantFloatCount() const
  365. {
  366. return mGeometryProgramConstantFloatCount;
  367. }
  368. /**
  369. * @brief Gets the number of integer constants geometry programs support.
  370. */
  371. UINT16 getGeometryProgramConstantIntCount() const
  372. {
  373. return mGeometryProgramConstantIntCount;
  374. }
  375. /**
  376. * @brief Gets the number of boolean constants geometry programs support.
  377. */
  378. UINT16 getGeometryProgramConstantBoolCount() const
  379. {
  380. return mGeometryProgramConstantBoolCount;
  381. }
  382. /**
  383. * @brief Gets the number of floating-point constants fragment programs support.
  384. */
  385. UINT16 getFragmentProgramConstantFloatCount() const
  386. {
  387. return mFragmentProgramConstantFloatCount;
  388. }
  389. /**
  390. * @brief Gets the number of integer constants fragment programs support.
  391. */
  392. UINT16 getFragmentProgramConstantIntCount() const
  393. {
  394. return mFragmentProgramConstantIntCount;
  395. }
  396. /**
  397. * @brief Gets the number of boolean constants fragment programs support.
  398. */
  399. UINT16 getFragmentProgramConstantBoolCount() const
  400. {
  401. return mFragmentProgramConstantBoolCount;
  402. }
  403. /**
  404. * @brief Sets the current GPU device name.
  405. */
  406. void setDeviceName(const String& name)
  407. {
  408. mDeviceName = name;
  409. }
  410. /**
  411. * @brief Gets the current GPU device name.
  412. */
  413. String getDeviceName() const
  414. {
  415. return mDeviceName;
  416. }
  417. /**
  418. * @brief Sets the number of floating-point constants vertex programs support.
  419. */
  420. void setVertexProgramConstantFloatCount(UINT16 c)
  421. {
  422. mVertexProgramConstantFloatCount = c;
  423. }
  424. /**
  425. * @brief Sets the number of integer constants vertex programs support.
  426. */
  427. void setVertexProgramConstantIntCount(UINT16 c)
  428. {
  429. mVertexProgramConstantIntCount = c;
  430. }
  431. /**
  432. * @brief Sets the number of boolean constants vertex programs support.
  433. */
  434. void setVertexProgramConstantBoolCount(UINT16 c)
  435. {
  436. mVertexProgramConstantBoolCount = c;
  437. }
  438. /**
  439. * @brief Sets the number of floating-point constants geometry programs support.
  440. */
  441. void setGeometryProgramConstantFloatCount(UINT16 c)
  442. {
  443. mGeometryProgramConstantFloatCount = c;
  444. }
  445. /**
  446. * @brief Sets the number of integer constants geometry programs support.
  447. */
  448. void setGeometryProgramConstantIntCount(UINT16 c)
  449. {
  450. mGeometryProgramConstantIntCount = c;
  451. }
  452. /**
  453. * @brief Sets the number of boolean constants geometry programs support.
  454. */
  455. void setGeometryProgramConstantBoolCount(UINT16 c)
  456. {
  457. mGeometryProgramConstantBoolCount = c;
  458. }
  459. /**
  460. * @brief Sets the number of floating-point constants fragment programs support.
  461. */
  462. void setFragmentProgramConstantFloatCount(UINT16 c)
  463. {
  464. mFragmentProgramConstantFloatCount = c;
  465. }
  466. /**
  467. * @brief Sets the number of integer constants fragment programs support.
  468. */
  469. void setFragmentProgramConstantIntCount(UINT16 c)
  470. {
  471. mFragmentProgramConstantIntCount = c;
  472. }
  473. /**
  474. * @brief Sets the number of boolean constants fragment programs support.
  475. */
  476. void setFragmentProgramConstantBoolCount(UINT16 c)
  477. {
  478. mFragmentProgramConstantBoolCount = c;
  479. }
  480. /**
  481. * @brief Sets the maximum point screen size in pixels.
  482. */
  483. void setMaxPointSize(float s)
  484. {
  485. mMaxPointSize = s;
  486. }
  487. /**
  488. * @brief Gets the maximum point screen size in pixels.
  489. */
  490. float getMaxPointSize(void) const
  491. {
  492. return mMaxPointSize;
  493. }
  494. /**
  495. * @brief Sets the number of vertices a single geometry program run can emit.
  496. */
  497. void setGeometryProgramNumOutputVertices(int numOutputVertices)
  498. {
  499. mGeometryProgramNumOutputVertices = numOutputVertices;
  500. }
  501. /**
  502. * @brief Gets the number of vertices a single geometry program run can emit.
  503. */
  504. int getGeometryProgramNumOutputVertices(void) const
  505. {
  506. return mGeometryProgramNumOutputVertices;
  507. }
  508. /**
  509. * @brief Get the identifier of the render system from which these capabilities were generated.
  510. */
  511. String getRenderSystemName() const
  512. {
  513. return mRenderSystemName;
  514. }
  515. /**
  516. * @brief Set the identifier of the render system from which these capabilities were generated.
  517. */
  518. void setRenderSystemName(const String& rs)
  519. {
  520. mRenderSystemName = rs;
  521. }
  522. private:
  523. /**
  524. * @brief Initializes vendor enum -> vendor name mappings.
  525. */
  526. static void initVendorStrings();
  527. private:
  528. static Vector<BansheeEngine::String> msGPUVendorStrings;
  529. DriverVersion mDriverVersion;
  530. GPUVendor mVendor = GPU_UNKNOWN;
  531. // The number of texture units available per stage
  532. Map<GpuProgramType, UINT16> mNumTextureUnitsPerStage;
  533. // Total number of texture units available
  534. UINT16 mNumCombinedTextureUnits = 0;
  535. // The number of uniform blocks available per stage
  536. Map<GpuProgramType, UINT16> mNumGpuParamBlocksPerStage;
  537. // Total number of uniform blocks available
  538. UINT16 mNumCombinedUniformBlocks = 0;
  539. // The stencil buffer bit depth
  540. UINT16 mStencilBufferBitDepth = 0;
  541. // Maximum number of vertex buffers we can bind at once
  542. UINT32 mMaxBoundVertexBuffers = 0;
  543. // Stores the capabilities flags.
  544. UINT32 mCapabilities[CAPS_CATEGORY_COUNT];
  545. // The name of the device as reported by the render system
  546. String mDeviceName;
  547. // The identifier associated with the render system for which these capabilities are valid
  548. String mRenderSystemName;
  549. // The number of floating-point constants vertex programs support
  550. UINT16 mVertexProgramConstantFloatCount = 0;
  551. // The number of integer constants vertex programs support
  552. UINT16 mVertexProgramConstantIntCount = 0;
  553. // The number of boolean constants vertex programs support
  554. UINT16 mVertexProgramConstantBoolCount = 0;
  555. // The number of floating-point constants geometry programs support
  556. UINT16 mGeometryProgramConstantFloatCount = 0;
  557. // The number of integer constants vertex geometry support
  558. UINT16 mGeometryProgramConstantIntCount = 0;
  559. // The number of boolean constants vertex geometry support
  560. UINT16 mGeometryProgramConstantBoolCount = 0;
  561. // The number of floating-point constants fragment programs support
  562. UINT16 mFragmentProgramConstantFloatCount = 0;
  563. // The number of integer constants fragment programs support
  564. UINT16 mFragmentProgramConstantIntCount = 0;
  565. // The number of boolean constants fragment programs support
  566. UINT16 mFragmentProgramConstantBoolCount = 0;
  567. // The number of simultaneous render targets supported
  568. UINT16 mNumMultiRenderTargets = 0;
  569. // The maximum point size in pixels
  570. float mMaxPointSize = 0.0f;
  571. // The number of vertices a geometry program can emit in a single run
  572. UINT32 mGeometryProgramNumOutputVertices = 0;
  573. // The list of supported shader profiles
  574. Set<String> mSupportedShaderProfiles;
  575. // Allows us to convert a generic shader profile to a render-system specific one
  576. UnorderedMap<GpuProgramProfile, String> mGenericToSpecificShaderProfileMap;
  577. };
  578. }