Disable variable allocation textures on android

This commit is contained in:
Brad Davis 2018-01-11 23:36:24 -08:00
parent 7579451c24
commit 8241def9b9

View file

@ -41,16 +41,19 @@ GLTexture* GLESBackend::syncGPUObject(const TexturePointer& texturePointer) {
object = new GLESAttachmentTexture(shared_from_this(), texture);
break;
case TextureUsageType::STRICT_RESOURCE:
qCDebug(gpugllogging) << "Strict texture " << texture.source().c_str();
object = new GLESStrictResourceTexture(shared_from_this(), texture);
break;
case TextureUsageType::RESOURCE:
// FIXME disabling variable allocation textures for now, while debugging android rendering
// and crashes
#if 0
qCDebug(gpugllogging) << "variable / Strict texture " << texture.source().c_str();
object = new GLESResourceTexture(shared_from_this(), texture);
GLVariableAllocationSupport::addMemoryManagedTexture(texturePointer);
break;
#endif
case TextureUsageType::STRICT_RESOURCE:
qCDebug(gpugllogging) << "Strict texture " << texture.source().c_str();
object = new GLESStrictResourceTexture(shared_from_this(), texture);
break;
default:
Q_UNREACHABLE();
@ -196,13 +199,12 @@ void GLESTexture::syncSampler() const {
glTexParameteri(_target, GL_TEXTURE_WRAP_R, WRAP_MODES[sampler.getWrapModeW()]);
glTexParameterfv(_target, GL_TEXTURE_BORDER_COLOR_EXT, (const float*)&sampler.getBorderColor());
glTexParameteri(_target, GL_TEXTURE_BASE_LEVEL, (uint16)sampler.getMipOffset());
//glTexParameterf(_target, GL_TEXTURE_MAX_ANISOTROPY_EXT, sampler.getMaxAnisotropy());
glTexParameterf(_target, GL_TEXTURE_MIN_LOD, (float)sampler.getMinMip());
glTexParameterf(_target, GL_TEXTURE_MAX_LOD, (sampler.getMaxMip() == Sampler::MAX_MIP_LEVEL ? 1000.f : sampler.getMaxMip()));
(void)CHECK_GL_ERROR();
//glTexParameterf(_target, GL_TEXTURE_MAX_ANISOTROPY_EXT, sampler.getMaxAnisotropy());
}
using GLESFixedAllocationTexture = GLESBackend::GLESFixedAllocationTexture;