After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644589 - r300_fragprog_emit.c::emit_alu(): Too many ALU instructions
r300_fragprog_emit.c::emit_alu(): Too many ALU instructions
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: drivers
2.91.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-12 20:31 UTC by Ionut Biru
Modified: 2011-03-17 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preview of the bug (301.85 KB, image/png)
2011-03-12 20:31 UTC, Ionut Biru
  Details
StScrollViewFade: Fix GLSL shader to work on r300 hardware (2.31 KB, patch)
2011-03-13 12:07 UTC, drago01
none Details | Review
StScrollViewFade: Fix GLSL shader to work on r300 hardware (2.31 KB, patch)
2011-03-13 12:08 UTC, drago01
reviewed Details | Review
StScrollViewFade: Fix GLSL shader to work on r300 hardware (2.31 KB, patch)
2011-03-13 15:20 UTC, drago01
committed Details | Review

Description Ionut Biru 2011-03-12 20:31:10 UTC
when using gnome shell 2.91.91, clicking on Applications, in the location where
the icons should be listed,i have a big black square. Clicking on the other
categories the icons are show normally, only the All category has this problem

.xsession-errors has


r300 FP: Compiler Error:
r300_fragprog_emit.c::emit_alu(): Too many ALU instructions
Using a dummy shader instead.

I reported this bug to the mesa devs and they said this:

"Like Marek said, this isn't a bug it is a hardware limitation.  The only way
this could work is with changes to Gnome Shell, so you should contact the Gnome
Shell developers, although they might tell your hardware is unsupported."

From what i see, this is the only issue i have with r300 gallium and gnome-shell actually works better than with nouveau.
Comment 1 Ionut Biru 2011-03-12 20:31:52 UTC
Created attachment 183237 [details]
preview of the bug
Comment 2 drago01 2011-03-13 12:07:12 UTC
Created attachment 183270 [details] [review]
StScrollViewFade: Fix GLSL shader to work on r300 hardware

The number instructions in a shader is limited to 64 on r300 hardware,
the fade shader in StScrollViewFade was ending up using 97 instructions
which is way over the limit.

So refactor the shader to use less instructions by precomputing as many
values of possible outside of the conditionals. The resulting shader
ends up using 34 instructions which is well within the hardware limits.
Comment 3 drago01 2011-03-13 12:08:36 UTC
Created attachment 183271 [details] [review]
StScrollViewFade: Fix GLSL shader to work on r300 hardware

The number instructions in a shader is limited to 64 on r300 hardware,
the fade shader in StScrollViewFade was ending up using 97 instructions
which is way over the limit.

So refactor the shader to use less instructions by precomputing as many
values as possible outside of the conditionals. The resulting shader
ends up using 34 instructions which is well within the hardware limits.


---
*) Fix typo in the commit message
Comment 4 Ionut Biru 2011-03-13 13:33:57 UTC
thanks for the patch. It works now. Lets hope it would be accepted
Comment 5 drago01 2011-03-13 13:39:14 UTC
(In reply to comment #4)
> thanks for the patch. It works now. Lets hope it would be accepted

Don't worry about that it will once it gets reviewed ;)

Thanks for testing!
Comment 6 Maxim Ermilov 2011-03-13 14:57:19 UTC
Review of attachment 183271 [details] [review]:

looks good,

but need to fix compilation error:)

::: src/st/st-scroll-view-fade.c
@@ +66,3 @@
+"\n"
+"  cogl_color_out = color * ratio;\n"
+"};";

St-WARNING **: st/st-scroll-view-fade.c:404: Unable to co
mpile the fade shader: 0:44(2): error: syntax error, unexpected ';', expecting $end
Comment 7 drago01 2011-03-13 15:20:19 UTC
Created attachment 183278 [details] [review]
StScrollViewFade: Fix GLSL shader to work on r300 hardware

The number instructions in a shader is limited to 64 on r300 hardware,
the fade shader in StScrollViewFade was ending up using 97 instructions
which is way over the limit.

So refactor the shader to use less instructions by precomputing as many
values as possible outside of the conditionals. The resulting shader
ends up using 34 instructions which is well within the hardware limits.

------

(In reply to comment #6)
> Review of attachment 183271 [details] [review]:
> 
> looks good,
> 
> but need to fix compilation error:)
> 
> ::: src/st/st-scroll-view-fade.c
> @@ +66,3 @@
> +"\n"
> +"  cogl_color_out = color * ratio;\n"
> +"};";
> 
> St-WARNING **: st/st-scroll-view-fade.c:404: Unable to co
> mpile the fade shader: 0:44(2): error: syntax error, unexpected ';', expecting
> $end

Argh .. no idea how that semicolon went in, removed it.
Comment 8 drago01 2011-03-13 15:29:17 UTC
Attachment 183278 [details] pushed as 43cf60f - StScrollViewFade: Fix GLSL shader to work on r300 hardware
Comment 9 Joachim Frieben 2011-03-17 20:33:44 UTC
(In reply to comment #0)
Nevertheless, an upgrade to Mesa 7.11 development has solved the issue for me, see:

https://bugzilla.redhat.com/show_bug.cgi?id=683147 .