/srv/irclogs.ubuntu.com/2015/11/09/#ubuntu-mir.txt

=== Guest42341 is now known as O
=== O is now known as Guest78101
=== Guest78101 is now known as QUESTION
=== QUESTION is now known as Guest78101
=== marcusto_ is now known as marcustomlinson
=== alan_g is now known as alan_g|lunch
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
=== alan_g|lunch is now known as alan_g
=== chihchun is now known as chihchun_afk
=== balloons is now known as Guest42098
=== Guest42098 is now known as balloons_
=== balloons_ is now known as balloons
=== dandrader is now known as dandrader|bbl
bschaeferslvn_, this is how it looks :)17:30
bschaeferhttp://i.imgur.com/Vua6Iap.png17:30
* bschaefer looking into it17:30
bschaeferit doesnt happen like that on the desktop...17:31
bschaefer(and touch wasnt working)17:31
slvn_bschaefer, this is bad, but this is because I provided a bad application17:31
bschaeferslvn_, no, all apps17:31
bschaefereven my own17:31
bschaefer(using opengles2)17:31
bschaefernot sure if those are software or what17:31
slvn_then there is a bug :)17:31
bschaeferyup17:31
* bschaefer looking into it17:32
bschaefertic tac toe: http://i.imgur.com/tLA6jtn.png17:32
bschaeferthere must be a reason :)17:32
slvn_yep bad also ...17:32
slvn_at least portrait/landscape orientation seems to work :)17:32
slvn_(but there is the status bar ... would be great to be able to hide it, or to know its size/position)17:33
slvn_also the colors seems wrongs. it's black and white ok, but there is some noise.17:35
bschaeferslvn_, you've to set the surface to fullscreen17:36
bschaeferto move the top bar17:36
slvn_ok17:37
slvn_for the Tic Tac Toe, some debug message are enabled .. it might help17:38
slvn_maybe the resolution that I retrieve if wrong17:38
bschaeferslvn_, ill use my own for now since i've the source :)17:40
bschaeferyours will be the test after a fix17:40
slvn_ok !17:40
slvn_bschaefer,  Maybe that can help : when we tested the same apps on McPhail device, there was no issue of rendering ! (though I saw no screenshot)17:57
bschaeferslvn_, was it vivid+overlay?17:57
bschaeferor was it wily/xenial?17:57
slvn_I guess his device is vivid. and the app is vivid+overlay17:58
slvn_the app I sent you is vivid+overlay17:58
bschaeferwell then it shouldnt run :)17:58
bschaeferif his device is vivid only then mir is like 0.1317:58
slvn_no sorry, his device is problably vivid+overlay also17:59
bschaeferyeah17:59
bschaeferhmm17:59
slvn_we need you branch :)17:59
slvn_the app is then vivid+overlay+your_branch17:59
bschaeferhttps://code.launchpad.net/~brandontschaefer/+junk/SDL2-new-mir-ABI17:59
* bschaefer is getting his phone setup to debug and hopes he doesnt run out of space17:59
bschaefercross compiling takes to long18:00
bschaeferi also need to check unity8 desktop... to see if the same issue18:00
bschaeferif thats the case it might be qt/mir18:00
bschaeferbut ... not really sure atm18:00
bschaeferslvn_, the one thing sdl2 does strangly is talks to mir directly18:02
bschaefervs going through the mir platform18:03
bschaeferwhich *could* cause strange issues (possibly?)18:03
slvn_it talks to mir to configure the screen/surface, then it does opengles2 things18:04
slvn_maybe we could check that the renderer is actually opengles218:04
bschaeferwait... i didnt actaully check opengles2...18:04
bschaeferbut it should use opengles18:05
bschaeferslvn_, i have an app that is 100% opengles2 (otherewise it'll fail)18:05
* bschaefer should test that out18:05
bschaeferif its all software rendering then it could be my fault (some how getting 1/2 on my stride)18:06
bschaeferslvn_, http://i.imgur.com/ZEyDjRW.png18:15
slvn_it could YUV18:16
slvn_it could be YUV18:16
slvn_mis interpretation of pixel format18:16
bschaeferyeah, which would mean 1/2 stride18:16
bschaefermeaning clone surface18:17
bschaefer(ie. RGB16 vs RGB32)18:17
slvn_Could be the algorithm in SDL2 that set the GLES2 config that does somethings wrong ...   see SDL_EGL_ChooseConfig() ..  the first config should be the better18:23
bschaeferslvn_, it is most likely me picking a pixel format that is to large while the surface is actually a 1618:25
bschaeferso if i think its rgb32, i create a surface that is twice the size18:25
bschaeferof the actual surface in sdl218:25
bschaefersoo im copying (two chunks of the same thing)18:26
bschaefertheres also this nice new function:18:26
bschaeferclient/mir_toolkit/mir_connection.h:194:MirPixelFormat mir_connection_get_egl_pixel_format18:26
slvn_I should patch SDL2/mir backend ?18:29
bschaeferslvn_, naw its my problem :)18:30
* bschaefer is looking into fixing it18:30
slvn_ok L)(18:31
slvn_:)18:31
mcphailHi slvn_ and bschaefer. I'm not getting that odd doubling on my phone, nor errors with the rendering of the balloons.18:55
bschaefermcphail, what version of sdl2 are you using?18:57
mcphailbschaefer: whichever one slvn_ bundled with his app. I don't have the source18:57
bschaeferhmm18:58
bschaefermcphail, what are you running on your phone? vivid+overlay?18:58
bschaeferor wily/xenial?18:58
bschaefermcphail, also what phone do you have?18:58
mcphailbschaefer: I'm running stock, so I presume it is vivid+overlay18:58
bschaeferas right now it looks like an incorrect pixel format18:58
* bschaefer has a nexus 418:58
mcphailperhaps it is the same rendering bug reported by popey a while back?18:59
mcphailhttps://bugs.launchpad.net/ubuntu/+source/libsdl2/+bug/146014919:00
ubot5Ubuntu bug 1460149 in libsdl2 (Ubuntu) "Visible corruption in SDL apps (Neverball, Neverputt) on Nexus 4 / Nexus 7." [High,Triaged]19:00
bschaefermcphail, i think that was different19:02
bschaeferthat actually looks like corruption19:02
bschaeferwhat i have is just pixel format issues19:02
mcphailbschaefer: see comment 1819:02
bschaeferi even made a comment on that19:03
bschaeferumm19:03
* bschaefer re-reads19:03
bschaefermcphail, but yeah mir supports 16 PF now...19:05
bschaefer16 bit pixel formats19:05
mcphailaah ok19:05
bschaefer(in 0.17), unless ... that landed?19:05
bschaeferlater19:05
bschaefernaw it should have landed in 0.1619:05
mcphailI think it is 0.16 on the phones?19:05
mcphailI'm certainly not getting rendering issues on mine (except the tictactoe grid doesn;t have any horizontal bars - probable resolution issue)19:06
bschaefermcphail, 0.17 is on the phone19:07
bschaeferfrom the overlay19:07
bschaefermcphail, what device do you have?19:07
mcphailkrillin (bq 4.5)19:07
bschaeferi could try it out on that... but im thinking that might not support the pixel format that is getting hit on the N419:08
mcphailmight explain why the N4 seems to hit more rendering bugs than the bq19:08
mcphailthe issue I get with the games is the touch input doesn't work properly19:09
bschaeferyeah that... i have to to look into its only19:09
bschaeferup/down motion still works19:09
bschaeferat lease was working for me19:09
mcphailfirst touch works, but subsequent ones are ignored. Did slvn_ copy you in to the log from my phone?19:10
bschaeferyeah19:10
bschaefererr19:10
bschaefernot the log19:10
bschaeferbut19:10
bschaeferi've seen that issue before on the N719:11
slvn_I can explain this issue19:11
bschaeferwhere you get a down, but never an up19:11
slvn_what happens is there are lot for FINGER_DOWN but no FINGER_UP19:11
bschaeferyeah19:11
slvn_not enough FINGER_UP19:11
slvn_and, I think there are multiple reasons for the missing finger_up19:11
slvn_one of the reasons, if the "event" action_cancel, that should emit some finger_up19:12
slvn_which is not in the backend I think19:12
slvn_other reasons are more obscure ... the way of decoding the datas ...19:13
bschaeferslvn_, that might explains some issue i dont remember that action19:13
=== dandrader|bbl is now known as dandrader
slvn_bschaefer, mcphail  here's my old SDL_mirevents.c  with modifications to fix/workaround the input issue :  http://paste.ubuntu.com/13210696/19:51
slvn_see mir_motion_action_cancel and also mir_motion_action_pointer_up19:53
bschaeferslvn_, that doesnt exist anymore :(19:53
bschaeferaction wise19:53
slvn_and as a "diff" : http://paste.ubuntu.com/13210720/19:54
slvn_action_cancel does not exist anymore ?19:55
bschaefernope19:55
slvn_ action_pointer_up19:55
bschaeferslvn_, mir event 2.0 changed a lot19:55
bschaefertheres: mir_touch_action_up = 0,     mir_touch_action_down = 1,  mir_touch_action_change = 219:55
bschaeferfor touch events19:55
slvn_... what is important is the "for()" loop in action_pointer_up to do a up on all events.19:55
bschaeferyeah19:56
slvn_maybe there is no more action_cancel bug then !19:56
bschaeferyou need to go through and eat all the touch events19:56
* bschaefer looks at his touch code19:56
bschaeferslvn_, http://paste.ubuntu.com/13210751/19:57
bschaeferthats the current touch code...19:57
bschaeferand i loop through it all19:57
bschaeferbut i still see touch issues up/down19:57
slvn_is there still the android layer under mir to handle touch/input ?19:57
bschaefercurrently yes19:58
slvn_so this action_cancel probably still exists19:58
bschaefernot in the mir public api19:58
bschaefer(android most likly)19:59
slvn_so maybe it should be translated as several finger_up19:59
bschaeferslvn_, if its only an issue in SDL2 then i must just be doing something wrong :)19:59
bschaeferie. it seems to work fine in all other QT/QML apps19:59
slvn_are they using multiple fingers?19:59
bschaeferslvn_, we have having issues with just 1 figure20:00
bschaeferand i assume yes20:00
slvn_it's easy to see if the bug is in (SDL+SDL_mir_backend) or in (mir+...)20:02
slvn_just log the up / down20:02
slvn_+ ids20:02
slvn_for each finger down, there must be a finger up20:03
slvn_I mean, that what SDL rely on .. but SDL could also be more robust by implement some timeout etc.20:03
bschaeferslvn_, one issue i saw is: AddTouchDevice(device_id);20:07
bschaeferwas in the for loop20:08
bschaeferfor each touch event20:08
bschaefer(that could cause some sort of issue with sdl2 under the hood but idk20:08
slvn_bschaefer, AddTouchDevice is still in the for loop !20:12
bschaeferyeah i just moved it20:12
bschaeferbut idk20:12
bschaeferwhat it does atm, need to look at that20:12
slvn_like before20:12
slvn_no, before and now, it has always been there20:12
bschaeferim not sure what sdl2 does (if its a mapping of the id then it shouldnt matter)20:12
bschaeferyeah20:12
bschaeferim not sure if thats causing a sync issue20:12
* bschaefer just needs to check the mir logs20:13
bschaeferfor up/down touch events20:13
slvn_AddTouch is for SDL only20:13
bschaefer... why does it even compile20:14
bschaeferi dont see that function anywhere haha....20:14
slvn_wrapper to SDL_AddTouch20:14
bschaeferbut its not defined anywhere... unless grep is failing me20:15
slvn_in  SDL/src/events/SDL_touch.c20:15
bschaeferi see SDL_AddTouch20:16
bschaeferi just dont see AddTouchDevice20:16
slvn_and SDL_mirevents.c20:16
slvn_AddTouchDevice20:16
bschaeferslvn_, im just saying AddTouchDevice is not defined anywhere20:16
bschaeferand i dont see a20:16
bschaefer#define AddTouchDevice SDL_AddTouch20:17
slvn_no no, in SDL_mirevents.c, static void AddTouchDevice20:17
slvn_just doing a SDL_AddTouch20:17
bschaeferslvn_, ug20:17
bschaeferim not use to20:18
bschaeferstatic NEW LINE20:18
bschaeferAddTouchDev :)20:18
bschaeferslvn_, confirmed the cloning issue20:18
bschaeferassume the PF is 32, and setting it to such, even though we are a 16 pF20:19
bschaeferPF*20:19
slvn_ok, not sure of the implication though ...20:20
bschaeferit what causes the cloning20:21
bschaeferof the surfaces20:21
bschaeferie. the two copies20:21
bschaefersooo now its just trying to figure out how to pick the correct PF (which can prove to be hard)20:21
mcphailbschaefer: ha! - so it _is_ the same as the bug above ;)20:21
bschaefermcphail, yeah :) (it looks that way)20:21
bschaefermcphail, the issue atm is, i just loop through the available pixel formats20:22
bschaeferand return when one is supported (to use as the PF for the mir surface)20:22
bschaeferbut the PF that is actually given to EGL is 56520:22
bschaeferand we create a mir surface of 88820:22
mcphailis there a robust way to fix that?20:23
bschaefermcphail, yes but it crashes atm :)20:24
bschaeferand is fixed in 0.17.120:24
bschaeferbut overlay+vivid is 0.17.020:24
mcphailbschaefer: so close..!20:35
bschaeferquite :) (well hopefully it fixes it)20:37
slvn_bschaefer, mcphail  I am leaving the chan. I would be glad to have some news by email. I'll be there tomorrow++21:29
bschaeferc ya21:30
mcphailslvn_: cheerio21:30
slvn_bye!21:30
bschaeferhmm so far testing output on touch... when i hit a down, i get an up...21:31
bschaeferbut i dont have a good app to test atm :(21:31
=== chihchun_afk is now known as chihchun
bschaefermcphail, haha... guess why touch didnt work :)22:56
bschaeferHandleTouchPress(device_id, id, SDL_FALSE, n_x, n_y, pressure);22:56
bschaeferwas being sent for DOWN22:56
bschaeferand for UP22:56
bschaeferHandleTouchPress(device_id, id, SDL_TRUE, n_x, n_y, pressure);22:56
bschaeferwellllll22:56
bschaeferSDL_TRUE is the slot for DOWN being true22:56
bschaefersoo i just flipped those around when i re factored the code...22:57
bschaeferso when we get a DOWN action we were saying DOWN is false and when we got an UP action we were saying a DOWN has happened22:57
mcphailbschaefer: nice catch! This is the advantage of having people writing games for the device in SDL - highlights these problems.23:14
* mcphail might retry his Baldur's gate port23:15
bschaefero.m.g someone ported that game?23:18
bschaeferto sdl2?23:18
mcphailbschaefer: I have a port which gets as far as the menu23:18
mcphailbschaefer: using gemrb23:18
bschaefermcphail, nice! I've not heard of those, but i loved baldurs gate haha23:19
mcphailbschaefer: unfortunately, my porting has been delayed by the fact I'm wasting so much time playing Planescape Torment on the PC... :)23:20
bschaeferhaha23:20
bschaeferthe down side of porting games, testing to long :)23:20
mcphailbschaefer: also hampered by the ever-growing list of games on Steam. My life is ruined23:23
bschaeferhaha23:24
bschaefervery true23:24
mcphailbschaefer: incredibly cool to see the BG intro on the phone, though23:25
bschaefermcphail, yup had the exact feeling when i saw the dota2 intro23:26
bschaefer(on the desktop)23:26
bschaeferthough i had a multi thread gl context bug after that, that ended with me digging through the video driver...23:27
bschaeferbut still fun... i've to get that working again so much has changed23:27
* bschaefer heads to a bar to do some work23:27
mcphailbschaefer: the life of a linux gamer will never be easy, i suspect23:27
bschaefer:)23:27

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