From a55669b83e783057c793714e17f4d99e6bfd5b95 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 14 Sep 2016 11:57:25 -0700 Subject: [PATCH] Only enable sparse textures by env variable --- libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp index 889229c1aa..e198417db4 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp @@ -26,7 +26,7 @@ using namespace gpu::gl; using namespace gpu::gl45; static const QString DEBUG_FLAG("HIFI_ENABLE_SPARSE_TEXTURES"); -static bool enableSparseTextures = true; // QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); +static bool enableSparseTextures = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); // Allocate 1 MB of buffer space for paged transfers #define DEFAULT_PAGE_BUFFER_SIZE (1024*1024) @@ -179,7 +179,7 @@ GLuint GL45Backend::getTextureID(const TexturePointer& texture, bool transfer) { GL45Texture::GL45Texture(const std::weak_ptr& backend, const Texture& texture, bool transferrable) : GLTexture(backend, texture, allocate(texture), transferrable), _sparseInfo(*this), _transferState(*this) { - _sparse = _transferrable && (_target != GL_TEXTURE_CUBE_MAP); + _sparse = enableSparseTextures && _transferrable && (_target != GL_TEXTURE_CUBE_MAP); if (_sparse) { glTextureParameteri(_id, GL_TEXTURE_SPARSE_ARB, GL_TRUE);