Disable limitedNPOT on OpenGL ES
Review Request #126941 - Created Feb. 1, 2016 and discarded
Hardware like the ATI R300 announce support OpenGL ES, but KWin disallows to run it with OpenGL ES, because we detect it has limited NPOT support. This is true, but the check doesn't make much sense in an OpenGL ES world. An example debug output from affected sytem: OpenGL vendor string: X.Org R300 Project OpenGL renderer string: Gallium 0.4 on ATI RV530 OpenGL version string: OpenGL ES 2.0 Mesa 11.0.2 OpenGL shading language version string: OpenGL ES GLSL ES 1.0.16 Driver: R300G GPU class: R500 OpenGL version: 2.0 GLSL version: 1.0.16 Mesa version: 11.0.2 X server version: 1.17.2 Linux kernel version: 4.2 Requires strict binding: no GLSL shaders: yes Texture NPOT support: limited Virtual Machine: no libkwinglutils: Shaders are not supported This change handles limited NPOT similar to limited GLSL: on GLES it just doesn't exist.
User with such a system tested it for me.
Quoting the documentation:/** * If set, the driver supports GL_ARB_texture_non_power_of_two with the * GL_ARB_texture_rectangle limitations. * * This means no support for mipmap filters, and that only the following * wrap modes are supported: * - GL_CLAMP * - GL_CLAMP_TO_EDGE * - GL_CLAMP_TO_BORDER */ LimitedNPOT
Using an OpenGL ES context does not magically give the GPU
capabilities it doesn't have with an OpenGL context. These limitations
very much apply to R300-R500 and Intel GEN3, regardless of the API.
As for LimitedGLSL, it applies to nearly every GLES2 implementation.
The GLSL ES specification even says so!
The real problem is that you've made kwin assume that if the GPU
can't do everything, then it can't do anything, so everything must be
disabled. Now you're working around that by hiding the limitations so
kwin will allow compositing to be enabled anyway.
The reason I added these capability flags is so that effects can avoid
using features that the hardware doesn't support.
If I had known at the time how they would be used in practice I would
never have added them.