[kwin] [Bug 369317] Kwin crash with gles

2016-10-07 Thread Andrei Slavoiu via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369317

Andrei Slavoiu  changed:

   What|Removed |Added

 Resolution|INVALID |---
 Status|RESOLVED|UNCONFIRMED

--- Comment #5 from Andrei Slavoiu  ---
I finally figured out what is going on here, it looks like epoxy is unable to
distinguish between GLES and regular GL contexts created using EGL on the mesa
implementation (which returns EGL_OPENGL_API when queried about the type of the
current context even when it actually is a GLES one. However weird that may
sound it's perfectly ok to do that per spec) because of a workaround they did
for the non standards compliant PowerVR driver. The epoxy bug url:
https://github.com/anholt/libepoxy/issues/25

So you may wonder why I reopened this bug again if all you can do about it is
pressure epoxy to fix their own bug? Because there actually is an issue in kwin
as well. When using Desktop OpenGL kwin should either request an OpenGL 3.2
context or check for the GL_ARB_sync extension in order to use glFenceSync
(according to epoxy code). However, kwin will create a OpenGL 3.1 context and
never check for the presence of the GL_ARB_sync extension.

Now, to anyone else hitting this bug, an easy workaround for it is to remove
the code under #if PLATFORM_HAS_EGL from the implementation of
epoxy_is_desktop_gl, that's it.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369317] Kwin crash with gles

2016-10-06 Thread Andrei Slavoiu via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369317

--- Comment #3 from Andrei Slavoiu  ---
Created attachment 101459
  --> https://bugs.kde.org/attachment.cgi?id=101459&action=edit
epoxy_test.c

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369317] Kwin crash with gles

2016-10-06 Thread Andrei Slavoiu via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369317

Andrei Slavoiu  changed:

   What|Removed |Added

 Resolution|UPSTREAM|---
 Status|RESOLVED|UNCONFIRMED

--- Comment #2 from Andrei Slavoiu  ---
That is not true, glFenceSync is provided by the driver and a simple test
program based on the gles2 test of epoxy is able to call it without issue on
the same system. The problem is with the way kwin uses epoxy. The only logical
explanation is that epoxy believes the context is a Desktop OpenGL one and so
it compares the version reported by the driver with 3.2 instead of 3.0 as it
should. Btw, this issue is most likely not reproduce-able with an Intel card as
Intel exposes OpenGL ES 3.2

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369317] Kwin crash with gles

2016-09-25 Thread Andrei Slavoiu via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369317

Andrei Slavoiu  changed:

   What|Removed |Added

   Platform|Compiled Sources|Gentoo Packages

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369317] New: Kwin crash with gles

2016-09-25 Thread Andrei Slavoiu via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369317

Bug ID: 369317
   Summary: Kwin crash with gles
   Product: kwin
   Version: 5.7.5
  Platform: Compiled Sources
OS: Linux
Status: UNCONFIRMED
  Keywords: drkonqi
  Severity: crash
  Priority: NOR
 Component: general
  Assignee: kwin-bugs-n...@kde.org
  Reporter: ansl...@yahoo.com

Application: kwin_x11 (5.7.5)
 (Compiled from sources)
Qt Version: 5.6.1
Frameworks Version: 5.26.0
Operating System: Linux 4.7.4-gentoo x86_64
Distribution: "Gentoo Base System release 2.3"

-- Information about the crash:
- What I was doing when the application crashed:
Trying to enable compositing

- Custom settings of the application:
The gles USE flag is enabled globaly, that means all QT components as well as
kwin are built with gles support. KWIN_COMPOSE is not set. From the looks of
.xsession_errors this causes kwin to create a GLES context but treat it as a
regular GL one:
OpenGL vendor string:   X.Org
OpenGL renderer string: Gallium 0.4 on AMD POLARIS10 (DRM 3.2.0
/ 4.7.4-gentoo, LLVM 3.9.0)
OpenGL version string:  OpenGL ES 3.1 Mesa 12.1.0-devel
(git-8ce2afe)
OpenGL shading language version string: OpenGL ES GLSL ES 3.10
Driver: Unknown
GPU class:  Unknown
OpenGL version: 3.1
GLSL version:   3.10
Mesa version:   12.1
X server version:   1.18.4
Linux kernel version:   4.7.4
Requires strict binding:no
GLSL shaders:   yes
Texture NPOT support:   yes
Virtual Machine:no
No provider of glFenceSync found.  Requires one of:
Desktop OpenGL 3.2
GL extension "GL_ARB_sync"
OpenGL ES 3.0
GL extension "GL_APPLE_sync"
Application::crashHandler() called with signal 6; recent crashes: 2
KCrash: Application 'kwin_x11' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
84T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f647d9b4840 (LWP 7848))]

Thread 11 (Thread 0x7f63c6a7b700 (LWP 7878)):
#0  pthread_cond_timedwait () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x7f647b872ca8 in QWaitConditionPrivate::wait_relative (time=3,
this=0x266a270) at thread/qwaitcondition_unix.cpp:126
#2  QWaitConditionPrivate::wait (time=3, this=0x266a270) at
thread/qwaitcondition_unix.cpp:134
#3  QWaitCondition::wait (this=this@entry=0x2296170,
mutex=mutex@entry=0x237ee30, time=3) at thread/qwaitcondition_unix.cpp:208
#4  0x7f647b86f7a2 in QThreadPoolThread::run (this=0x2296160) at
thread/qthreadpool.cpp:127
#5  0x7f647b87268b in QThreadPrivate::start (arg=0x2296160) at
thread/qthread_unix.cpp:341
#6  0x7f647dd55402 in start_thread (arg=0x7f63c6a7b700) at
pthread_create.c:333
#7  0x7f647da9b56d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 10 (Thread 0x7f6447fff700 (LWP 7877)):
#0  pthread_cond_wait () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x7f647ab8f724 in QTWTF::TCMalloc_PageHeap::scavengerThread
(this=0x7f647ac736c0 ) at
../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x7f647ab8f769 in QTWTF::TCMalloc_PageHeap::runScavengerThread
(context=) at
../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x7f647dd55402 in start_thread (arg=0x7f6447fff700) at
pthread_create.c:333
#4  0x7f647da9b56d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7f64550ab700 (LWP 7876)):
#0  0x7f647da94453 in select () at ../sysdeps/unix/syscall-template.S:84
#1  0x7f647ba52d1f in qt_safe_select (nfds=39,
fdread=fdread@entry=0x7f644c000a78, fdwrite=fdwrite@entry=0x7f644c000d08,
fdexcept=fdexcept@entry=0x7f644c000f98, orig_timeout=orig_timeout@entry=0x0) at
kernel/qcore_unix.cpp:75
#2  0x7f647ba54109 in QEventDispatcherUNIX::select (timeout=0x0,
exceptfds=0x7f644c000f98, writefds=0x7f644c000d08, readfds=0x7f644c000a78,
nfds=, this=0x7f644c0008c0) at
kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f644c0008e0,
flags=..., flags@entry=..., timeout=timeout@entry=0x0) at
kernel/qeventdispatcher_unix.cpp:196
#4  0x7f647ba5460a in QEventDispatcherUNIX::processEvents
(this=0x7f644c0008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x7f647ba086ca in QEventLoop::exec (this=this@entry=0x7f64550aad60,
flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x7f647b86e2e4 in QThread::exec (this=this@entry=0x240fa10) a