BsTexture.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. #include "BsPixelBuffer.h"
  2. #include "BsTexture.h"
  3. #include "BsTextureRTTI.h"
  4. #include "BsDataStream.h"
  5. #include "BsException.h"
  6. #include "BsDebug.h"
  7. #include "BsCoreThread.h"
  8. #include "BsAsyncOp.h"
  9. #include "BsResources.h"
  10. #include "BsPixelUtil.h"
  11. namespace BansheeEngine
  12. {
  13. TextureProperties::TextureProperties()
  14. :mHeight(32), mWidth(32), mDepth(1), mNumMipmaps(0),
  15. mHwGamma(false), mMultisampleCount(0), mTextureType(TEX_TYPE_2D),
  16. mFormat(PF_UNKNOWN), mUsage(TU_DEFAULT)
  17. {
  18. }
  19. TextureProperties::TextureProperties(TextureType textureType, UINT32 width, UINT32 height, UINT32 depth, UINT32 numMipmaps,
  20. PixelFormat format, int usage, bool hwGamma, UINT32 multisampleCount)
  21. :mHeight(height), mWidth(width), mDepth(depth), mNumMipmaps(numMipmaps),
  22. mHwGamma(hwGamma), mMultisampleCount(multisampleCount), mTextureType(textureType),
  23. mFormat(format), mUsage(usage)
  24. {
  25. }
  26. bool TextureProperties::hasAlpha() const
  27. {
  28. return PixelUtil::hasAlpha(mFormat);
  29. }
  30. UINT32 TextureProperties::getNumFaces() const
  31. {
  32. return getTextureType() == TEX_TYPE_CUBE_MAP ? 6 : 1;
  33. }
  34. void TextureProperties::mapFromSubresourceIdx(UINT32 subresourceIdx, UINT32& face, UINT32& mip) const
  35. {
  36. UINT32 numMipmaps = getNumMipmaps() + 1;
  37. face = Math::floorToInt((subresourceIdx) / (float)numMipmaps);
  38. mip = subresourceIdx % numMipmaps;
  39. }
  40. UINT32 TextureProperties::mapToSubresourceIdx(UINT32 face, UINT32 mip) const
  41. {
  42. return face * (getNumMipmaps() + 1) + mip;
  43. }
  44. PixelDataPtr TextureProperties::allocateSubresourceBuffer(UINT32 subresourceIdx) const
  45. {
  46. UINT32 face = 0;
  47. UINT32 mip = 0;
  48. mapFromSubresourceIdx(subresourceIdx, face, mip);
  49. UINT32 numMips = getNumMipmaps();
  50. UINT32 width = getWidth();
  51. UINT32 height = getHeight();
  52. UINT32 depth = getDepth();
  53. UINT32 totalSize = PixelUtil::getMemorySize(width, height, depth, getFormat());
  54. for (UINT32 j = 0; j < mip; j++)
  55. {
  56. totalSize = PixelUtil::getMemorySize(width, height, depth, getFormat());
  57. if (width != 1) width /= 2;
  58. if (height != 1) height /= 2;
  59. if (depth != 1) depth /= 2;
  60. }
  61. PixelDataPtr dst = bs_shared_ptr_new<PixelData>(width, height, depth, getFormat());
  62. dst->allocateInternalBuffer();
  63. return dst;
  64. }
  65. TextureCore::TextureCore(TextureType textureType, UINT32 width, UINT32 height, UINT32 depth, UINT32 numMipmaps,
  66. PixelFormat format, int usage, bool hwGamma, UINT32 multisampleCount, const PixelDataPtr& initData)
  67. :mProperties(textureType, width, height, depth, numMipmaps, format, usage, hwGamma, multisampleCount),
  68. mInitData(initData)
  69. { }
  70. void TextureCore::initialize()
  71. {
  72. if (mInitData != nullptr)
  73. {
  74. writeSubresource(0, *mInitData, true);
  75. mInitData->_unlock();
  76. mInitData = nullptr;
  77. }
  78. }
  79. void TextureCore::writeSubresource(UINT32 subresourceIdx, const PixelData& pixelData, bool discardEntireBuffer)
  80. {
  81. THROW_IF_NOT_CORE_THREAD;
  82. if(discardEntireBuffer)
  83. {
  84. if(mProperties.getUsage() != TU_DYNAMIC)
  85. {
  86. // Buffer discard is enabled but buffer was not created as dynamic. Disabling discard.
  87. discardEntireBuffer = false;
  88. }
  89. }
  90. else
  91. {
  92. if (mProperties.getUsage() == TU_DYNAMIC)
  93. {
  94. LOGWRN("Buffer discard is not enabled but buffer was not created as dynamic. Enabling discard.");
  95. discardEntireBuffer = true;
  96. }
  97. }
  98. UINT32 face = 0;
  99. UINT32 mip = 0;
  100. mProperties.mapFromSubresourceIdx(subresourceIdx, face, mip);
  101. writeData(pixelData, mip, face, discardEntireBuffer);
  102. }
  103. void TextureCore::readSubresource(UINT32 subresourceIdx, PixelData& data)
  104. {
  105. THROW_IF_NOT_CORE_THREAD;
  106. UINT32 face = 0;
  107. UINT32 mip = 0;
  108. mProperties.mapFromSubresourceIdx(subresourceIdx, face, mip);
  109. PixelData& pixelData = static_cast<PixelData&>(data);
  110. UINT32 mipWidth, mipHeight, mipDepth;
  111. PixelUtil::getSizeForMipLevel(mProperties.getWidth(), mProperties.getHeight(), mProperties.getDepth(),
  112. mip, mipWidth, mipHeight, mipDepth);
  113. if (pixelData.getWidth() != mipWidth || pixelData.getHeight() != mipHeight ||
  114. pixelData.getDepth() != mipDepth || pixelData.getFormat() != mProperties.getFormat())
  115. {
  116. BS_EXCEPT(RenderingAPIException, "Provided buffer is not of valid dimensions or format in order to read from this texture.");
  117. }
  118. readData(pixelData, mip, face);
  119. }
  120. PixelData TextureCore::lock(GpuLockOptions options, UINT32 mipLevel, UINT32 face)
  121. {
  122. THROW_IF_NOT_CORE_THREAD;
  123. if (mipLevel < 0 || mipLevel > mProperties.getNumMipmaps())
  124. BS_EXCEPT(InvalidParametersException, "Invalid mip level: " + toString(mipLevel) + ". Min is 0, max is " + toString(mProperties.getNumMipmaps()));
  125. if (face < 0 || face >= mProperties.getNumFaces())
  126. BS_EXCEPT(InvalidParametersException, "Invalid face index: " + toString(face) + ". Min is 0, max is " + toString(mProperties.getNumFaces()));
  127. return lockImpl(options, mipLevel, face);
  128. }
  129. void TextureCore::unlock()
  130. {
  131. THROW_IF_NOT_CORE_THREAD;
  132. unlockImpl();
  133. }
  134. void TextureCore::copy(UINT32 srcSubresourceIdx, UINT32 destSubresourceIdx, const SPtr<TextureCore>& target)
  135. {
  136. THROW_IF_NOT_CORE_THREAD;
  137. if (target->mProperties.getTextureType() != mProperties.getTextureType())
  138. BS_EXCEPT(InvalidParametersException, "Source and destination textures must be of same type and must have the same usage and type.");
  139. if (mProperties.getFormat() != target->mProperties.getFormat()) // Note: It might be okay to use different formats of the same size
  140. BS_EXCEPT(InvalidParametersException, "Source and destination texture formats must match.");
  141. if (target->mProperties.getMultisampleCount() > 0 && mProperties.getMultisampleCount() != target->mProperties.getMultisampleCount())
  142. BS_EXCEPT(InvalidParametersException, "When copying to a multisampled texture, source texture must have the same number of samples.");
  143. UINT32 srcFace = 0;
  144. UINT32 srcMipLevel = 0;
  145. UINT32 destFace = 0;
  146. UINT32 destMipLevel = 0;
  147. mProperties.mapFromSubresourceIdx(srcSubresourceIdx, srcFace, srcMipLevel);
  148. target->mProperties.mapFromSubresourceIdx(destSubresourceIdx, destFace, destMipLevel);
  149. if (destFace >= mProperties.getNumFaces())
  150. BS_EXCEPT(InvalidParametersException, "Invalid destination face index");
  151. if (srcFace >= target->mProperties.getNumFaces())
  152. BS_EXCEPT(InvalidParametersException, "Invalid destination face index");
  153. if (srcMipLevel > mProperties.getNumMipmaps())
  154. BS_EXCEPT(InvalidParametersException, "Source mip level out of range. Valid range is [0, " + toString(mProperties.getNumMipmaps()) + "]");
  155. if (destMipLevel > target->mProperties.getNumMipmaps())
  156. BS_EXCEPT(InvalidParametersException, "Destination mip level out of range. Valid range is [0, " + toString(target->mProperties.getNumMipmaps()) + "]");
  157. UINT32 srcMipWidth = mProperties.getWidth() >> srcMipLevel;
  158. UINT32 srcMipHeight = mProperties.getHeight() >> srcMipLevel;
  159. UINT32 srcMipDepth = mProperties.getDepth() >> srcMipLevel;
  160. UINT32 dstMipWidth = target->mProperties.getWidth() >> destMipLevel;
  161. UINT32 dstMipHeight = target->mProperties.getHeight() >> destMipLevel;
  162. UINT32 dstMipDepth = target->mProperties.getDepth() >> destMipLevel;
  163. if (srcMipWidth != dstMipWidth || srcMipHeight != dstMipHeight || srcMipDepth != dstMipDepth)
  164. BS_EXCEPT(InvalidParametersException, "Source and destination sizes must match");
  165. copyImpl(srcFace, srcMipLevel, destFace, destMipLevel, target);
  166. }
  167. /************************************************************************/
  168. /* TEXTURE VIEW */
  169. /************************************************************************/
  170. TextureViewPtr TextureCore::createView(const SPtr<TextureCore>& texture, const TEXTURE_VIEW_DESC& desc)
  171. {
  172. return bs_shared_ptr<TextureView>(new (bs_alloc<TextureView>()) TextureView(texture, desc));
  173. }
  174. void TextureCore::clearBufferViews()
  175. {
  176. mTextureViews.clear();
  177. }
  178. TextureViewPtr TextureCore::requestView(const SPtr<TextureCore>& texture, UINT32 mostDetailMip, UINT32 numMips, UINT32 firstArraySlice, UINT32 numArraySlices, GpuViewUsage usage)
  179. {
  180. THROW_IF_NOT_CORE_THREAD;
  181. assert(texture != nullptr);
  182. TEXTURE_VIEW_DESC key;
  183. key.mostDetailMip = mostDetailMip;
  184. key.numMips = numMips;
  185. key.firstArraySlice = firstArraySlice;
  186. key.numArraySlices = numArraySlices;
  187. key.usage = usage;
  188. auto iterFind = texture->mTextureViews.find(key);
  189. if (iterFind == texture->mTextureViews.end())
  190. {
  191. TextureViewPtr newView = texture->createView(texture, key);
  192. texture->mTextureViews[key] = new (bs_alloc<TextureViewReference>()) TextureViewReference(newView);
  193. iterFind = texture->mTextureViews.find(key);
  194. }
  195. iterFind->second->refCount++;
  196. return iterFind->second->view;
  197. }
  198. void TextureCore::releaseView(const TextureViewPtr& view)
  199. {
  200. THROW_IF_NOT_CORE_THREAD;
  201. assert(view != nullptr);
  202. SPtr<TextureCore> texture = view->getTexture();
  203. auto iterFind = texture->mTextureViews.find(view->getDesc());
  204. if (iterFind == texture->mTextureViews.end())
  205. {
  206. BS_EXCEPT(InternalErrorException, "Trying to release a texture view that doesn't exist!");
  207. }
  208. iterFind->second->refCount--;
  209. if (iterFind->second->refCount == 0)
  210. {
  211. TextureViewReference* toRemove = iterFind->second;
  212. texture->mTextureViews.erase(iterFind);
  213. bs_delete(toRemove);
  214. }
  215. }
  216. Texture::Texture()
  217. {
  218. }
  219. Texture::Texture(TextureType textureType, UINT32 width, UINT32 height, UINT32 depth, UINT32 numMipmaps,
  220. PixelFormat format, int usage, bool hwGamma, UINT32 multisampleCount)
  221. :mProperties(textureType, width, height, depth, numMipmaps, format, usage, hwGamma, multisampleCount)
  222. {
  223. }
  224. Texture::Texture(const PixelDataPtr& pixelData, int usage, bool hwGamma)
  225. : mProperties(pixelData->getDepth() > 1 ? TEX_TYPE_3D : TEX_TYPE_2D, pixelData->getWidth(), pixelData->getHeight(),
  226. pixelData->getDepth(), 0, pixelData->getFormat(), usage, hwGamma, 0), mInitData(pixelData)
  227. {
  228. if (mInitData != nullptr)
  229. mInitData->_lock();
  230. }
  231. void Texture::initialize()
  232. {
  233. mSize = calculateSize();
  234. // Allocate CPU buffers if needed
  235. if ((mProperties.getUsage() & TU_CPUCACHED) != 0)
  236. {
  237. createCPUBuffers();
  238. if (mInitData != nullptr)
  239. updateCPUBuffers(0, *mInitData);
  240. }
  241. Resource::initialize();
  242. }
  243. SPtr<CoreObjectCore> Texture::createCore() const
  244. {
  245. const TextureProperties& props = getProperties();
  246. SPtr<CoreObjectCore> coreObj = TextureCoreManager::instance().createTextureInternal(props.getTextureType(), props.getWidth(), props.getHeight(),
  247. props.getDepth(), props.getNumMipmaps(), props.getFormat(), props.getUsage(), props.isHardwareGammaEnabled(), props.getMultisampleCount(), mInitData);
  248. if ((mProperties.getUsage() & TU_CPUCACHED) == 0)
  249. mInitData = nullptr;
  250. return coreObj;
  251. }
  252. AsyncOp Texture::writeSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const PixelDataPtr& data, bool discardEntireBuffer)
  253. {
  254. updateCPUBuffers(subresourceIdx, *data);
  255. data->_lock();
  256. std::function<void(const SPtr<TextureCore>&, UINT32, const PixelDataPtr&, bool, AsyncOp&)> func =
  257. [&](const SPtr<TextureCore>& texture, UINT32 _subresourceIdx, const PixelDataPtr& _pixData, bool _discardEntireBuffer, AsyncOp& asyncOp)
  258. {
  259. texture->writeSubresource(_subresourceIdx, *_pixData, _discardEntireBuffer);
  260. _pixData->_unlock();
  261. asyncOp._completeOperation();
  262. };
  263. return accessor.queueReturnCommand(std::bind(func, getCore(), subresourceIdx,
  264. data, discardEntireBuffer, std::placeholders::_1));
  265. }
  266. AsyncOp Texture::readSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const PixelDataPtr& data)
  267. {
  268. data->_lock();
  269. std::function<void(const SPtr<TextureCore>&, UINT32, const PixelDataPtr&, AsyncOp&)> func =
  270. [&](const SPtr<TextureCore>& texture, UINT32 _subresourceIdx, const PixelDataPtr& _pixData, AsyncOp& asyncOp)
  271. {
  272. texture->readSubresource(_subresourceIdx, *_pixData);
  273. _pixData->_unlock();
  274. asyncOp._completeOperation();
  275. };
  276. return accessor.queueReturnCommand(std::bind(func, getCore(), subresourceIdx,
  277. data, std::placeholders::_1));
  278. }
  279. UINT32 Texture::calculateSize() const
  280. {
  281. return mProperties.getNumFaces() * PixelUtil::getMemorySize(mProperties.getWidth(),
  282. mProperties.getHeight(), mProperties.getDepth(), mProperties.getFormat());
  283. }
  284. void Texture::updateCPUBuffers(UINT32 subresourceIdx, const PixelData& pixelData)
  285. {
  286. if ((mProperties.getUsage() & TU_CPUCACHED) == 0)
  287. return;
  288. if (subresourceIdx >= (UINT32)mCPUSubresourceData.size())
  289. {
  290. LOGERR("Invalid subresource index: " + toString(subresourceIdx) + ". Supported range: 0 .. " + toString(mCPUSubresourceData.size()));
  291. return;
  292. }
  293. UINT32 mipLevel;
  294. UINT32 face;
  295. mProperties.mapFromSubresourceIdx(subresourceIdx, face, mipLevel);
  296. UINT32 mipWidth, mipHeight, mipDepth;
  297. PixelUtil::getSizeForMipLevel(mProperties.getWidth(), mProperties.getHeight(), mProperties.getDepth(),
  298. mipLevel, mipWidth, mipHeight, mipDepth);
  299. if (pixelData.getWidth() != mipWidth || pixelData.getHeight() != mipHeight ||
  300. pixelData.getDepth() != mipDepth || pixelData.getFormat() != mProperties.getFormat())
  301. {
  302. LOGERR("Provided buffer is not of valid dimensions or format in order to update this texture.");
  303. return;
  304. }
  305. if (mCPUSubresourceData[subresourceIdx]->getSize() != pixelData.getSize())
  306. BS_EXCEPT(InternalErrorException, "Buffer sizes don't match.");
  307. UINT8* dest = mCPUSubresourceData[subresourceIdx]->getData();
  308. UINT8* src = pixelData.getData();
  309. memcpy(dest, src, pixelData.getSize());
  310. }
  311. void Texture::readData(PixelData& dest, UINT32 mipLevel, UINT32 face)
  312. {
  313. if ((mProperties.getUsage() & TU_CPUCACHED) == 0)
  314. {
  315. LOGERR("Attempting to read CPU data from a texture that is created without CPU caching.");
  316. return;
  317. }
  318. UINT32 mipWidth, mipHeight, mipDepth;
  319. PixelUtil::getSizeForMipLevel(mProperties.getWidth(), mProperties.getHeight(), mProperties.getDepth(),
  320. mipLevel, mipWidth, mipHeight, mipDepth);
  321. if (dest.getWidth() != mipWidth || dest.getHeight() != mipHeight ||
  322. dest.getDepth() != mipDepth || dest.getFormat() != mProperties.getFormat())
  323. {
  324. LOGERR("Provided buffer is not of valid dimensions or format in order to read from this texture.");
  325. return;
  326. }
  327. UINT32 subresourceIdx = mProperties.mapToSubresourceIdx(face, mipLevel);
  328. if (subresourceIdx >= (UINT32)mCPUSubresourceData.size())
  329. {
  330. LOGERR("Invalid subresource index: " + toString(subresourceIdx) + ". Supported range: 0 .. " + toString(mCPUSubresourceData.size()));
  331. return;
  332. }
  333. if (mCPUSubresourceData[subresourceIdx]->getSize() != dest.getSize())
  334. BS_EXCEPT(InternalErrorException, "Buffer sizes don't match.");
  335. UINT8* srcPtr = mCPUSubresourceData[subresourceIdx]->getData();
  336. UINT8* destPtr = dest.getData();
  337. memcpy(destPtr, srcPtr, dest.getSize());
  338. }
  339. void Texture::createCPUBuffers()
  340. {
  341. UINT32 numFaces = mProperties.getNumFaces();
  342. UINT32 numMips = mProperties.getNumMipmaps() + 1;
  343. UINT32 numSubresources = numFaces * numMips;
  344. mCPUSubresourceData.resize(numSubresources);
  345. for (UINT32 i = 0; i < numFaces; i++)
  346. {
  347. UINT32 curWidth = mProperties.getWidth();
  348. UINT32 curHeight = mProperties.getHeight();
  349. UINT32 curDepth = mProperties.getDepth();
  350. for (UINT32 j = 0; j < numMips; j++)
  351. {
  352. UINT32 subresourceIdx = mProperties.mapToSubresourceIdx(i, j);
  353. mCPUSubresourceData[subresourceIdx] = bs_shared_ptr_new<PixelData>(curWidth, curHeight, curDepth, mProperties.getFormat());
  354. mCPUSubresourceData[subresourceIdx]->allocateInternalBuffer();
  355. if (curWidth > 1)
  356. curWidth = curWidth / 2;
  357. if (curHeight > 1)
  358. curHeight = curHeight / 2;
  359. if (curDepth > 1)
  360. curDepth = curDepth / 2;
  361. }
  362. }
  363. }
  364. SPtr<TextureCore> Texture::getCore() const
  365. {
  366. return std::static_pointer_cast<TextureCore>(mCoreSpecific);
  367. }
  368. /************************************************************************/
  369. /* SERIALIZATION */
  370. /************************************************************************/
  371. RTTITypeBase* Texture::getRTTIStatic()
  372. {
  373. return TextureRTTI::instance();
  374. }
  375. RTTITypeBase* Texture::getRTTI() const
  376. {
  377. return Texture::getRTTIStatic();
  378. }
  379. /************************************************************************/
  380. /* STATICS */
  381. /************************************************************************/
  382. HTexture Texture::create(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
  383. int numMips, PixelFormat format, int usage, bool hwGammaCorrection, UINT32 multisampleCount)
  384. {
  385. TexturePtr texturePtr = _createPtr(texType,
  386. width, height, depth, numMips, format, usage, hwGammaCorrection, multisampleCount);
  387. return static_resource_cast<Texture>(gResources()._createResourceHandle(texturePtr));
  388. }
  389. HTexture Texture::create(TextureType texType, UINT32 width, UINT32 height,
  390. int numMips, PixelFormat format, int usage, bool hwGammaCorrection, UINT32 multisampleCount)
  391. {
  392. TexturePtr texturePtr = _createPtr(texType,
  393. width, height, numMips, format, usage, hwGammaCorrection, multisampleCount);
  394. return static_resource_cast<Texture>(gResources()._createResourceHandle(texturePtr));
  395. }
  396. HTexture Texture::create(const PixelDataPtr& pixelData, int usage, bool hwGammaCorrection)
  397. {
  398. TexturePtr texturePtr = TextureManager::instance().createTexture(pixelData, usage, hwGammaCorrection);
  399. return static_resource_cast<Texture>(gResources()._createResourceHandle(texturePtr));
  400. }
  401. TexturePtr Texture::_createPtr(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
  402. int num_mips, PixelFormat format, int usage, bool hwGammaCorrection, UINT32 multisampleCount)
  403. {
  404. return TextureManager::instance().createTexture(texType,
  405. width, height, depth, num_mips, format, usage, hwGammaCorrection, multisampleCount);
  406. }
  407. TexturePtr Texture::_createPtr(TextureType texType, UINT32 width, UINT32 height,
  408. int num_mips, PixelFormat format, int usage, bool hwGammaCorrection, UINT32 multisampleCount)
  409. {
  410. return TextureManager::instance().createTexture(texType,
  411. width, height, num_mips, format, usage, hwGammaCorrection, multisampleCount);
  412. }
  413. const HTexture& Texture::dummy()
  414. {
  415. static HTexture dummyTexture;
  416. if (!dummyTexture)
  417. {
  418. PixelDataPtr pixelData = PixelData::create(2, 2, 1, PF_R8G8B8A8);
  419. pixelData->setColorAt(Color::Red, 0, 0);
  420. pixelData->setColorAt(Color::Red, 0, 1);
  421. pixelData->setColorAt(Color::Red, 1, 0);
  422. pixelData->setColorAt(Color::Red, 1, 1);
  423. dummyTexture = create(pixelData);
  424. }
  425. return dummyTexture;
  426. }
  427. }