#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2015-08-28

Timestamps are in GMT/BST.

04:40:02koda has joined
05:15:34sheepluva Quit (Ping timeout: 260 seconds)
05:17:21sheepluva has joined
05:26:50Nothing_Much has joined
08:33:58Nothing_Much Quit (Remote host closed the connection)
12:42:26watusimoto has joined
12:42:26ChanServ sets mode +o
13:06:44Nothing_Much has joined
13:31:15koda Quit (Quit: koda)
14:46:44Nothing_Much Quit (Quit: Leaving)
14:58:52koda has joined
15:04:09koda Quit (Ping timeout: 244 seconds)
15:04:34koda has joined
15:10:57kodabb has joined
15:11:28koda Quit (Ping timeout: 252 seconds)
15:11:29kodabb is now known as koda
15:16:05koda Quit (Ping timeout: 250 seconds)
15:17:03koda has joined
15:24:08koda Quit (Ping timeout: 246 seconds)
16:46:24raptor has joined
16:46:25ChanServ sets mode +o
16:47:23raptorgood day!
16:55:59watusimotohey there
16:56:17raptorhi
16:56:49watusimotoI hadn't considered sound as the cause
16:56:54watusimotoI was thinking logo rendering
16:57:01watusimotobut that didn't really make sense
16:57:22raptoryeah, the callgrind graph is really odd...
16:59:48raptorsee here: https://i.imgur.com/A0PgocI.png
17:00:24raptorres1_inverse() is also part of libvorbis
17:23:30watusimotoThe mysterious 1ca25 call...
17:23:47watusimotobut really, it looks like lots of stuff
17:24:05raptori suspect that is opengl
17:24:47watusimotothat would make sense.
17:24:52watusimotologo rendering is expensive
17:24:59watusimotoas is all the roman text
17:25:50raptoryeah - i read up on something called VBOs or vertex buffer objects that could be used to make them cheap
17:26:05watusimotowhat are those?
17:26:14watusimotorender to a buffer, then memcpy that?
17:26:18raptoryou basically use opengl to upload the vertex data to the graphics card, which caches it
17:26:25watusimotoI see
17:26:41raptordoesn't help with software opengl, of course, but i suspect few people use that nowadays
17:27:03raptorit basically offloads from CPU to the GPU
17:27:06watusimotoon the other hand, is it really a problem that we need to solve... unless we could do it systemically
17:28:03watusimotoI should take a look and make sure we're not rebuilding the vertex array every tick
17:28:07raptori'm not so sure it is
17:28:19raptorwe're not, at least not for the logo
17:28:25watusimotoI wrote that early on, before I really knew what I was doing... ok
17:28:31watusimotoobviously I knew what I was doing
17:28:38watusimotoin that case
17:28:41raptori refactored it relatively recently with the GLES conversion (within a year or so)
17:28:49raptorit was all static const data
17:28:54watusimotoobviously you knew what you were doing then
17:29:02raptorthen opengl was just used to tranlate/scale it
17:29:09watusimotoor at least someone stumbled onto the right decision at some point!
17:29:47raptorok, he gave a new callgrind report... let me look
17:29:49watusimotowe probably render it with our "render this list of vertices" method, which is as fast as you can get
17:32:01raptori really hate this graph, but: https://i.imgur.com/UF0Lx0p.png
17:32:16raptorlooks like most of what is left is GLES related
17:33:13raptori bet it's because GLES 1 is an abstraction layer to GLES 2 on the platform
17:33:19raptorif that is the case, there isn't much we can do
17:36:48watusimotoyes, a lot of gles in that horruible graph
17:37:43watusimotothe shame of it all is that most of what is happening is just redrawing the same thing over and over
17:38:30raptorthat why i think VBO is a possible solution
17:38:45watusimotohow important is gles1 for us?
17:38:57watusimotoas in is it something we even need to worry about?
17:39:01raptorwell, it's what we use
17:39:12raptorso we use OpenGL 1.x
17:39:25raptorI reduced it to a subset of that: GLES 1.x
17:39:34watusimotoI feel so stupid when you explain this :-)
17:39:43raptorall it does is make us more compatible with devices like this guys odroid (and RPi)
17:40:06raptorin the process of conversion we did can some performance
17:40:19raptorI started that abstraction layer for all GL calls a few months ago
17:40:38raptorso we could also rewrite all the methods as GLES 2 and open up even more devices
17:40:47watusimotoright yes, ok
17:40:52raptorGLES 1.x also let's us run on all android devices
17:40:59raptorand most iOS...
17:41:14watusimotoso we really need both gles1 and 2, hence the abstraction layer
17:41:49raptorbut GLES 2 is already the past and present and certain things implement it directly in hardware
17:42:06raptorand then abstract it for GLES 1 compatibility... like the odroid
17:42:44raptorwait - maybe GLES 1.x is being dropped on devices now
17:42:49raptoronly GLES 2+
17:52:45watusimotodo you think we need to finish the abstration layer before trying the llvm javascript compilation?
17:53:27raptoroh yeah... i had forgotten
17:53:36raptoremscripten is GLES2-only now
17:54:22raptorthis is because WebGL, the browser-based version of OpenGL is based on GLES 2
17:55:09watusimotoOk; I thought I had read somewhere that gles1 was now supported, mostly
17:55:17raptorwhere?
17:55:23raptori mean, with what? emscripten?
17:55:45watusimotooh, I don't know... it was months ago. yes, llvm/emscripten
17:56:59watusimotohttp://kripken.github.io/emscripten-site/docs/porting/multimedia_and_graphics/OpenGL-support.html
17:57:22watusimotohttp://kripken.github.io/emscripten-site/docs/porting/multimedia_and_graphics/OpenGL-support.html#opengl-support-legacy-and-mobile
17:57:38raptoroh ho!
17:57:46watusimotoI think that's what I saw
17:57:51watusimotoso partial support
17:57:53raptorwell... maybe we can go further than I thought right now!
17:58:06watusimotoThis mode adds significant emulation overhead.
17:58:19watusimotobut, just seeing if it works at all would be awesome
17:59:08watusimotoat some point in the near future, I want you to help me understand what actually needs to be done to get the gles2 support fully working, and I can start chipping away at it
18:00:04raptorwell, the abstraction layer is already done in our code
18:01:11raptornow the equivalent GLES 2 calls need to be coded. This will include shaders and our own makeshift stack for some stack operations... unless we want to rewrite every drawing method everywhere have both GLES 1 and 2
18:03:27watusimotoso by stack operasions you mean the gltranslate - glscale - gltranslate type sequences that need to be condensed into a single transform
18:04:04raptoryes, most especially: glPushMatrix() and glPopMatrix();
18:04:12watusimotofor the shaders, I'd probably need to see one or two built out so I could better understand what needed to happen
18:04:27watusimotook, so one task is to get rid of glPush and glPop
18:04:43raptoror emulate them ourselves in GLES2
18:04:45watusimotothat I can do
18:05:08watusimotowell, we'd just keep track of the operations and do the computations ourselves
18:05:10raptori had decided on emulation because i think it would have been simpler and much less work than rewriting *everything*
18:05:13watusimotoit's not hard
18:05:47watusimotoI think all the glpush/glpop have already been transformed into bfpush/pop, so the work is pretty focused
18:05:55watusimotoif I recall correctly
18:06:14raptorall GL calls are already abstracted into the RenderManager class
18:06:23watusimotoyes, ok
18:06:27raptorso you only have to write the GLES2 methods in that class
18:06:54raptorthis suggests writing our own stack is preferable, too: https://stackoverflow.com/questions/2918232/opengl-es-2-0-and-glpushmatrix-glpopmatrix
18:07:10watusimotohandling those operations is easy enough
18:07:26watusimotoI worked it out once, and concluded it was an evening's worth of work
18:07:32raptorah ok
18:07:40raptori haven't really done any research on that front, yet
18:07:54raptori do know that glColor must be done by a fragment shader
18:08:28watusimotoit's the shader stuff that has me somewhat bewildered
18:08:41watusimotoI know we want/need to do it, but I really have no idea how
18:13:39raptorI have a diff of kaen's shader work somewhere
18:14:04raptorhe got it to work, but i think his code was a lot more complex than it needed to be
18:14:09watusimotoI created a new issues tag for gles2 specific issues
18:16:35raptorok... by 'eliminate', do you mean to implement it our abstraction layer, or remove all the calls everywhere?
18:19:31Darriel has joined
18:19:34Darrel Quit (Disconnected by services)
18:19:38Darriel is now known as Darrel
18:27:36watusimotoI mean redirect the calls to our on stack implemenation
18:28:09watusimotoand then create that implementation, of course
18:28:22watusimotoI know you have done some of this work already
18:28:31watusimotoI need to look and see how much
18:28:53watusimotobut that is a failry clear, discrete task that I watned to get into the system so I can work on it
19:13:54raptorthe work I've done: *every* GL call in the bitfighter code is abstracted into the RenderManager class, ready to be implmeented in GLES 2
19:23:17watusimotook, so the push/pop stuff should just be a matter of implementing a new stack so the calls to glpush/pop can be removed. I presume there are only a few left in the RM class
19:32:48raptorI made the RM have three classes: a parent GL class that has pure virtual functions; and two child classe, GLES1/GLES2 that implement them. The GLES1 class is what we use. To enable the GLES2 class, you have to compile with a flag: BF_USE_GLES2
19:54:47raptorbut i'm sure that compiling with that flag will basically break everything else in the game
19:55:31raptorof course, maybe we should just just have one class with the defines in each method... that may make it easier to debug
20:01:25raptoractually, watusimoto, maybe that is better - should I convert the RenderManager class to use the preprocessor defines within each method instead? That way it'll be easier to debug with a fully functional game
21:11:12watusimotoraptor: Yes, I think might be clearer, even though #ifdefs are generally frowned on. Then you can see the two codesets side-by-side
21:15:54raptorok, will do now!
21:18:07raptorI think ifdefs should not be frowned upon
21:33:53raptorok done! your next pull will have the changes
21:36:58watusimotoI love ifdefs!
21:37:04watusimotoout of here, see you later!
21:37:24watusimoto Quit (Read error: Connection reset by peer)
21:45:11raptor Quit ()

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.