Bug 57888 - Amnesia shader compiler errors on RV350
Summary: Amnesia shader compiler errors on RV350
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 17:44 UTC by Scott Moreau
Modified: 2019-09-18 18:51 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
side-by-side comparison (454.69 KB, image/png)
2012-12-04 17:44 UTC, Scott Moreau
Details
side-by-side comparison (454.69 KB, image/png)
2012-12-04 17:48 UTC, Scott Moreau
Details
amnesia output with RADEON_DEBUG=fp (1.11 MB, text/plain)
2012-12-04 18:34 UTC, Scott Moreau
Details
Possible fix (1.24 KB, patch)
2012-12-05 02:07 UTC, Tom Stellard
Details | Splinter Review
fishbowl screenshot (934.56 KB, image/png)
2012-12-05 22:36 UTC, Tomasz P.
Details
before patch (203.72 KB, image/png)
2012-12-05 23:33 UTC, Tomasz P.
Details
with-patch (482.15 KB, image/png)
2012-12-05 23:34 UTC, Tomasz P.
Details

Description Scott Moreau 2012-12-04 17:44:03 UTC
Created attachment 71005 [details]
side-by-side comparison

Running the game Amnesia with minimal graphics settings and resolution causes the following error:

r300 FP: Compiler Error:
Too many hardware temporaries used.
Using a dummy shader instead.

With all graphics settings highest, this message is output additionally:

r300 FP: Compiler Error:
compiler/r300_fragprog_emit.c::emit_alu(): Too many ALU instructions


Here is some additional information:

Distro: Xubuntu 12.04 32bit
Kernel: 3.5.0-18-generic
Mesa: ec83535c83c748b067ecf4548e5396fef8719725
libtxc_dxtn.so installed


The game runs but most of the textures are black, except light sources such as the torches and windows. On Intel Sandybridge, the textures render correctly. I've attached an image to demonstrate the difference. The left is i965, the right is r300g. On intel, there are no errors output.
Comment 1 Scott Moreau 2012-12-04 17:48:16 UTC
Created attachment 71006 [details]
side-by-side comparison

Correctly set type for image attachment.
Comment 2 Alex Deucher 2012-12-04 17:48:48 UTC
If the game uses compressed textures, you may need to install libtxc_dxtn.
Comment 3 Tom Stellard 2012-12-04 18:13:59 UTC
Could you run the program with the environment variable RADEON_DEBUG=fp and then post the output.
Comment 4 Scott Moreau 2012-12-04 18:34:36 UTC
Created attachment 71007 [details]
amnesia output with RADEON_DEBUG=fp

(In reply to comment #3)
> Could you run the program with the environment variable RADEON_DEBUG=fp and
> then post the output.

Yes, I have attached a file with the output. Thanks.
Comment 5 Tom Stellard 2012-12-05 02:07:16 UTC
Created attachment 71019 [details] [review]
Possible fix

Does this patch help?
Comment 6 Scott Moreau 2012-12-05 02:58:25 UTC
(In reply to comment #5)
> Created attachment 71019 [details] [review] [review]
> Possible fix
> 
> Does this patch help?

Yes this fixes the problem. The shaders work without error and the content is rendered which makes the game playable. Thanks for the quick help. I will leave this open until upstream gets the fix.
Comment 7 Tomasz P. 2012-12-05 16:23:05 UTC
I also waiting to merge this patch to master. :)
Comment 8 Scott Moreau 2012-12-05 18:17:39 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Created attachment 71019 [details] [review] [review] [review]
> > Possible fix
> > 
> > Does this patch help?
> 
> Yes this fixes the problem. The shaders work without error and the content
> is rendered which makes the game playable. Thanks for the quick help. I will
> leave this open until upstream gets the fix.

This bug report is actually two separate problems. The first problem 'Too many hardware temporaries used' is fixed with Tom's patch here. This was the main problem, since it rendered the game unplayable. The 'too many ALU instructions' message is output when Shadow Quality is set to 'High' in the game settings. Since this is a different issue, I have filed a separate bug report for it here https://bugs.freedesktop.org/show_bug.cgi?id=57918
Comment 9 Tomasz P. 2012-12-05 18:37:50 UTC
I also noticed that there is some graphical problems...but game require Radeon X1000/GeForce 6, so rv350 is'nt supported...

http://www.amnesiagame.com/#buy
Comment 10 Tomasz P. 2012-12-05 22:36:43 UTC
Created attachment 71054 [details]
fishbowl screenshot
Comment 11 Tomasz P. 2012-12-05 22:41:37 UTC
(In reply to comment #5)
> Created attachment 71019 [details] [review] [review]
> Possible fix
> 
> Does this patch help?

The patch fixes compiler warning that there is too many ALU instructions and textures are visible. Unfortunatelly it corrupt lights in this game.Also similar corruption you can see on screenshot "fishblow" from webgl test http://ie.microsoft.com/testdrive/Performance/FishBowl/

And in supertuxkart shining parts of some vehicles have also similar corruption.
Comment 12 Tomasz P. 2012-12-05 23:32:55 UTC
Ok I have got better screenshots from "Amnesia". Mesa-git.png shows that there are textures missing but light is ok.

with-patch.png shows textures but light is corrupted.
Comment 13 Tomasz P. 2012-12-05 23:33:42 UTC
Created attachment 71059 [details]
before patch
Comment 14 Tomasz P. 2012-12-05 23:34:13 UTC
Created attachment 71060 [details]
with-patch
Comment 15 GitLab Migration User 2019-09-18 18:51:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/345.


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.