https://bugs.freedesktop.org/show_bug.cgi?id=28606
Summary: [r300g]: Compiz focus blur effect does not work. (causes black windows instead) Product: DRI Version: unspecified Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: DRM/Radeon AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: oreaus@gmail.com
Expected: Focus Blur effect
Actual: Windows that should be blurred are black and the following is output:
r300 FP: Compiler Error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections Using a dummy shader instead. If there's an 'unknown opcode' message, please file a bug report and attach this log.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #1 from Scott Moreau oreaus@gmail.com 2010-06-18 14:56:05 PDT --- Created an attachment (id=36364) --> (https://bugs.freedesktop.org/attachment.cgi?id=36364) The output with RADEON_DEBUG=fp
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #2 from Scott Moreau oreaus@gmail.com 2010-06-18 14:58:11 PDT --- The is with a Radeon 9600 rv350, and fglrx used to do this effect fine on the same card.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
Corbin Simpson MostAwesomedude@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36364|application/octet-stream |text/plain mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=28606
Corbin Simpson MostAwesomedude@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |MostAwesomedude@gmail.com
--- Comment #3 from Corbin Simpson MostAwesomedude@gmail.com 2010-07-03 13:57:12 PDT --- Looks like the problematic shader should fit just fine. Deserves a closer look.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #4 from Marek Olšák maraeo@gmail.com 2010-07-03 16:34:57 PDT --- The real problem with the r300 compiler is scheduling of TEX blocks, which is done against the r300 hardware (r500 is ok here). I've had a closer look at a shader from etqw which creates about 10 TEX blocks on r300 even though there are NO texture indirections. The instructions just have wrong ordering and that is the only reason the shader doesn't fit in hardware.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #5 from Tom Stellard tstellar@gmail.com 2010-07-04 16:54:34 PDT --- (In reply to comment #4)
The real problem with the r300 compiler is scheduling of TEX blocks, which is done against the r300 hardware (r500 is ok here). I've had a closer look at a shader from etqw which creates about 10 TEX blocks on r300 even though there are NO texture indirections. The instructions just have wrong ordering and that is the only reason the shader doesn't fit in hardware.
I think this bug is slightly different from the problem you are seeing with etqw. The problem here is that the compiler is handed several TEX blocks and can't combine them into a single block. It sounds like the problem with etqw is the same as https://bugs.freedesktop.org/show_bug.cgi?id=25109 where the compiler receives a large TEX block and can't keep all the instructions together.
A possible fix for this bug is to do some kind of register renaming before the scheduling. Even though the TEX instructions are independent of each other, the scheduler can't schedule them together because they all write to the same register. If each destination register for these TEX instructions were renamed to something unique, I think the scheduler would schedule them correctly.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #6 from Marek Olšák maraeo@gmail.com 2010-07-05 09:30:15 PDT --- (In reply to comment #5)
I think this bug is slightly different from the problem you are seeing with etqw. The problem here is that the compiler is handed several TEX blocks and can't combine them into a single block. It sounds like the problem with etqw is the same as https://bugs.freedesktop.org/show_bug.cgi?id=25109 where the compiler receives a large TEX block and can't keep all the instructions together.
A possible fix for this bug is to do some kind of register renaming before the scheduling. Even though the TEX instructions are independent of each other, the scheduler can't schedule them together because they all write to the same register. If each destination register for these TEX instructions were renamed to something unique, I think the scheduler would schedule them correctly.
You're right that the bug I was talking about is different from this one, but it's also different from 25109. My respond continues here: https://bugs.freedesktop.org/show_bug.cgi?id=28624#c2
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #7 from Tom Stellard tstellar@gmail.com 2010-07-05 16:28:11 PDT --- Created an attachment (id=36773) View: https://bugs.freedesktop.org/attachment.cgi?id=36773 Review: https://bugs.freedesktop.org/review?bug=28606&attachment=36773
Proposed fix
Can you try this patch and post your RADEON_DEBUG=fp output again.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #8 from Scott Moreau oreaus@gmail.com 2010-07-05 18:06:14 PDT --- Created an attachment (id=36774) --> (https://bugs.freedesktop.org/attachment.cgi?id=36774) compiz crash backtrace
It crashes in the driver. Here is the bt.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
Tom Stellard tstellar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36773|0 |1 is obsolete| |
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #9 from Tom Stellard tstellar@gmail.com 2010-07-07 11:34:27 PDT --- Created an attachment (id=36839) View: https://bugs.freedesktop.org/attachment.cgi?id=36839 Review: https://bugs.freedesktop.org/review?bug=28606&attachment=36839
Possible Fix.
Can you try again with this patch.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #10 from Scott Moreau oreaus@gmail.com 2010-07-07 13:15:31 PDT --- Created an attachment (id=36845) --> (https://bugs.freedesktop.org/attachment.cgi?id=36845) compiz crash
(In reply to comment #9)
Created an attachment (id=36839)
View: https://bugs.freedesktop.org/attachment.cgi?id=36839 Review: https://bugs.freedesktop.org/review?bug=28606&attachment=36839
Possible Fix.
Can you try again with this patch.
This patch works, but it only worked the first time I tried it. Since restarting compiz, it crashes after falling back to software routines for whatever reason. It doesn't matter if the effect is enabled at (compiz) runtime or if it's disabled at runtime then enabled after compiz has fully started. I have attached the bt.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #11 from Scott Moreau oreaus@gmail.com 2010-07-07 13:30:54 PDT --- (In reply to comment #9)
Created an attachment (id=36839)
View: https://bugs.freedesktop.org/attachment.cgi?id=36839 Review: https://bugs.freedesktop.org/review?bug=28606&attachment=36839
Possible Fix.
Can you try again with this patch.
(In reply to comment #10)
Created an attachment (id=36845)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36845)
compiz crash
(In reply to comment #9)
Created an attachment (id=36839)
View: https://bugs.freedesktop.org/attachment.cgi?id=36839 Review: https://bugs.freedesktop.org/review?bug=28606&attachment=36839
Possible Fix.
Can you try again with this patch.
This patch works, but it only worked the first time I tried it.
Because I failed to use the gallium driver. This bt is from classic mesa and can be ignored.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
--- Comment #12 from Tom Stellard tstellar@gmail.com 2010-07-08 14:49:19 PDT --- Created an attachment (id=36891) View: https://bugs.freedesktop.org/attachment.cgi?id=36891 Review: https://bugs.freedesktop.org/review?bug=28606&attachment=36891
Final patch
I cleaned up the old patch a little bit, can you confirm that this one still works.
https://bugs.freedesktop.org/show_bug.cgi?id=28606
Tom Stellard tstellar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #13 from Tom Stellard tstellar@gmail.com 2010-07-08 21:39:09 PDT --- Fix in mesa git master commit: 8a8e311d8c3c60982d101826a4aa013672730e6c
dri-devel@lists.freedesktop.org