/srv/irclogs.ubuntu.com/2014/05/16/#ubuntu-mir.txt

duflubschaefer: Your SDL 2.0 work, that's not in archive is it?01:45
bschaeferduflu, the one in archive will work for the desktop01:46
bschaeferyou'll need the one in mir staging for the phone01:46
duflubschaefer: Oh, trusty or just utopic?01:47
bschaeferthere was an issue with arm i need to get patch in archive :(01:47
bschaeferduflu, utopic01:47
bschaeferi dont think the trusty one built01:47
duflubschaefer: Ah. No wonder it wasn't linked to Mir :)01:47
bschaefero looks like it did01:47
bschaeferduflu, it has a nice dynamic linking, so no hard depends :)01:47
bschaeferbut i suppose you need so to compile01:48
duflubschaefer: That's the right answer. Although it's so rare these days I always don't expect it :)01:48
* bschaefer wrote the debain file and has forgotten01:48
bschaeferduflu, :)01:48
duflu*almost01:48
bschaeferduflu, i didn't know about until Rayn, one of the devs mentioned it01:48
bschaeferand did that work01:48
bschaeferit was pretty cool01:48
duflubschaefer: How's the input support?01:52
dufluPretty much complete (as much as Mir allows you to)?01:52
* RAOF hides01:59
bschaeferduflu, yeah02:13
bschaeferduflu, and yeah i need to re-confirm that bug02:13
bschaeferduflu, o thanks for re-opening it :)02:14
bschaeferalso turns out mir does shaped windows server side, but allows for rect region windows02:17
bschaefersooo i need to implement that as well02:17
duflubschaefer: I've just started modifying that stuff. But if you mean windows with an alpha channel, yet that works now: mir_demo_client_egltriangle -b 002:18
duflu-yet +yeah02:18
bschaefersweet! I don't know much about shape windows them selfs02:24
bschaeferjust saw it in SDL and know i've to support it02:24
bschaeferi think its using alpha channels02:24
bschaeferas it takes a bitmap02:25
bschaefer(for its example)02:25
duflubschaefer: It *just works* (tm)02:25
bschaefer:)02:25
bschaeferit looks cool on x11, so it would be nice to support it haha02:25
dufluAlthough demo-shell is naive and will put a rectangular shadow around your shaped app :P02:25
bschaeferthats good to know02:26
bschaefervs freaking out02:26
dufluRAOF: Oh, no more inline comments check box in reviews07:00
RAOFTo the EOW!07:51
slvn_Hello, I have an issue with MIR + a touch-screen07:56
slvn_I run the app both on x86 (Desktop) and ARM (tablet)07:56
slvn_In some condition I dont get the TouchEvent "UP" from my 2nd finger07:57
slvn_The test-case is :  Put Finger-1 Down, F2-Down,  F2-Up, F1-Up   => it looks like Mir sends only one Up07:58
slvn_I have already talk about this with some mir-developer .. (I think they are sleeping now)07:59
slvn_Has anyone  an idea to debug this ?07:59
slvn_(I know how to compile lp:mir, I have already put some debug trace on, and inside code ...)07:59
anpokslvn_: that might be speculation, maybe you get the up events in a single event?08:04
anpokslvn_: what is the result of  mir_event.motion.action & 0xff00 when you only get a single up event?08:06
slvn_anpok, how could I check that ? here's some part of the *application* code -> https://hg.libsdl.org/SDL/file/3e2b3019a879/src/video/mir/SDL_mirevents.c08:06
=== Stskeepz is now known as Stskeeps
anpokalan_g: seems like my mp failed because of timing issues in the asio alarm test fixture \o/08:06
slvn_anpok, I will check08:07
anpokslvn_: we borrowed some ugliness from the android input stack08:07
anpokand that is up and down events for pointers/finger may be encoded in a single event, and the state change is stored in the action value08:08
slvn_anpok, yep I understand, I check that :)08:08
anpokseems like line 167 in the file need to handle that08:08
anpokk08:08
anpokasio does not allow replacing the timer scheduler during runtime or as an io_service configuration.. so one way to eliminate real timing could be to not use asios deadline_timer but write a timer service that behaves exactly like it, but uses an abstract scheduler interface.08:12
alan_ghmm08:13
anpoksomehow..08:14
=== yofel_ is now known as yofel
slvn_anpok,  ... before starting the whole compilation stuff. A question : mir_event.motion.action is defined in : /usr/include/mircommon/mir_toolkit/event.h,  and it goes from 0 to 10.  so the mir_event.motion.action & 0xff00 does not make sense ?08:14
anpokwell i would like agree to that..08:15
slvn_if ( mir_event.motion.action & 0xff00 ) == 0, that would be a mir_motion_action_down << 808:16
slvn_but il will check08:16
anpokslvn_: hm ok I was wrong you have to get two up events08:17
anpokslvn_: the android input stack stores the index of the pointer that goes up /down in that part of the action variable08:20
anpokI believe to stay somewhat compatible that part was kept..08:20
anpokslvn_: so i guess you run in the default case when you get the second up event08:20
anpokfor the first up event you will get (pointer index 0 << 0xff) | mir_motion_action_up as action08:20
anpokand for the second up event you will get (1 <<0xff)| mir_motion_action_up08:21
anpokbut it depends on the order of finger releasing08:21
anpokso yeah what you observe makes sense given the mir event handling code08:21
slvn_ I enter the default case with action =  0x105 and 0x10608:22
slvn_anpok, yep, the order of finger releasing has also a very strange impact !08:22
anpokbecause the value stored is not the finger id but the index in the attached pointer_coordinates array08:23
slvn_105 / 106 is   mir_motion_action_up           = 1,     mir_motion_action_pointer_down = 5,   mir_motion_action_pointer_up   = 6,08:23
slvn_anpok, so basically : I should do switch ( action & 0xff)          to strip the finger id ?08:25
anpoknot the finger id but the pointer_coordinates index..08:25
anpokand you have to read the pointer coordinate index to pass the right id to the HandleTouchPress function..08:26
anpoki believe the other not mentioned index can be treated as a touch motion08:26
anpokalan_g: we would need something similar to that - written against a mockable interface: http://www.boost.org/doc/libs/1_55_0/boost/asio/deadline_timer.hpp08:28
anpok:)08:28
anpokwrong file08:28
anpokthat one http://www.boost.org/doc/libs/1_55_0/boost/asio/detail/deadline_timer_service.hpp08:29
alan_ganpok: I've not yet had time to look at your MP or why it failed. So I'm lacking context to make meaningful comment.08:31
anpokok the AsioMainLoopAlarmTest.main_loop_runs_unti_stop_called does wait for 10 ms for the ml thread to start and to execute a 0 ms timeout08:33
alan_gtests that rely on sleep/wait are broken08:34
slvn_anpok, line 228 and 231 : I could replace the "cord_index" by :   (motion.action >> 8)08:37
anpokyes - but you only get meaning full values if you are handling action&0ff = mir_motion_action_pointer_{up,down}08:42
greybackalf_: hey, question on the MultiThreadedCompositor: how does it manage to switch between using the DisplayBufferCompositingFunctor and the BufferConsumingFunctor during runtime?08:44
greybackI don't see where the decision to use one over the other occurs08:44
alf_greyback: They both run in parallel, but you shouldn't concern yourself with that, it will soon be removed and the task of consuming frames will be done at a lower level08:45
slvn_anpok : yes, I also changed switch (motion.action & 0xff) line  169, and 19308:49
slvn_anpok:  now it's much better for Up/Down event08:49
greybackalf_: okay. Different hypothetical question: say I wrote a naughty server using Mir, which uses its own compositing loop instead of Mir's. While running as a nested server, when the display is blanked, and it tries to render, a exception is thrown inside Mir: "error during hwc prepare(). rc = ffffffff"08:51
anpoksounds very hypothetical08:51
greyback:)08:52
greybackalf_: aside from telling to not be naughty (am working on it), what avenue would you suspect?08:52
alf_greyback: hmm, strange, the nested server shouldn't touch the screen at all... Plus, for the host server, when the screen is blanked we normally don't even a expose a display buffer for that screen.08:56
alf_greyback: is the exception thrown from the host mir or from your qt-compositor nested mir?08:57
slvn_anpok, something is still weird, I still need a little help.  This is only 1 "motion.action" but a table of pointer_coordinates[pointer_count]09:01
greybackWhy I'm surprised is that it's running as nested server, so I expected it to be free to render as much as it wantede while the display was blanked, as the system server would consume those buffers09:03
greybackalf_: good question, lemme see09:04
anpokslvn_: i believe the other pointers do not change up/down state but are just provided because they might contain moves moves - but not really sure09:05
anpok-moves09:05
anpokI have to dig more into InputDispatcher to see when that happens09:06
slvn_anpok. I think (not checked) there are different "motion.pointer_coordinates[cord_index].id". So If I choose cord_index==action>>8. I fix the .id09:09
slvn_and then, I get only motion event from 1 finger09:09
slvn_if I only do : "switch (motion.action & 0xff) {" and discard the 0xff00, all work fine09:10
slvn_basically, If it would have been "motion.action & 0xff" from scratch in SDL code, I would have not noticed the bug09:11
alf_duflu: Are you working on the cleanup on sigabort etc? If not, I can pick it up.09:11
alf_duflu: alan_g: I am thinking of adding a mg::Platform::emergency_cleanup() method to do a best effort cleanup in fatal signal situations09:12
alan_galf_: reasonable. The alternative design is a registration facility (like atexit()).09:14
alf_alan_g: Like, e.g., EmergencyCleanupRegistrar::register_cleanup(...) mg::create_platform(...,std::shared_ptr<EmergencyCleanupRegistrar> const& r) ?09:19
slvn_anpok:  if (action & 0xff == cord_index) then real_action=action&0xff else real_action = motion09:19
alan_gOr EmergencyCleanupRegistrar const& r09:20
alf_alan_g: it depends on whether a platform needs to do clean-up for created display though... unless we also add this to Platform::create_display()09:21
alan_gHmm. It is also possible to install signal handlers in the "platform"09:21
slvn_anpok : this patch is working perfectly ! http://pastebin.com/PB7FTvkk09:22
slvn_anpok this is what you said first I think!09:22
alan_galf_: I don't see why it depends. The are equivalent with: r.register([this]{ emegency_cleanup(); });09:24
anpokslvn_: ah that function is called for every pointer?09:25
anpokthen yes looks good!09:25
slvn_anpok with the pointer_cound, but only one action for all !09:26
slvn_I cannot use the same action for all, because otherwise I have weird up/down event that appears09:27
slvn_F1 Down F2 Down F1 Up F2 Up ->  down down up up Up Down09:27
alf_alan_g: I meant the comment for using a shared_ptr vs a reference to pass the registrar09:28
slvn_ok ... I send this patch to bschaefer and also racarr__ because there were implicated09:28
slvn_thanks anpok for the help !09:28
alan_galf_: I got that. Your original mg::Platform::emergency_cleanup() code didn't need it. And neither does  r.register([this]{ emegency_cleanup(); });09:30
slvn_anpok, anyway, is there a way to see why the cord_index is encoded into the "action" and also, when there are several pointer count, why by default this should be a motion action09:36
alf_alan_g: Sure, but neither handle the case where the individual displays need cleanup, *without* the platform having a mediating role in that. Anyway, at least for mesa there isn't such a need anyway.09:36
alf_bbiab09:38
alan_galf_: OK. I don't (currently) see a strong reason for preferring any of the three approaches.09:40
alan_gWell four if you consider rev vs sp different09:40
alan_g*ref09:40
slvn_anpok : curiously : fingerpaint.c has :  MirMotionAction masked_action = event->motion.action & ~0xff00;     // FIXME: https://bugs.launchpad.net/mir/+bug/119710809:40
ubot5Ubuntu bug 1197108 in Mir "Input action fields no longer maintain compatibility with surfaceflinger" [Medium,Fix released]09:40
anpokslvn_: the encoding happens in InputReader of the android input code (TouchMapper is the class)09:43
duflualf_: Oops, sorry. No not working on it at all (https://bugs.launchpad.net/bugs/1320114)09:54
ubot5Ubuntu bug 1320114 in Mir "[DRM/GBM] Crashing Mir (via fatal signal) often leaves the screen blank and difficult to recover" [Medium,Triaged]09:54
slvn_anpok, the patch is not working. It works better, but sometime I miss a UP event  (miss== I dont detect?)10:03
anpokslvn_: oh sorry did not look at the patch properly10:21
anpokslvn_: http://pastebin.com/fy97wgEJ10:28
slvn_anpok,  okay.... I found some stuff !  MIR is sending me : action=0x101  but only pointer_counter=1 !!!!10:32
slvn_so I never do something with this event !10:32
slvn_anpok, action=0x101 means the UP event should be applied to the cord_index=1, but the pointer_count==1 mean there is only 1 element in the table, only 1 cord_index (of value=0)10:36
slvn_anpok, ... that's fully fix my issue now ! and it appears several time10:39
slvn_if (motion.pointer_count == 1 && (motion.action >> 8) != 0)10:39
slvn_motion.action &= 0xff;10:39
anpokoh i assumed it only happens for pointer_up,down and not for all kinds of up and down events..10:48
=== seb128_ is now known as seb128
slvn_Everybody, does the MirMotionEvent struct makes sense to anyone  ?? MIR sends me sometimes with "motion.action=0x101" (cord_index=1 + action_up) and "pointer_counter=1"  => so the only cord_index available 0 ! Is this a Bug ?11:50
=== alan_g is now known as alan_g|lunch
anpokthe code in12:17
anpokwrong terminal12:18
anpokslvn_: looks like a bug12:18
slvn_anpok, ok, maybe I should double-check with latest version of MIR ?  (I am using lp:mir  Tree is up to date at revision 1186)12:26
=== alan_g|lunch is now known as alan_g
=== ted is now known as tedg
=== alan_g is now known as alan_g|tea
=== jono is now known as Guest91026
=== ValicekB_ is now known as ValicekB
=== tedg is now known as ted
seb128hey there16:18
seb128is Mir supposed to work on any intel hardware?16:19
seb128it doesn't seem to run on the Dell mini 10v (that's an old atom based machine with an intel 950 video card)16:19
kdub_seb128, I use a i965 for mir work16:21
seb128I had EGL errors/assertions in the unity8-mir log16:22
seb128need to boot again and share them16:22
seb128I guess my current description lacks details16:22
racarr__seb128: Ive heard rumors about i915 issues I think16:43
racarr__the ollld ones16:43
racarr__oh 95016:43
racarr__who knows ;)16:43
=== alan_g|tea is now known as alan_g
=== dandrader is now known as dandrader|lunch
=== alan_g is now known as alan_g|EOW
seb128racarr__, it might be i915 or 945, the 950 came from some googling, but didrocks pointed out that it was probably not right17:05
seb128yeah, it's i19517:09
seb128the error it gives is "ASSERT: "(eglContext_ = eglCreateContext( eglDisplay_, screen->eglConfig(), share ? share->eglContext() : EGL_NO_CONTEXT, attribus.constData())) != EGL_NO_CONTEXT" in file ../../../../src/platforms/base.context.cc, line 6317:15
seb128(I hope I didn't do typos, I don't have an easy way to copy the log from the machine)17:16
seb128that's in unity8-mir.log17:16
racarr__seb128: Ok I think there is something17:42
racarr__with i915, i.e. the mesa driver doesnt support the DRI2 apis or17:43
racarr__*not entirely sure*17:43
racarr__all I know for sure is that duflu knows17:43
seb128ok17:43
seb128"known issue" then ;-)17:43
seb128let me know if I should report it17:43
xnoxwhat's the difference between libmir*-mesa & libmir*-android packages?17:44
racarr__kgunn: ^ Do you remember? i915 intel mesa...doesn't work?17:44
=== dandrader|lunch is now known as dandrader
racarr__xnox: libmir-mesa uses MEsa EGL, GBM, kernel drm (direct rendering manager) modesetting, etc17:45
xnoxracarr__: why would i want that installed on ubuntu-touch?17:45
racarr__libmir-android uses android graphics drivers, android EGL, gralloc, hardware composer17:45
racarr__Id ont think you would lol17:45
kdub_yeah, you wouldn't17:45
xnoxracarr__: lolz, we do at the moment =)17:45
xnoxno wonder ubuntu-touch image is 1.4 GB big with LLVM et al17:45
kdub_unless you're ambitious and want the freedreno stuff? (uncharted waters)17:46
racarr__xnox: Yeah...last I checked17:46
racarr__I believe we end up pulling17:46
racarr__significant parts of X +17:46
racarr__both libegls, etc.17:46
racarr__I think there are some eird dependencies in mesa17:46
racarr__but ive never dug down17:46
kgunnracarr__: right, as i recall from duflu, dri2  never added support for i91518:07
racarr__kgunn: Ok. No bug needed from seb then :)18:40
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!