File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## ? - ?
4+
5+ ##### Fixes :wrench :
6+
7+ - Fixed a bug that could cause a crash or incorrect textures when multiple ` Cesium3DTileset ` tiles referenced the same image by URL.
8+
39## v1.14.0 - 2024-12-02
410
511##### Additions :tada :
Original file line number Diff line number Diff line change @@ -268,6 +268,15 @@ void generateMipMaps(
268268 const Sampler* pSampler =
269269 Model::getSafe (&pModel->samplers , pTexture->sampler );
270270 if (pImage && pSampler) {
271+ // We currently do not support shared resources, so if this image is
272+ // associated with a depot, unshare it. This is necessary to avoid a
273+ // race condition where multiple threads attempt to generate mipmaps for
274+ // the same shared image simultaneously.
275+ if (pImage->pAsset && pImage->pAsset ->getDepot ()) {
276+ // Copy the asset.
277+ pImage->pAsset .emplace (*pImage->pAsset );
278+ }
279+
271280 switch (pSampler->minFilter .value_or (
272281 CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_LINEAR)) {
273282 case CesiumGltf::Sampler::MinFilter::LINEAR_MIPMAP_LINEAR:
You can’t perform that action at this time.
0 commit comments