Bug 27996 - [r300g] Sins of a Solar Empire crash when entering menu
Summary: [r300g] Sins of a Solar Empire crash when entering menu
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
Keywords: regression
Depends on:
Reported: 2010-05-06 08:50 UTC by Pavel Ondračka
Modified: 2010-05-14 12:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

terminal output (16.79 KB, text/plain)
2010-05-06 08:50 UTC, Pavel Ondračka
dmesg (44.69 KB, text/plain)
2010-05-06 08:51 UTC, Pavel Ondračka
wine backtrace (5.67 KB, text/plain)
2010-05-06 10:47 UTC, Pavel Ondračka
wine log (45.46 KB, text/plain)
2010-05-14 05:23 UTC, Pavel Ondračka

Description Pavel Ondračka 2010-05-06 08:50:55 UTC
Created attachment 35461 [details]
terminal output

I'm trying to run Sins of a Solar Empire with Wine 1.1.43 and r300g driver. Until commit dad962bafe8ffd7fdb35c28cfb8bbd5a297c8083 I was able to enter the menu and even start a new game, however some rendering was broken (almost everything black). Now when entering menu it crashes. I'm attaching terminal output and dmesg.

dad962bafe8ffd7fdb35c28cfb8bbd5a297c8083 is the first bad commit
commit dad962bafe8ffd7fdb35c28cfb8bbd5a297c8083
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue May 4 15:41:19 2010 +0100

    mesa/st: Fill in native program limits.
    In the lack of more fine grained capabilities in Gallium, assume that if
    the pipe driver supports GLSL then native limits match Mesa software
    (cherry picked from commit 40a90cd11234a09c2477f5c9984dd6d9fac3f52c)

:040000 040000 cfc8a638f5c8e29d63316bc78ba58d808d064c1a 71c19fdbecf5fd0e113de6f79b4c00fd1eac4f29 M	src
Comment 1 Pavel Ondračka 2010-05-06 08:51:49 UTC
Created attachment 35462 [details]
Comment 2 Jose Fonseca 2010-05-06 09:25:34 UTC
Hi Pavel,

The commit you mention enables features which were until now never advertised -- many applications were not using GLSL because they thought the hardware had no native support for it. It's likely the bug is in the this feature (GLSL compilation) and not on the commit itself.

Can you get a stack trace showing where inside the driver the crash is happening?

Comment 3 Pavel Ondračka 2010-05-06 09:28:53 UTC
(In reply to comment #2)
> Can you get a stack trace showing where inside the driver the crash is
> happening?

How can I do that?
Comment 4 Pavel Ondračka 2010-05-06 10:47:09 UTC
Created attachment 35464 [details]
wine backtrace

I was able to get a Wine backtrace, I hope this is helpful.
Comment 5 Marek Olšák 2010-05-06 11:05:49 UTC
From the first log:

"r300: Max size of the constant buffer is 256*4 floats."

immediately followed by abort in the code.

We really need fine-grained shader limits, applications seem to make fatal decisions based on them.
Comment 6 Marek Olšák 2010-05-13 18:55:16 UTC
Could you please re-test the game with current mesa git?
Comment 7 Pavel Ondračka 2010-05-14 05:23:00 UTC
Created attachment 35650 [details]
wine log

It still doesn't work, attaching new log.
Comment 8 Marek Olšák 2010-05-14 11:15:04 UTC
OK so the problem is the game creates a larger constant buffer than hw can handle, but it seems to use only a small portion of the buffer. I've changed the code so that it does not abort (commit 93c997a9146e0b50186df684f4847fb0124ada11). Please close the bug if it helps you.
Comment 9 Pavel Ondračka 2010-05-14 12:07:26 UTC
The crash is gone now, closing

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.