Fixing warnings

This commit is contained in:
Brad Davis 2016-09-15 01:21:41 -07:00
parent 151df32519
commit 2b5ed86a62
2 changed files with 7 additions and 10 deletions

View file

@ -204,7 +204,6 @@ GL45Texture::~GL45Texture() {
}
}
auto originalAllocatedPages = _allocatedPages;
auto maxSparseMip = std::min<uint16_t>(_maxMip, _sparseInfo._maxSparseLevel);
uint8_t maxFace = (uint8_t)((_target == GL_TEXTURE_CUBE_MAP) ? GLTexture::CUBE_NUM_FACES : 1);
for (uint16_t mipLevel = _minMip; mipLevel <= maxSparseMip; ++mipLevel) {
@ -216,10 +215,9 @@ GL45Texture::~GL45Texture() {
_allocatedPages -= deallocatedPages;
}
}
if (0 != _allocatedPages) {
auto maxSize = _gpuObject.evalMipDimensions(0);
qDebug() << "Allocated pages remaining " << _id << " " << _allocatedPages;
qDebug() << originalAllocatedPages;
qWarning() << "Allocated pages remaining " << _id << " " << _allocatedPages;
}
}
}
@ -424,7 +422,6 @@ void GL45Texture::updateMips() {
if (!_sparse) {
return;
}
bool modified = false;
auto newMinMip = std::min<uint16_t>(_gpuObject.minMip(), _sparseInfo._maxSparseLevel);
if (_minMip < newMinMip) {
stripToMip(newMinMip);
@ -443,8 +440,6 @@ void GL45Backend::derezTextures() const {
if (GLTexture::getMemoryPressure() < 1.0f) {
return;
}
qDebug() << "Allowed texture memory " << Texture::getAllowedGPUMemoryUsage();
qDebug() << "Used texture memory " << Context::getTextureGPUMemoryUsage();
Lock lock(texturesByMipCountsMutex);
if (texturesByMipCounts.empty()) {
@ -458,9 +453,10 @@ void GL45Backend::derezTextures() const {
return;
}
qDebug() << "Allowed texture memory " << Texture::getAllowedGPUMemoryUsage();
qDebug() << "Used texture memory " << Context::getTextureGPUMemoryUsage();
auto& textureMap = texturesByMipCounts;
auto newMipLevel = mipLevel - 1;
qDebug() << "Derez a texture";
GL45Texture* targetTexture = nullptr;
{
auto& textures = texturesByMipCounts[mipLevel];

View file

@ -475,7 +475,7 @@ protected:
}
void loadAll() {
for (auto i = 0; i < _texturesFiles.size(); ++i) {
for (size_t i = 0; i < _texturesFiles.size(); ++i) {
if (_textures[i]) {
continue;
}
@ -534,6 +534,7 @@ private:
auto now = usecTimestampNow();
static auto last = now;
auto delta = (now - last) / USECS_PER_MSEC;
Q_UNUSED(delta);
#if 0
if (!_textures.empty()) {
const auto& front = _textureLoads.front();