Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
Fix #230. The caches reporting different sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmet Bilgili committed Jan 12, 2016
1 parent 7f7f9dc commit f931aae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog {#Changelog}

# master {#master}


* [#238](https://github.com/BlueBrain/Livre/pull/238):
Fix #230. The caches reporting different sizes
* [#234](https://github.com/BlueBrain/Livre/pull/234):
Fix #227. Rendering set generation is only done once
* [#220](https://github.com/BlueBrain/Livre/pull/220):
Expand Down
7 changes: 5 additions & 2 deletions livre/lib/cache/TextureDataObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ size_t TextureDataObject::getDataSize_() const
if( !isValid() )
return 0;

const Vector3i& voxSizeVec = lodNodePtr_->getVoxelBox( ).getDimension( );
return voxSizeVec[0] * voxSizeVec[1] * voxSizeVec[2];
const Vector3ui& overlap =
dataSourcePtr_->getVolumeInformation().overlap;
const Vector3ui blockSize =
lodNodePtr_->getBlockSize() + overlap * 2;
return blockSize.product();
}

size_t TextureDataObject::getCacheSize() const
Expand Down
6 changes: 3 additions & 3 deletions livre/lib/cache/TextureObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ size_t TextureObject::getCacheSize( ) const
break;
}

const Vector3i textureSize = textureState_->texturePoolPtr->getMaxBlockSize();
const uint32_t cacheSize = textureSize[ 0 ] * textureSize[ 1 ] * textureSize[ 2 ] * elementSize;
return cacheSize;
const Vector3ui textureSize =
textureState_->texturePoolPtr->getMaxBlockSize();
return textureSize.product() * elementSize;
}

const TextureDataObject& TextureObject::getTextureDataObject_( ) const
Expand Down

0 comments on commit f931aae

Please sign in to comment.