Skip to contentSkip to conversation

New: [r300g] LLVM support for software TLS implementation doesn't work

Bug 32544 [email protected] 1 participant 12 messages Dec 21, 2010 – Jan 24, 2011

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=32544

Summary: [r300g] LLVM support for software TLS implementation
doesn't work
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: [email protected]
ReportedBy: [email protected]

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)

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #1 from Marek Olšák <[email protected]> 2010-12-22 10:22:58 PST --- I don't have a problem with r300g/LLVM.

Could you possibly bisect the issue on your machine?

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #2 from Drill <[email protected]> 2010-12-23 08:51:05 PST --- (In reply to comment #1)

Quoted 3 lines

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 .

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #3 from Drill <[email protected]> 2010-12-24 01:37:46 PST --- 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.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #4 from Drill <[email protected]> 2010-12-24 01:39:14 PST --- Created an attachment (id=41413)
View: https://bugs.freedesktop.org/attachment.cgi?id=41413
Review: https://bugs.freedesktop.org/review?bug=32544&attachment=41413

fixes llvm support for TLS not working in r300g

Not sure if this is consistent with the rest of the code.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #5 from Marek Olšák <[email protected]> 2010-12-24 07:28:15 PST --- I wonder if there's a way to fix it without touching the code of Draw.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #6 from Drill <[email protected]> 2010-12-24 08:55:30 PST --- Created an attachment (id=41428)
View: https://bugs.freedesktop.org/attachment.cgi?id=41428
Review: https://bugs.freedesktop.org/review?bug=32544&attachment=41428

another fix

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 .

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

Marek Olšák <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Marek Olšák <[email protected]> 2010-12-24 09:40:54 PST --- Fixed with commit 88550083b3857184445075e70fed8b2eed4952a1. Closing.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

Brian Paul <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #8 from Brian Paul <[email protected]> 2011-01-04 08:24:46 PST --- 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.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#9 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #9 from Marek Olšák <[email protected]> 2011-01-04 08:44:28 PST --- Yeah, go ahead...

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

--- Comment #10 from Michel Dänzer <[email protected]> 2011-01-04 08:47:51 PST --- (In reply to comment #8)

Quoted 2 lines

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. :)

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

[Bug 32544] [r300g] LLVM support for software TLS implementation doesn't work

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=32544

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #11 from Michel Dänzer <[email protected]> 2011-01-24 02:54:12 PST --- Jakob pushed a driver-independent solution in commit 4c73030d47f39441d718157f7d9a59c136bbfac0 ('draw: Init llvm if not provided').

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel