NOV
27
2005

Some reflections

I haven't blogged for a while again. To some extend because the things I'm doing at the moment have little to do with KDE. First of all, yes, it's true that I don't work for Trolltech and that I'm back in States. For now I took a leave of absence to work on some other things. Right now those other things are physics; superstring theory to be exact. I'd like to finish my research, write a paper and then we'll see what I'll be doing.

Before turning to physics I've been playing around with full curve decomposition on GPU. There's a number of things that irritate me about the current way our 2D api's are done. One of them is the client side path decomposition. It's really visible since our rendering API's are vector based and therefore paths are a first class citizen. This is of course partially because our algorithms for tessellating complex polygons while considering winding rules are quite frankly embarrassing. Tessellation is a fairly uninteresting problem in itself, that's also one of the main reasons there isn't too many people willing to spend heaps of time researching it. So, while working on a new tessellation algorithm I've been playing around with curve rendering on GPU. The current research is focused on partial specialization - triangulation on the client and pixel position determination (inside or outside of the loop) on GPU. Both vector texture maps and The Loop&Blinn algorithm do that.

Given my position on tessellation on the client, as you can imagine, I'd like to completely skip it and offload it to the GPU. The ideal solution being passing the full path encoded in a texture, then extracting the elements and rasterizing the data using fragment shaders. The problem (or more precisely "one of the problems that bother me") is that we're skipping vertex shaders (due to the fact that we don't have the geometry of the object at that stage) which implies that we need full transformation matrix encoded right along the path plus we need to do the transformation using fragment shaders.

All of that just amplifies my issues with graphics hardware. I wish we could have a decent dialogue with the vendors so I'd at least have an overview of what they are doing. Given my current situation, fragment shaders are so useful when working on physics simulations and reverse engineering full pipeline... Lets just say I'll admire anyone with time to even tackle that. I've been looking for a 15" or smaller (call me sentimental but I really like the "portable" aspect of my laptops) laptop with NVIDIA 7xxx card for the last two weeks. I couldn't find anything besides ASUS A6Vm and A6Km which are impossible to buy anywhere. I'm tired of having to ssh to my desktop to run my simulations so I'd like to have a laptop with decent fragment shaders support and as Dave noted ATI isn't doing too well in that department on GNU/Linux. If you've seen such a laptop let me know as I badly need one, even though I'm crying inside when thinking about spending the little money I've got. Plus I wouldn't mind being able to do something amazing for Plasma on my laptop after I'm done. Your motivation for helping me is the knowledge that most likely the sooner I'll finish this stuff the sooner I'll be back to doing graphics and other weird Open Source things.

Oh, and also I really like Michael's work on -Bdirect and the lack of response his patch generated is a 'little' depressing. I'd love to see this thing go in.

Comments

Oh, and also I really like Michael's work on -Bdirect and the lack of response his patch generated is a 'little' depressing.

Hmm, yes I saw that. I don't think that dismissing it in favour of prelinking (which doesn't work on what he's talking about - dlopened libraries) is particularly helpful to anybody, especially considering that it will help just about every desktop project anyone can think of. At least he's provided an explanation and some raw figures to pursue. It would be pretty interesting to try KDE on top of that patch. It obviously makes a fair bit of difference to Open Office, and Open Office is huge to start off with.

Politics? Embarrassment? Who knows?


By segedunum at Sun, 11/27/2005 - 17:55

Funny how you manage to dismiss prelink in the same sentence where you say dismissing -Bdirect is not nice. Prelink currently doesn't work with dlopen because that'd break certain rules about how ELF libraries are supposed to work. And -Bdirect basically builds on intentionally breaking some of these rules. Not that these rules are that important, but if you intentionally decide to ignore them then prelink can work too.

As for the numbers, I haven't tried -Bdirect yet, but I tried prelinked dlopen (well, "prelinked", it's such a hack). According to sysprof 26% of KDE startup was spent in dynamic loader with normal KDE, 8% with prelinked and with relocation processing turned off ("prelinked" dlopen) it was 2% (global ctors, libraries loading or whatever it was doing). Since KDE startup doesn't seem to be that much dominated by dlopen, let's try something else, when launching Konqueror, it's 15% when launching via kdeinit vs 9% when prelinked (it's still not that much, but Konqueror usually doesn't dlopen about 100 libraries like OOo does). Drawing conclusions on how much -Bdirect will actually help KDE is left as an exercise to the reader (note: -Bdirect from principle can never achieve the same performance gains like prelink.)

But yes, whichever way you look at it, the lack of response from binutils people certainly sucks.


By Lubos Lunak at Sun, 11/27/2005 - 21:31

Funny how you manage to dismiss prelink in the same sentence where you say dismissing -Bdirect is not nice.

Yes, it is funny :-).

Prelink currently doesn't work with dlopen because that'd break certain rules about how ELF libraries are supposed to work. And -Bdirect basically builds on intentionally breaking some of these rules. Not that these rules are that important, but if you intentionally decide to ignore them then prelink can work too.

Yes. Either way you're breaking something, but it would be nice for this to be investigated - either through -Bdirect or a 'patched' prelinked dlopen. I would think that getting something committed through the prelink method will be nil though, as it seems to be with Michael's. Obviously from what Michael came up with there's something to be had in that area, whatever method you choose. I suppose it depends on how well the software is designed though as to what gain you'd get. I suppose that might be why it got the response it got......

Drawing conclusions on how much -Bdirect will actually help KDE is left as an exercise to the reader

Versus the method of prelinking (probably even without doing anything about dlopened libs) not a hell of a lot looking at it. However, I'm of the opinion that every little gain put together helps...... Sysprof is a fun tool though. Rule of thumb - design your software better and don't needlessly have several hundred separate libs ;-). Maybe that's the answer for Open Office.

But yes, whichever way you look at it, the lack of response from binutils people certainly sucks.

I'm a little bit surprised. OK, I can understand why they've pretty much rejected it but there's probably at least some gains to be had in that area for everyone, even if not a massive amount for KDE.


By segedunum at Sun, 11/27/2005 - 23:03

Hmm, is ASUS A6vc with GeForce GO 6200 (coming w/o MS Tax) OK for you or do you need a special feature that only nv 7xxx offers?

http://www.asus.com/products4.aspx?l1=5&l2=25&l3=134&model=534&modelmenu=1


By Jarosław Staniek at Sun, 11/27/2005 - 19:16

Well, I won't bore you with my thoughts on the subject of something that cannot yet be proved and will most likely turn out to be wrong as our practical knowledge grows........ You can have some pretty interesting discussions though.

Your motivation for helping me is the knowledge that most likely the sooner I'll finish this stuff the sooner I'll be back to doing graphics and other weird Open Source things.

Please do.

As for a laptop, I suppose it depends on how much you've got to spend. It will have to be an nVidia notebook (GeForce Go 7800 GTX probably) and they aren't all that cheap, nor are they that common to buy. Bad news - these kind of notebooks tend to have 17" screens now because people use them for playing games on planes. Apple have a lot to answer for.....:

http://www.evesham.com/PCs/Info.asp?e=A2CCB763-C3B8-4940-8ACD-C781E611ED18
http://www.evesham.com/PCs/Info.asp?e=A75DDFF3-ED3B-4D70-A931-3A2213C7C949

I have absolutely no idea about international delivery, but that's all I've seen on my travels.


By segedunum at Sun, 11/27/2005 - 23:45

If you're looking for a powerful laptop, the F bomb from eurocom seems like a good choice. Its less expensive than the voodoo or the alienware laptops and offers different combos of cpu/gpu instead of the usual bundle(intel-nvidia, amd-ati)

Fbomb product page


By heretic09 at Mon, 11/28/2005 - 16:49