BsRenderSystemCapabilities.h 19 KB

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