Summary: | GLES requires explicit precison definitions?! | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Thomas Lübking <thomas.luebking> |
Component: | scene-opengl | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alejandronova, anakin.cs, benoit.gouhier, heri+kde, hrvoje.senjan, ken20001, mavoga |
Priority: | NOR | Flags: | thomas.luebking:
ReviewRequest+
|
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
URL: | https://git.reviewboard.kde.org/r/112862/ | ||
Latest Commit: | http://commits.kde.org/kwin/7983acea88ebbc419ab28d2bbfe16a3a1f6f04a1 | Version Fixed In: | 5.5 |
Sentry Crash Report: | |||
Attachments: | kwin_gles with MESA_GLSL=dump |
Description
Thomas Lübking
2013-09-03 22:42:37 UTC
are we missing it in some shaders? I thought we define it... No idea, but apparently. There's #ifdef KWIN_HAVE_OPENGLES if (GLPlatform::instance()->glslVersion() >= kVersionNumber(3, 0)) { ba.replace("#version 140", "#version 300 es\n\nprecision highp float;\n"); } #endif What could fail if some shader had no "#version 140" Also there's no mention of vec4 (and others) here, I'm not sure how (all) compiled in shaders are handled and there's fairly complex bytearray manipulation in the colorcorrection. > No idea, but apparently. > > There's > > #ifdef KWIN_HAVE_OPENGLES > if (GLPlatform::instance()->glslVersion() >= kVersionNumber(3, 0)) { > ba.replace("#version 140", "#version 300 es\n\nprecision highp > float;\n"); > } > #endif > > What could fail if some shader had no "#version 140" then it wouldn't have a #version at all and should fail by definition (GLES requires a #version) > Also there's no mention of vec4 (and others) here, hmm never heard of that for vec4. I would expect that the precision for float should be valid for vec4, too. > I'm not sure how (all) > compiled in shaders are handled and there's fairly complex bytearray > manipulation in the colorcorrection. we need some further debug output to see which shader it is. I'll add something to the forum thread. blurshader.cpp #ifdef KWIN_HAVE_OPENGLES const bool glsl_140 = false; #else const bool glsl_140 = GLPlatform::instance()->glslVersion() >= kVersionNumber(1, 40); #endif ... if (glsl_140) stream << "#version 140\n\n"; .... Created attachment 82166 [details]
kwin_gles with MESA_GLSL=dump
Requested files from forum thread.
*** Bug 325134 has been marked as a duplicate of this bug. *** *** Bug 325790 has been marked as a duplicate of this bug. *** FWIW, diff3 of r112862 works here... Was this fix merged already? No. The review request will be marked as submitted and this bug closed whenever that happens. *** Bug 334704 has been marked as a duplicate of this bug. *** Hey, hello, anybody home ? Can someone explain when this issue will be fixed and we can run KWin with OpenGL ES ? No, but you probably just delayed the fix for no reason. Thanks. Does that fix even make sense anymore though? kwin5/Qt5 is built either with OpenGL or OpenGL ES support, not both, and if I've understood correctly it'll always be OpenGL on desktop. Not sure if kwin is supposed to run on mobiles. Afaics the shader is still there and incorrect for GLES + glsl 3.x I don't understand guys what do you mean and why so much time gone but for today if I try: kwin_gles --replace I see white taskbar and following in terminal: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread OpenGL vendor string: X.Org OpenGL renderer string: Gallium 0.4 on AMD RV630 OpenGL version string: OpenGL ES 3.0 Mesa 10.4.0-devel (git-4eb2bbe 2014-09-20 trusty-oibaf-ppa) OpenGL shading language version string: OpenGL ES GLSL ES 3.0 Driver: R600G GPU class: R600 OpenGL version: 3.0 GLSL version: 3.0 Mesa version: 10.4 X server version: 1.15.1 Linux kernel version: 3.16.3 Direct rendering: yes Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no kwin(4168) KWin::EglOnXBackend::init: Cannot enable v-sync as max. swap interval is 0 QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread kwin(4168): Failed to compile fragment shader: "0:2(1): error: no precision specified this scope for type `vec4' 0:4(1): error: no precision specified this scope for type `float' 0:5(1): error: no precision specified this scope for type `float' 0:6(1): error: no precision specified this scope for type `float' 0:7(1): error: no precision specified this scope for type `float' 0:8(1): error: no precision specified this scope for type `float' 0:9(1): error: no precision specified this scope for type `float' 0:10(1): error: no precision specified this scope for type `float' 0:14(2): error: no precision specified this scope for type `vec4' kwin(4168): Failed to link shader: "error: program lacks a fragment shader (In reply to Thomas Lübking from comment #13) > No, but you probably just delayed the fix for no reason. Thanks. Why was it delayed? (In reply to AnAkkk from comment #14) > if I've understood correctly it'll always be OpenGL on desktop. Not sure if kwin is supposed to > run on mobiles. I was running KWin with GLES on the desktop. Actually, as I was programming using GLES, I was using it everywhere for testing, as it was still maturing back then. Kubuntu 14.10 KDE 4.14.2 Mesa 10.4-git Still not fixed. Please, fix it if it's possible at all. > Still not fixed. Please, fix it if it's possible at all.
I'm sorry but we won't fix this for 4.x. We might fix it in 5.x but it has kind of no priority and requires quite some work as one has to recompile all of Qt against GLES. So: patches welcome.
Discarded Qt4 patch - it should however still apply and probably fix the issue (if you compile yourself) https://git.reviewboard.kde.org/r/112862/ *** Bug 294468 has been marked as a duplicate of this bug. *** *** Bug 331237 has been marked as a duplicate of this bug. *** Git commit 7983acea88ebbc419ab28d2bbfe16a3a1f6f04a1 by Martin Gräßlin. Committed on 09/11/2015 at 15:22. Pushed by graesslin into branch 'master'. [effects] Support GLES 3 in Blur and BackgroundContrast Fix code generation in case OpenGL ES 3 or later is used. FIXED-IN: 5.5 REVIEW: 126003 M +23 -9 effects/backgroundcontrast/contrastshader.cpp M +23 -9 effects/blur/blurshader.cpp http://commits.kde.org/kwin/7983acea88ebbc419ab28d2bbfe16a3a1f6f04a1 |