Skip to contentSkip to conversation

New: r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

Bug 35257 [email protected] 1 participant 11 messages Mar 12, 2011 – Mar 15, 2011

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=35257

Summary: r300_fragprog_emit.c::emit_alu(): Too many ALU
instructions
Product: Mesa
Version: 7.10
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: [email protected]
ReportedBy: [email protected]

Created an attachment (id=44402)
--> (https://bugs.freedesktop.org/attachment.cgi?id=44402)
xorg log

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.

mesa 7.10.1
clutter 1.6.8

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #1 from Ionut Biru <[email protected]> 2011-03-12 11:25:17 PST --- Created an attachment (id=44403)
--> (https://bugs.freedesktop.org/attachment.cgi?id=44403)
preview of the bug

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

Tom Stellard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #44402|application/octet-stream    |text/plain
          mime type|                            |
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #2 from Tom Stellard <[email protected]> 2011-03-12 11:49:08 PST --- Can you set the environment variable RADEON_DEBUG=fp and post the .xsession-errors file?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #3 from Ionut Biru <[email protected]> 2011-03-12 11:49:50 PST --- Created an attachment (id=44404)
--> (https://bugs.freedesktop.org/attachment.cgi?id=44404)
log generated using RADEON_DEBUG=fp when using gnome-shell

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

Tom Stellard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |NOTABUG

--- Comment #4 from Tom Stellard <[email protected]> 2011-03-12 12:10:48 PST --- 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.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #5 from Ian Romanick <[email protected]> 2011-03-14 14:08:08 PDT --- (In reply to comment #4)

Quoted 3 lines

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.

Since we know there's a lot of work still to be done in the compiler's higher level optimization passes, I always feel like this is a bit of a cop out answer. The TGSI input is 125 instructions, and it looks like a nightmare of lowered if-statements. There are way more CMP/SEQ/MUL sequences than any program should generate. Unsurprisingly, the driver chokes on it. I'm sure the i915 driver, which has limitations similar to r300, would choke even worse.

Comparing the GLSL to the generated TGSI might reveal some high-level optimization opportunities that we're missing. It may also help us give some suggestions to the gnome-shell folks to make the shader more friendly to older hardware. There are, after all, a lot of i915s and r300s out there.

Just for giggles, could we get the output of MESA_GLSL=dump too? Use the same procedure as for RADEON_DEBUG=fp.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #6 from Ionut Biru <[email protected]> 2011-03-14 14:14:05 PDT --- @Ian (In reply to comment #5)

Quoted 5 lines

(In reply to comment #4)

Quoted 3 lines

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.

my problem was fixed by gnome-shell developers by reducing the number of shader.
http://git.gnome.org/browse/gnome-shell/commit/?id=43cf60f5636e7883bd5012e4c89ed5d57e28200c

Quoted 7 lines

Since we know there's a lot of work still to be done in the compiler's higher level optimization passes, I always feel like this is a bit of a cop out answer. The TGSI input is 125 instructions, and it looks like a nightmare of lowered if-statements. There are way more CMP/SEQ/MUL sequences than any program should generate. Unsurprisingly, the driver chokes on it. I'm sure the i915 driver, which has limitations similar to r300, would choke even worse.

Quoted 7 lines

Comparing the GLSL to the generated TGSI might reveal some high-level optimization opportunities that we're missing. It may also help us give some suggestions to the gnome-shell folks to make the shader more friendly to older hardware. There are, after all, a lot of i915s and r300s out there.

Just for giggles, could we get the output of MESA_GLSL=dump too? Use the same procedure as for RADEON_DEBUG=fp.

sure. i would do it

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#8 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #7 from Tom Stellard <[email protected]> 2011-03-14 17:28:24 PDT --- (In reply to comment #5)

Quoted 12 lines

(In reply to comment #4)

Quoted 3 lines

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.

Since we know there's a lot of work still to be done in the compiler's higher level optimization passes, I always feel like this is a bit of a cop out answer. The TGSI input is 125 instructions, and it looks like a nightmare of lowered if-statements. There are way more CMP/SEQ/MUL sequences than any program should generate. Unsurprisingly, the driver chokes on it. I'm sure the i915 driver, which has limitations similar to r300, would choke even worse.

Quoted 7 lines

Comparing the GLSL to the generated TGSI might reveal some high-level optimization opportunities that we're missing. It may also help us give some suggestions to the gnome-shell folks to make the shader more friendly to older hardware. There are, after all, a lot of i915s and r300s out there.

Just for giggles, could we get the output of MESA_GLSL=dump too? Use the same procedure as for RADEON_DEBUG=fp.

We were able to give some suggestions to the gnome shell developers to get the shader to fit. The optimization that is missing is pre-computing of equivalent expressions (not sure what the technical term is). In this shader there was a four clause conditional that was being used in two different IF statements. I've attached the before and after versions of the shader if you're interested

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#9 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #8 from Tom Stellard <[email protected]> 2011-03-14 17:29:19 PDT --- Created an attachment (id=44454)
--> (https://bugs.freedesktop.org/attachment.cgi?id=44454)
The shader in question before and after our suggestions

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#10 lore raw

[Bug 35257] r300_fragprog_emit.c::emit_alu(): Too many ALU instructions

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=35257

--- Comment #9 from Matt Turner <[email protected]> 2011-03-14 21:26:25 PDT --- (In reply to comment #7)

Quoted 3 lines

We were able to give some suggestions to the gnome shell developers to get the shader to fit. The optimization that is missing is pre-computing of equivalent expressions (not sure what the technical term is).

Common subexpression elimination.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.