https://bugs.freedesktop.org/show_bug.cgi?id=57888
Priority: medium Bug ID: 57888 Assignee: dri-devel@lists.freedesktop.org Summary: Amnesia shader compiler errors on RV350 Severity: normal Classification: Unclassified OS: Linux (All) Reporter: oreaus@gmail.com Hardware: x86 (IA32) Status: NEW Version: git Component: Drivers/Gallium/r300 Product: Mesa
Created attachment 71005 --> https://bugs.freedesktop.org/attachment.cgi?id=71005&action=edit 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.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
Scott Moreau oreaus@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71005|0 |1 is obsolete| |
--- Comment #1 from Scott Moreau oreaus@gmail.com --- Created attachment 71006 --> https://bugs.freedesktop.org/attachment.cgi?id=71006&action=edit side-by-side comparison
Correctly set type for image attachment.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #2 from Alex Deucher agd5f@yahoo.com --- If the game uses compressed textures, you may need to install libtxc_dxtn.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #3 from Tom Stellard tstellar@gmail.com --- Could you run the program with the environment variable RADEON_DEBUG=fp and then post the output.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #4 from Scott Moreau oreaus@gmail.com --- Created attachment 71007 --> https://bugs.freedesktop.org/attachment.cgi?id=71007&action=edit 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.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
Andreas Boll andreas.boll.dev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71005|text/plain |image/png mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #5 from Tom Stellard tstellar@gmail.com --- Created attachment 71019 --> https://bugs.freedesktop.org/attachment.cgi?id=71019&action=edit Possible fix
Does this patch help?
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #6 from Scott Moreau oreaus@gmail.com --- (In reply to comment #5)
Created attachment 71019 [details] [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.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #7 from Tomasz P. son_of_the_osiris@interia.pl --- I also waiting to merge this patch to master. :)
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #8 from Scott Moreau oreaus@gmail.com --- (In reply to comment #6)
(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.
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
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #9 from Tomasz P. son_of_the_osiris@interia.pl --- 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
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #10 from Tomasz P. son_of_the_osiris@interia.pl --- Created attachment 71054 --> https://bugs.freedesktop.org/attachment.cgi?id=71054&action=edit fishbowl screenshot
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #11 from Tomasz P. son_of_the_osiris@interia.pl --- (In reply to comment #5)
Created attachment 71019 [details] [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.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #12 from Tomasz P. son_of_the_osiris@interia.pl --- 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.
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #13 from Tomasz P. son_of_the_osiris@interia.pl --- Created attachment 71059 --> https://bugs.freedesktop.org/attachment.cgi?id=71059&action=edit before patch
https://bugs.freedesktop.org/show_bug.cgi?id=57888
--- Comment #14 from Tomasz P. son_of_the_osiris@interia.pl --- Created attachment 71060 --> https://bugs.freedesktop.org/attachment.cgi?id=71060&action=edit with-patch
https://bugs.freedesktop.org/show_bug.cgi?id=57888
GitLab Migration User gitlab-migration@fdo.invalid changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|NEW |RESOLVED
--- Comment #15 from GitLab Migration User gitlab-migration@fdo.invalid --- -- 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.
dri-devel@lists.freedesktop.org