2
0

BsRenderAPICapabilities.h 19 KB

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