/srv/irclogs.ubuntu.com/2014/02/21/#ubuntu-mir.txt

mterryduflu_, heyo!03:14
duflu_mterry! sup?03:14
=== duflu_ is now known as duflu
mterryduflu_, so maybe I don't understand C++ well enough, but the code in ./include/server/mir/compositor/scene.h doesn't seem to give access to CompositingCriteria...03:15
duflumterry: It's a bit ugly, but all designed to work with a filter/applicator interface. I think all those are defined in scene.h?03:16
* duflu checks03:16
mterryduflu, it looks like they *take* a criteria, not give one03:17
duflumterry: All you need is a Scene object. Then... scene->for_each_if(filter, operator) to do your rendering. The instances will be provided by the underlying scene implementation in Mir03:18
dufluThat's a bit of an ugly way to iterate though. I'd like to replace it with something else03:19
dufluYou will need to create implementations of FilterForScene and OperatorForScene :P03:19
mterryduflu, oh I see.  I write a filter, and the for_each_if will call operator() giving a criteria03:19
duflumterry: Yep. The instances implementing those interfaces are hidden, but you will get called with them03:20
mterryduflu, then I also need to get a Rectangle for the surface to pass the criteria...03:20
mterrythis is really roundabout03:20
duflumterry: Your display_buffer->view_area() is good for that03:21
mterryah ok03:21
duflumterry: I know. I found it this way :)03:21
duflu"It was like that when I found it"03:21
mterryduflu, :)03:21
duflumterry: So a minimal filter would call should_be_rendered_in03:22
mterryduflu, so my Filters get called...  But how do I match a filter call to a given surface?03:22
duflumterry: You can't right now. We all want that fixed up and I think kdub is most likely to do it soonest03:23
* mterry is trying to imagine how I use these pieces together03:23
duflumterry: Our immediate desire is to replace both the CompositingCriteria and BufferStream parameters with some *Surface interface which implements both. We just need to restructure the Surface class hierarchy03:25
mterryWhoops, disconnected.  duflu, don't know where we stopped03:30
mterry<mterry> duflu, yeah, so I can iterate and ask the criteria, but without being able to differentiate between what the various iterate calls *mean* (i.e. what surfaces they match), I don't know how that API is useful to a 3rd party03:30
duflumterry: You missed nothing03:30
mterry hmm03:30
mterry maybe I'm missing a piece of the puzzle03:31
mterry I guess the Operator sees a BufferStream..03:31
mterry But that's not super informative03:31
mterryduflu, cool03:31
mterryduflu, so kdub is working in this space?03:31
duflumterry: Even the built-in renderer treats it as a TODO. I had to use "&criteria" as a dummy surface ID :(03:31
duflumterry: Better check with kdub. He's always likely to get pulled into more pressing Android work03:32
mterrykdub, if I don't get to you first, poke me tomorrow!03:33
mterryduflu, thanks so much!03:33
* mterry is very slowly grokking Mir03:33
duflumterry: No problem. Sorry you're stuck on something that we already planned to redesign :/03:33
RAOFOk. That should really, truly, absolutely be the last umockdev merge request in a while!06:54
=== mpt_ is now known as mpt
mlankhorstRAOF: erm can you now at a mainloop api like in pulseaudio? :P09:45
dufluSo many things I'd like to move around. But the weekend is in the way.09:52
dufluTill next time09:52
=== lool- is now known as lool
alan_galf_: were you looking at an intermittent failure in MesaDisplayTest recently? https://jenkins.qa.ubuntu.com/job/mir-clang-trusty-amd64-build/1007/console12:20
alf_alan_g: yes, but it was a clean failure, no exceptions, and fixed (by all appearances) by r140112:27
alan_galf_: thanks, will try to reproduce this one then12:28
* alan_g reproduces intermittent failures in MesaDisplayTest.drm_device_change_event_triggers_handler12:37
alf_alan_g: exceptions, or other test failure?12:42
alan_gSegmentation fault (core dumped)12:42
alan_gI'll look deeper after lunch12:43
=== alan_g is now known as alan_g|lunch
=== alan_g|lunch is now known as alan_g
alan_galf_: still happy with the updates to https://code.launchpad.net/~alan-griffiths/mir/make-ConfigurationOptions-a-dependency-of-DefaultServerConfiguration/+merge/206996?13:51
alf_alan_g: looking13:51
=== Trevinho_ is now known as Trevinho
alf_rsalveti: Hi! I am trying to run the x86 emulator to get more information about https://bugs.launchpad.net/mir/+bug/1282248 , but all I am getting is a blank screen in the emulator15:11
ubot5Launchpad bug 1282248 in Mir "Unity8 crashes when using latest mir/android backend with system-compositor" [High,In progress]15:11
alf_rsalveti: Any ideas?15:11
rsalvetialf_: hm, getting a black screen with my guide?15:15
rsalveti*blank15:15
rsalvetialf_: are you using it with a proprietary gl driver at your host?15:15
alf_rsalveti: yes, your guide, free drivers, radeon and intel (tried with both)15:21
rsalvetialf_: weird, trying it again locally15:21
alf_rsalveti: I do get related errors: http://paste.ubuntu.com/6971401/15:23
rsalvetioh, alright15:24
alf_rsalveti: hmm, I think I need to install the i386 mesa drivers (running on amd64)?15:26
rsalvetialf_: yes15:26
alf_rsalveti: isn't there an amd64 version of this?15:27
rsalvetialf_: not yet15:27
rsalvetithere will be sson15:28
rsalveti*soon15:28
alf_rsalveti: ok15:28
alf_rsalveti: works now great!15:34
rsalvetialf_: great!15:34
alf_rsalveti: does the image have persistent storage?15:35
rsalvetialf_: any idea of what might be wrong with that bug?15:35
rsalvetialf_: yes15:35
alf_rsalveti: I have found the exact commit that introduces it (on a real device at least), but the armhf backtraces I can get are less than helpful...15:36
rsalvetialf_: yeah =\15:36
alf_rsalveti: the commit is the one that changes the client platform to be dynamically loaded instead of built-in, not sure why that would cause a failure, though. Running nested tests with mir_demo_* works...15:37
alf_rsalveti: anyway, hopefully the x86 backtraces will be more helpful15:38
rsalvetialf_: yeah, it's quite weird, at least the x86 image doesn't have any issue with android TLS15:39
=== dandrader is now known as dandrader|afk
alf_fginther: Thanks for preparing the jobs. I realized that this is something I could by myself in the future if I want to try something, if I branch the hooks, right?16:16
=== dandrader|afk is now known as dandrader
fgintheralf_, yes, I did have to configure the job first to allow the hooks, but once they are there you can substitute in your own branch / hooks for testing16:17
kdubmterry, ping17:15
mterrykdub, hello!17:15
mterrykdub, I had some questions for you.  Is that what this ping is?17:16
kdubyeah, saw some chatter about the surface stack iteration stuff17:16
mterrykdub, so my ultimate goal is to be able to tell when a session/surface actually has posted their first frame to render.  This has been harder than I'd thought17:18
mterrykdub, recently I tried to go down the CompositingCriteria route17:18
mterrykdub, but it isn't exposed in a particularly meaningful way17:18
mterrykdub, but I was told you were working in that space?17:18
kdubwell, I have to revise the surface stack to enable android bypass/overlays17:19
kdubthe interfaces now have been out-grown by the way they are being used, and need some reassessment17:19
mterrykdub, well.  I am highly interested in being able to tell when a (at least first) frame has been rendered17:20
mterrykdub, what is priority of your work?  Like, how likely is it to happen soonish?17:23
kdubmterry, that's a bit different area than refactoring the surfacestack/compositingcriteria system17:23
mterrykdub, well, I can probably get what I need from actual access to CompositingCriterias and being able to match them to a surface17:24
kdublet me see if there's a way to do that in the public interfaces17:24
kdubor if there's a quick way to add a fn17:24
mterrykdub, because they have the should_be_rendered_in() call17:24
mterrykdub, and I can iterate over the CompositingCriterias via the Scene object and its for_each_if calls17:24
mterrykdub, but I can't actually tell which Surface they each match with17:25
kdubthats kinda a heavyweight solution though, as we lock the surfacestack during the iteration over the surfaces17:26
mterrykdub, well I'm all for better ways.  It's literally the only way to get at Criterias right now though17:28
alan_gkdub: also, that locking is something we plan to rip out - along with the associated code17:28
kdubalan_g, sure17:30
kdubmterry, what is the larger problem? (eg, trying to coordinate some animation or something)17:30
alan_gI've still not understood why waiting for swap_buffers(Not(nullptr)) doesn't work17:31
alan_gduflu found a Mesa bug while looking into this. But mterry is on the android drivers17:32
mterryalan_g, there are internally several buffers posted before the client gets to run17:32
mterryalan_g, so maybe that's just a bug.  But it's not usable at the moment17:32
mterryalan_g, that's all in the bug17:33
alan_gmterry: yeah, I don't understand why17:33
mterryalan_g, meaning that you think it's a bug that Mir is swapping buffers so early?17:33
mterrykdub, https://bugs.launchpad.net/ubuntu/+source/mir/+bug/1280842 explains my ultimate goal in all this17:36
alan_gmterry: mir should only be getting a buffer once it has been drawn. I don't know exactly what your scenario is doing to send buffers from the client before they are ready.17:36
ubot5Launchpad bug 1280842 in mir (Ubuntu) "[enhancement] Need a method of hiding surfaces until they are ready to draw themselves" [Medium,Opinion]17:36
mterryalan_g, it's not even *my* scenario. It's just a client calling mir::run_mir17:37
mterryalan_g, something about constructing/running a DisplayServer causes 4 buffers to be swapped17:37
alan_gmterry: so this client is a nested server?17:37
mterryalan_g, yeah17:37
mterryalan_g, (this is all in the context of USC which just deals with nested servers)17:38
alan_gmterry: I strongly suspect a bug in the nested code then17:39
alan_gWith a second possibility that the android client code is the cause17:40
alan_g*internal* client17:41
mterryalan_g, would that be work-around-able?17:41
alf_alan_g: mterry: Hmm, when the compositor starts up it triggers itself, each trigger being 3 compositings. In a nested server, swapping the buffer when compositing means sending the buffer to usc.17:43
alan_gAnd the 4th could be something like the Mesa "advance_buffer" bug?17:46
alf_alan_g: yeah17:47
mterryI do only get 3 if I hide() the surface first, FYI17:47
alan_gmterry: that makes sense17:47
kdubiirc, android shouldnt do that 'advance_buffer'17:48
kdubrather, the same sort of bug as the Mesa "advance_buffer". it does request a buffer on eglCreateWindowSurface, but it should get the buffer associated with the surface creation17:49
kdub(nexus 10 does something different)17:50
alan_gkdub: ok, but I'll buy alf_ explanation - we need to something different when compositing in nested mode.17:51
alan_gIf no-one else grabs it I can have a go on Monday17:52
* mterry hugs alan_g17:52
* alan_g blushes17:52
mterryalan_g, so the idea would be that USC could call hide(), watch for buffer swaps, and when it gets a non-null one, show() again?17:53
mterryor maybe it wouldn't need to call hide if it weren't getting buffer swaps in the first place17:53
alan_gmterry: yes, nested clients ought to behave like regular ones17:54
mterryalan_g, sounds perfect17:54
* alan_g decides to cut & paste the above discussion into the bug17:55
=== alan_g is now known as alan_g|EOW
greybackwhy are surfaces visible if client hasn't drawn to them yet? To me makes more sense for mir to tell a shell that a Surface was created, only when that surface was drawn to by the client18:06
greybacknot when the surface buffer was allocated for that client18:07
greybackanyway, gotta run, good weekend all!18:07
=== dandrader is now known as dandrader|lunch
=== dandrader|lunch is now known as dandrader
=== 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!