New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r300 FP: Compiler Error: r300_fragprog_emit.c::emit_alu(): Too many ALU instructions on Radeon X1050 (RV370) #344
Comments
Note that the game starts properly and displays the menu properly, the compiler error occurs when loading maps. |
We may also want to print the faulty shader name on console and dump its code to make debugging easier. |
All of this seems to be printed by the driver itself:
So I don't know how to intercept it. |
More logs about this GPU:
Then Dæmon exits without saying anything more. On a side note I notice this R300 GPU is not recognized as R300 (see #352, #353 was not applied yet). |
We know hardware from that era like the Radeon X1950 PRO (RV570) can render the game as soon as the hardware supports a large enough amount of instructions (and make sure to not be too demanding on it, see #364). So, it would be very good to know which shader is at fault and see if we can make it without it or ifdef-out some code to reduce its size on older hardware. |
As confirmed by this page: https://dri.freedesktop.org/wiki/R300ToDo/ the R300 has small ALUs:
It's small but we know Darkplaces/Xonotic runs on this hardware with the same constraints. |
With much surprise, after having commented the Daemon/src/engine/renderer/tr_shade.cpp Lines 316 to 336 in 6b94e2e
the map loads, there is no r300 compiler error, memory usage is sane, and everything seems to be rendered properly: This code was added by @gimhael in commit 0bb3550 which… interestingly… is part of the tiled render but this code seems to be used even if dynamic lighting is disabled. |
…used, save r300 alu, fix DaemonEngine#344
…ed, save r300 ALU, fix DaemonEngine#344
…ed, save r300 ALU, fix DaemonEngine#344
…ed, save r300 ALU, fix DaemonEngine#344
…ed, save r300 ALU, fix DaemonEngine#344
…ed, save r300 ALU, fix DaemonEngine#344
…ed, save r300 ALU, fix DaemonEngine#344
The Unvanquished download page states the minimal requirement on GPU side is an OpenGL 2.1 GPU.
I've driven some tests to check that, using the to-be-released 0.52 engine. I tested both the Intel GMA965 X3100 (integrated in Core 2 Duo L7500 CPU) and the ATI X1050 (discrete PCIe card). They're both from around the year 2006.
While the test succeeded with the Intel GMA964 chip (I had to reduce texture resolution though), the test failed miserably with the ATI X1050 card.
The ATI X1050 GPU uses the architecture that existed before TeraScale (papers may have named it “Unified Superscalar Shader Architecture” at the time).
I got this error in Dæmon's output:
I've read interesting things about a similar issue on another project and about fixes of similar issues I have read that:
I still don't understand why in this example doing this avoids the issue:
but doing this would fail:
So, I don't really know how to fix the issue myself.
Anyway, since Xonotic/DarkPlaces runs on that GPU there is no reason Unvanquished/Dæmon cannot. This issue keeps track of this bug if someone wants to hack on it.
In all case, we would want to catch properly the issue and at least return to main menu with a proper message. That's for another ticket (see #345).
On a side note, I experienced hangs with that GPU but maybe I just need to reduce texture resolution like I had to do with the Intel X3100 GPU, that's for another ticket (see #346).
The text was updated successfully, but these errors were encountered: