From 407e0c0dd74fa260a08de6e05e2c48bdd7ca2c46 Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Fri, 22 Apr 2016 15:48:18 -0700 Subject: [PATCH 1/3] Fixing texture storage allocation on OSX/GL 4.1 --- libraries/gpu/src/gpu/GLBackendTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/GLBackendTexture.cpp b/libraries/gpu/src/gpu/GLBackendTexture.cpp index 363e4a8f38..609451bd13 100755 --- a/libraries/gpu/src/gpu/GLBackendTexture.cpp +++ b/libraries/gpu/src/gpu/GLBackendTexture.cpp @@ -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()) { From 472d3dc45f1e851049c1129e2360772cdbf5a62e Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Fri, 22 Apr 2016 16:25:23 -0700 Subject: [PATCH 2/3] Still working on mac breakage --- libraries/gpu/src/gpu/GLBackendTextureTransfer.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/gpu/src/gpu/GLBackendTextureTransfer.h b/libraries/gpu/src/gpu/GLBackendTextureTransfer.h index 6deaf1e49c..9dc9679628 100644 --- a/libraries/gpu/src/gpu/GLBackendTextureTransfer.h +++ b/libraries/gpu/src/gpu/GLBackendTextureTransfer.h @@ -6,11 +6,14 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include #include #include #include "GLBackendShared.h" +#ifdef Q_OS_WIN #define THREADED_TEXTURE_TRANSFER +#endif class OffscreenGLCanvas; From d87c92baee34a6d555961266d9d02ced6fd74717 Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Fri, 22 Apr 2016 16:30:36 -0700 Subject: [PATCH 3/3] Fixing memory detection on OSX --- libraries/shared/src/GPUIdent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/shared/src/GPUIdent.cpp b/libraries/shared/src/GPUIdent.cpp index 957c4232ff..917020d223 100644 --- a/libraries/shared/src/GPUIdent.cpp +++ b/libraries/shared/src/GPUIdent.cpp @@ -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; } } }