Merge pull request #7745 from jherico/mac_texture_fix

Fixing texture storage allocation on OSX/GL 4.1
This commit is contained in:
Brad Hefta-Gaub 2016-04-22 17:07:12 -07:00
commit f1f9c6740d
3 changed files with 5 additions and 1 deletions

View file

@ -243,7 +243,7 @@ void GLBackend::GLTexture::allocateStorage() {
glTexStorage2D(_target, usedMipLevels(), texelFormat.internalFormat, dimensions.x, dimensions.y);
(void)CHECK_GL_ERROR();
} else {
for (uint16_t l = _minMip; l < _maxMip; l++) {
for (uint16_t l = _minMip; l <= _maxMip; l++) {
// Get the mip level dimensions, accounting for the downgrade level
Vec3u dimensions = _gpuTexture.evalMipDimensions(l);
for (GLenum target : getFaceTargets()) {

View file

@ -6,11 +6,14 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QtGlobal>
#include <QSharedPointer>
#include <GenericQueueThread.h>
#include "GLBackendShared.h"
#ifdef Q_OS_WIN
#define THREADED_TEXTURE_TRANSFER
#endif
class OffscreenGLCanvas;

View file

@ -45,6 +45,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
if (deviceVRAM > bestVRAM) {
bestVRAM = deviceVRAM;
_isValid = true;
}
}
}