From ffbddd2d0f94d3cc74d63226fce5623a28018102 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 19 Sep 2016 13:57:15 -0700 Subject: [PATCH] Disable sparse textures on cubemaps --- libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp index f6d8110b3c..79f4615317 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp @@ -97,6 +97,12 @@ void SparseInfo::maybeMakeSparse() { qCDebug(gpugl45logging) << "Don't enable sparse texture for explicitly generated mipmaps on texture " << _texture._gpuObject.source().c_str(); return; } + + if (GL_TEXTURE_CUBE_MAP == _texture._target) { + qCDebug(gpugl45logging) << "Don't enable sparse texture for cubemaps " << _texture._gpuObject.source().c_str(); + return; + } + const uvec3 dimensions = _texture._gpuObject.getDimensions(); auto allowedPageDimensions = getPageDimensionsForFormat(_texture._target, _texture._internalFormat); // In order to enable sparse the texture size must be an integer multiple of the page size