depend glsl on TextureNPOT, not LimitedNPOT

The idea was to block shaders that operate on
Texture2D while Texture2DRectangle was use, but
that's indeed controlled by TextureNPOT while
LimitedNPOT indicates Texture2D but without support
for mipmapping and exotic clamping

FIXED-IN: 5.6
REVIEW: 126959
This commit is contained in:
Thomas Lübking 2016-02-01 22:20:53 +01:00
parent 176f492085
commit db5a798952

View file

@ -362,7 +362,9 @@ bool GLShader::compile(GLuint program, GLenum shaderType, const QByteArray &sour
bool GLShader::load(const QByteArray &vertexSource, const QByteArray &fragmentSource)
{
// Make sure shaders are actually supported
if (!GLPlatform::instance()->supports(GLSL) || GLPlatform::instance()->supports(LimitedNPOT)) {
if (!(GLPlatform::instance()->supports(GLSL) &&
// we lack shader branching for Texture2DRectangle everywhere - and it's probably not worth it
GLPlatform::instance()->supports(TextureNPOT))) {
qCCritical(LIBKWINGLUTILS) << "Shaders are not supported";
return false;
}