Hello. A month ago I started to use --enable-gallium-llvm while compiling mesa git version and got a great performance increase - glxgears showed 800 fps vs 250 without LLVM.
But in newer git versions (starting from the end of November or so) this option stopped to help me - I've got 250 fps both with --enable-gallium-llvm and without today.
So is LLVM support (as I understood) for TLS implementation working in r300g? Or the problem only on my side...
Kernel: 2.6.36 x86-64 (Archlinux 64)
Videocard: ATI Radeon X1270 (RS690)
I don't have a problem with r300g/LLVM.
Could you possibly bisect the issue on your machine?
(In reply to comment #1)
> I don't have a problem with r300g/LLVM.
> Could you possibly bisect the issue on your machine?
Unfortunately can't imagine how to do this at the moment.
The strange thing, is that i compile and use the old git version (from 15.11.2010) version in absolutely the same environment as the newest one git version with the same options. But, as already mentioned, i'm getting on old 800 fps, and only 250 on new one :(
Forget to mention before - i'm using llvm 2.8 .
I've managed to fix the problem (at least I have good fps again).
The problem appeared after this commit: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efc82aef35a2aac5d2ed9774f6d28f2626796416 .
gallivm object wasn't created in draw_create() function, so llvm object couldn't be created. So I created gallivm in draw_create() and llvm seems to be working.
Created attachment 41413 [details] [review]
fixes llvm support for TLS not working in r300g
Not sure if this is consistent with the rest of the code.
I wonder if there's a way to fix it without touching the code of Draw.
Created attachment 41428 [details] [review]
There is another variant then - to do all the changes in gallium/drivers/r300/r300_context.c : in function r300_create_context create gallivm and call draw_create_gallivm directly instead of draw_create .
Fixed with commit 88550083b3857184445075e70fed8b2eed4952a1. Closing.
I think the first patch is actually the better one. It lets all drivers that utilize the draw module to get LLVM acceleration when LLVM is present and avoids having LLVM code in each of the drivers.
If there's no objections, I'll revert commit 88550083b3857184445075e70fed8b2eed4952a1 and apply the first attached patch.
Yeah, go ahead...
(In reply to comment #8)
> If there's no objections, I'll revert commit
> 88550083b3857184445075e70fed8b2eed4952a1 and apply the first attached patch.
So long as you make sure the resources allocated by gallivm_create and lp_build_init are freed when appropriate. :)
Jakob pushed a driver-independent solution in commit 4c73030d47f39441d718157f7d9a59c136bbfac0 ('draw: Init llvm if not provided').