New: [r300g] Unigine Sanctuary: almost everything is black
https://bugs.freedesktop.org/show_bug.cgi?id=28294
Summary: [r300g] Unigine Sanctuary: almost everything is black
Product: Mesa
Version: git
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/r300
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=35899)
--> (https://bugs.freedesktop.org/attachment.cgi?id=35899)
terminal output
I noticed ARB_half_float_vertex support in mesa this morning which is needed for Unigine. I gave it a try and it finally starts. However almost everything is black except for fires from torches (screenshot attached). Terminal is full of mesa user errors and there are some missing opcodes like:
r300: Unknown TGSI/RC opcode: KILP
r300: Unknown TGSI/RC opcode: BGNLOOP
r300: Unknown TGSI/RC opcode: BRK
r300: Unknown TGSI/RC opcode: ENDLOOP
r300 FP: Compiler Error:r500_fragprog_emit.c::translate_rgb_op(): translate_rgb_op(1): unknown opcode
Using a dummy shader instead.
If there's an 'unknown opcode' message, please file a bug report and attach this log.
r300 VP: Compiler error:
Unknown opcode 32
Using a dummy shader instead.
If there's an 'unknown opcode' message, please file a bug report and attach this log.
Probably more than one problem. However this is a big improvement indeed. This may be the first time Unigine actually tries to render something with open source drivers :-)
01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600]
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.
[Bug 28294] [r300g] Unigine Sanctuary: almost everything is black
https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #1 from Pavel Ondračka <[email protected]> 2010-05-28 00:06:40 PDT --- Created an attachment (id=35900)
--> (https://bugs.freedesktop.org/attachment.cgi?id=35900)
screenshot
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary: almost everything is black
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://unigine.com/download | |/
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary: almost everything is black
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #2 from Pavel Ondračka <[email protected]> 2010-05-28 00:40:22 PDT --- Sorry I didn't noticed, few days ago Unigine updated Sanctuary benchmark to 2.3 and they dropped support for r500 cards :-( I have still the 2.2 version (terminal output and screenshot are from 2.2 version) and it probably can be download somewhere, but I'm not sure if it is worth it to fix bugs in r300g for engine which doesn't officially support this cards. Leaving this open for now, maybe some r300g developer can have a look at this.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary: almost everything is black
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Tom Stellard <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #3 from Tom Stellard <[email protected]> 2010-05-31 22:03:40 PDT --- I am working on some changes to the r300g driver that might fix this bug. However, I probably won't be finished for a few months. It would be helpful if you could run the program with the environment variable RADEON_DEBUG="fp" and then post the output.
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.
[Bug 28294] [r300g] Unigine Sanctuary: almost everything is black
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Tom Stellard <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|[email protected] |[email protected] |.org |
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Tom Stellard <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|[email protected] |[email protected] | |.org
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #14 from Tom Stellard <[email protected]> 2010-06-12 23:18:31 PDT --- Can you try again using the current git master branch and post the output of 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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35982|0 |1
is obsolete| |
--- Comment #15 from Pavel Ondračka <[email protected]> 2010-06-13 02:17:56 PDT --- Created an attachment (id=36238)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36238)
output with RADEON_DEBUG="fp" , mesa: 1dc573a881f5b1413d156b64f5fdd0a57825c02a
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #16 from Tom Stellard <[email protected]> 2010-07-02 20:04:47 PDT --- Can you try again with the current git master branch? You should see less errors now.
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #17 from Pavel Ondračka <[email protected]> 2010-07-03 01:02:31 PDT --- Created an attachment (id=36702)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36702)
output with RADEON_DEBUG="fp", mesa:0e6d7ce0178d65787e3e10f56638c2f0a88296f1
I'm sorry to report this, but with latest git master, it looks worse then before. Whole scene is overbright, (the are no shadows). I was interested which commit caused this change, so I did git bisect but when I was at "r300/compiler: Handle loops in deadcode analysis" I wasn't sure if it is bad or good so I stopped. I'm attaching screenshots and new log.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #18 from Pavel Ondračka <[email protected]> 2010-07-03 01:04:54 PDT --- Created an attachment (id=36703)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36703)
screenshot with current mesa master
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #19 from Pavel Ondračka <[email protected]> 2010-07-03 01:08:22 PDT --- Created an attachment (id=36704)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36704)
screenshot with mesa:697d666d7860b3bdced32ca7fde9dea38f67da15
This is when I stopped bisecting, half screen have shadows and another half have not.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #20 from Pavel Ondračka <[email protected]> 2010-07-03 01:10:35 PDT --- Created an attachment (id=36705)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36705)
screenshot with NVIDIA proprietary driver
And for reference attaching also screenshot how it should look.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #21 from Tom Stellard <[email protected]> 2010-07-05 13:25:09 PDT --- Hi, can you try again with the attached patch.
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #22 from Tom Stellard <[email protected]> 2010-07-05 13:26:02 PDT --- Created an attachment (id=36765)
View: https://bugs.freedesktop.org/attachment.cgi?id=36765
Review: https://bugs.freedesktop.org/review?bug=28294&attachment=36765
Implement KILP opcode patch
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #23 from Pavel Ondračka <[email protected]> 2010-07-05 14:23:55 PDT --- Created an attachment (id=36771)
--> (https://bugs.freedesktop.org/attachment.cgi?id=36771)
output with KILP patch
Your patch works fine here, the whole top part of wall with another line of windows which was black before is now rendered correctly. There are still some problems like shadows missing and those black glitches especially around bottom windows. However very good job so far.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35899|0 |1
is obsolete| |
Attachment #36174|0 |1
is obsolete| |
Attachment #36238|0 |1
is obsolete| |
Attachment #36702|0 |1
is obsolete| |
Attachment #36771|0 |1
is obsolete| |--- Comment #24 from Pavel Ondračka <[email protected]> 2010-08-04 01:20:23 PDT --- Created an attachment (id=37566)
--> (https://bugs.freedesktop.org/attachment.cgi?id=37566)
output with RADEON_DEBUG="fp" , mesa: 5c2f01bbb076af8b8ae6e1803d95a9ae678c2d1c
With latest mesa master shadows are now working correctly, the only remaining issue are those black lines around windows and statues.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #25 from Sven Arvidsson <[email protected]> 2010-08-04 06:11:23 PDT --- Terminal output contains a lot of these error messages:
OpenGL error: invalid value
OpenGL error: invalid framebuffer operation GLFrameBuffer::check_status(): incomplete attachment
It's nothing new, just something worth mentioning.
I'm not really sure if I'm allowed to redistribute the benchmark, but I could probably put up a torrent if anybody is 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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |29722
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Bug 28294 depends on bug 29722, which changed state.
Bug 29722 Summary: [glsl] Unigine Sanctuary v2.2 assertion failed
https://bugs.freedesktop.org/show_bug.cgi?id=29722
What |Old Value |New Value
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Resolution| |FIXED
Status|ASSIGNED |RESOLVEDSignature · 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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Drivers/DRI/r300 |Drivers/Gallium/r300
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #26 from Pavel Ondračka <[email protected]> 2010-09-17 02:35:21 PDT --- Here is status with latest mesa (and lowest settings):
- shadows are broken, they were quite good before glsl2 merge (at least with shaders quality high), I thought they were broken because of glsl2 merge but I did some quick testing and now it seems they were partially broken before it by commit 9021c56a5738815777f27c39b63637b5975270c6
Author: Benjamin Segovia <[email protected]> Date: Fri Aug 13 10:36:47 2010 -0600
mesa: more/better program optimizations
This is the patch from Benjamin's Aug 11, 2010 email with minor fixes (such as moving declarations before code)
And then glsl2 merge did the rest. Note that with shaders quality set to low it didn't ever worked, just with high.
- those black glitches are gone (they are now only present when parallax mapping is turned on), they may be related to the shadows, see screenshots
- menus are broken hard, its almost imposible to change any settings.
Maybe this bug needs some splitting? Any logs needed? I'll attach screenshots.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35900|0 |1
is obsolete| |
Attachment #36173|0 |1
is obsolete| |
Attachment #36703|0 |1
is obsolete| |
Attachment #36704|0 |1
is obsolete| |
Attachment #36705|0 |1
is obsolete| |--- Comment #27 from Pavel Ondračka <[email protected]> 2010-09-17 02:36:37 PDT --- Created an attachment (id=38756)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38756)
screenshot just before 9021c56a5738815777f27c39b63637b5975270c6
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #28 from Pavel Ondračka <[email protected]> 2010-09-17 02:38:12 PDT --- Created an attachment (id=38757)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38757)
screenshot with mesa 9021c56a5738815777f27c39b63637b5975270c6
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #29 from Pavel Ondračka <[email protected]> 2010-09-17 02:39:42 PDT --- Created an attachment (id=38758)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38758)
screenshot with current mesa git ( dab2a7660a407364a33337327743b56ea9701d9b)
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #30 from Benjamin Segovia <[email protected]> 2010-09-27 13:27:22 PDT --- (In reply to comment #29)
Quoted 1 line
Created an attachment (id=38758)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38758)
Quoted 1 line
screenshot with current mesa git (
dab2a7660a407364a33337327743b56ea9701d9b)
Hello,
Problem is that I cannot test r300g. One bug was outstanding in my merge. It was solved few hours after glsl2 merge. So:
1/ One bug or more in the mesa program optimizations could cause that bug 2/ One bug or more in glsl2 could cause it
3/ Both
Could you comment the body of function _mesa_optimize_program in src/mesa/program/prog_optimize.c (this is the last function of the source file)? This will deactivate my commit.
Just to see if there is something wrong with glsl2 merge first.
Cheers,
Ben
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #31 from Pavel Ondračka <[email protected]> 2010-09-27 15:09:51 PDT --- (In reply to comment #30)
Quoted 2 lines
(In reply to comment #29)
Quoted 1 line
Created an attachment (id=38758)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38758)
Quoted 10 lines
Quoted 1 line
screenshot with current mesa git (
dab2a7660a407364a33337327743b56ea9701d9b)Hello,
Problem is that I cannot test r300g. One bug was outstanding in my merge. It was solved few hours after glsl2 merge. So:
1/ One bug or more in the mesa program optimizations could cause that bug 2/ One bug or more in glsl2 could cause it
3/ Both
Quoted 8 lines
Could you comment the body of function
_mesa_optimize_programinsrc/mesa/program/prog_optimize.c(this is the last function of the source file)? This will deactivate my commit.Just to see if there is something wrong with glsl2 merge first.
Cheers,
Ben
Hi, I did comment out the body of _mesa_optimize_program and I'm now hiting this assertion "Sanctuary: program/program.c:879: _mesa_find_used_registers:
Assertion `inst->DstReg.Index < usedSize' failed.", this is with shaders quality high, with low there is no change (starts but no shadows). I've found out that I can make shadows work when I start it with RADEON_DEBUG=noopt, which if I understand it correctly disables all optimizations.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #32 from Benjamin Segovia <[email protected]> 2010-09-27 15:28:53 PDT --- Ok, the number of registers may be too high, so optimizing is required to lower that number.
1/ To mesa developpers: do you know which part of mesa is disabled when RADEON_DEBUG=noopt is setup? Does it only modify radeon backend? In that case, this is a backend problem not a glsl2 or prog_optimize.c bug.
2/ We may try to workaround the assert you hit. You may do the following thing in _mesa_optimize_program. As below, comments the lines I commented. This will disable optimizations while maintaining register reallocation:
#if 0
_mesa_remove_extra_move_use(program);
if (_mesa_remove_dead_code_global(program))
any_change = GL_TRUE;
if (_mesa_remove_extra_moves(program))
any_change = GL_TRUE;
if (_mesa_remove_dead_code_local(program))
any_change = GL_TRUE;
#endif
_mesa_reallocate_registers(program);Thanks for help. You are awesomely reactive :)
Ben
(In reply to comment #31)
Quoted 3 lines
(In reply to comment #30)
Quoted 2 lines
(In reply to comment #29)
Quoted 1 line
Created an attachment (id=38758)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38758)
[details]
Quoted 19 lines
Quoted 10 lines
Quoted 1 line
screenshot with current mesa git (
dab2a7660a407364a33337327743b56ea9701d9b)Hello,
Problem is that I cannot test r300g. One bug was outstanding in my merge. It was solved few hours after glsl2 merge. So:
1/ One bug or more in the mesa program optimizations could cause that bug 2/ One bug or more in glsl2 could cause it
3/ BothQuoted 8 lines
Could you comment the body of function
_mesa_optimize_programinsrc/mesa/program/prog_optimize.c(this is the last function of the source file)? This will deactivate my commit.Just to see if there is something wrong with glsl2 merge first.
Cheers,
Ben
Quoted 7 lines
Hi, I did comment out the body of
_mesa_optimize_programand I'm now hiting this assertion "Sanctuary:program/program.c:879:_mesa_find_used_registers:
Assertion `inst->DstReg.Index < usedSize' failed.", this is with shaders quality high, with low there is no change (starts but no shadows). I've found out that I can make shadows work when I start it with RADEON_DEBUG=noopt, which if I understand it correctly disables all optimizations.
(In reply to comment #31)
Quoted 3 lines
(In reply to comment #30)
Quoted 2 lines
(In reply to comment #29)
Quoted 1 line
Created an attachment (id=38758)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38758)
[details]
Quoted 19 lines
Quoted 10 lines
Quoted 1 line
screenshot with current mesa git (
dab2a7660a407364a33337327743b56ea9701d9b)Hello,
Problem is that I cannot test r300g. One bug was outstanding in my merge. It was solved few hours after glsl2 merge. So:
1/ One bug or more in the mesa program optimizations could cause that bug 2/ One bug or more in glsl2 could cause it
3/ BothQuoted 8 lines
Could you comment the body of function
_mesa_optimize_programinsrc/mesa/program/prog_optimize.c(this is the last function of the source file)? This will deactivate my commit.Just to see if there is something wrong with glsl2 merge first.
Cheers,
Ben
Quoted 7 lines
Hi, I did comment out the body of
_mesa_optimize_programand I'm now hiting this assertion "Sanctuary:program/program.c:879:_mesa_find_used_registers:
Assertion `inst->DstReg.Index < usedSize' failed.", this is with shaders quality high, with low there is no change (starts but no shadows). I've found out that I can make shadows work when I start it with RADEON_DEBUG=noopt, which if I understand it correctly disables all optimizations.
(In reply to comment #31)
Quoted 3 lines
(In reply to comment #30)
Quoted 2 lines
(In reply to comment #29)
Quoted 1 line
Created an attachment (id=38758)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38758)
[details]
Quoted 26 lines
Quoted 10 lines
Quoted 1 line
screenshot with current mesa git (
dab2a7660a407364a33337327743b56ea9701d9b)Hello,
Problem is that I cannot test r300g. One bug was outstanding in my merge. It was solved few hours after glsl2 merge. So:
1/ One bug or more in the mesa program optimizations could cause that bug 2/ One bug or more in glsl2 could cause it
3/ BothQuoted 8 lines
Could you comment the body of function
_mesa_optimize_programinsrc/mesa/program/prog_optimize.c(this is the last function of the source file)? This will deactivate my commit.Just to see if there is something wrong with glsl2 merge first.
Cheers,
BenHi, I did comment out the body of
_mesa_optimize_programand I'm now hiting this assertion "Sanctuary:program/program.c:879:_mesa_find_used_registers:
Assertion `inst->DstReg.Index < usedSize' failed.", this is with shaders quality high, with low there is no change (starts but no shadows). I've found out that I can make shadows work when I start it with RADEON_DEBUG=noopt, which if I understand it correctly disables all optimizations.
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #33 from Pavel Ondračka <[email protected]> 2010-09-27 15:53:33 PDT --- Created an attachment (id=38995)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38995)
screenshot
Now with only part of _mesa_optimize_program commented out it is a little bit better (see screenshot). There are first signs of shadows but only in the bottom part of scene.
Regarding number 2, check description of commit cfc461fca6ad5656f58c48803d13052537063316.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #34 from Benjamin Segovia <[email protected]> 2010-09-27 16:08:52 PDT --- (In reply to comment #33)
Quoted 1 line
Created an attachment (id=38995)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38995)
Quoted 7 lines
screenshot
Now with only part of
_mesa_optimize_programcommented out it is a little bit better (see screenshot). There are first signs of shadows but only in the bottom part of scene.
Regarding number 2, check description of commitcfc461fca6ad5656f58c48803d13052537063316.
Did you turn off/on optimizations with RADEON_DEBUG? We could try:
1/ RADEON_DEBUG=noopt + only register allocation done in prog_optimize.c 2/ RADEON_DEBUG="" + only register allocation done in prog_optimize.c 3/ RADEON_DEBUG=noopt + everything done in prog_optimize.c
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #35 from Pavel Ondračka <[email protected]> 2010-09-27 16:34:55 PDT --- Created an attachment (id=38996)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38996)
screenshot with RADEON_DEBUG=noopt + only register allocation done in prog_optimize.c
RADEON_DEBUG was previously turned off.
So here we go:
1/ shadows are present (scene is dark) but there aren't any lights from windows. (screenshot attached)
2/ some shadows present but broken (comment 33 + screenshot there) 3/ shadows working fine, however some surfaces have strange colors (screenshot will be in next comment)
To me it seems there are at least two different bugs here.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #36 from Pavel Ondračka <[email protected]> 2010-09-27 16:35:32 PDT --- Created an attachment (id=38997)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38997)
screenshot with RADEON_DEBUG=noopt + everything done in prog_optimize.c
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #37 from Benjamin Segovia <[email protected]> 2010-09-27 17:03:08 PDT --- (In reply to comment #36)
Quoted 1 line
Created an attachment (id=38997)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38997)
Quoted 1 line
screenshot with RADEON_DEBUG=noopt + everything done in
prog_optimize.c
To me, it sounds like:
1/ There is for sure a bug in either glsl2 or radeon backend since deactivating optimizations still leads to bugs
2/ There may be a bug in prog_optimize.c but it it not sure since everything is broken
I cannot look at it right now. I have to install a proper 32 bit Linux. Then, I could look if at least I got something with the classic intel driver.
One other possibity is to deactivate optimizations one by one in both glsl2 and r300 backend with prog_optimize unactivated to track down the bug 1/ without any possible bug 2/
Cheers,
Ben
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|[email protected] |
--- Comment #38 from Marek Olšák <[email protected]> 2010-09-27 20:40:24 PDT --- Removing my email from CC, I am following dri-devel instead.
BTW I've just found and fixed a few bugs in the r300/compiler. Please test.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #39 from Pavel Ondračka <[email protected]> 2010-10-22 10:25:26 PDT --- Created an attachment (id=39633)
--> (https://bugs.freedesktop.org/attachment.cgi?id=39633)
screenshot with mesa dd2499b484b34e7efb8800f57c915c2f62ab1db4
With latest mesa this is much better, shadows are now working correctly except for one area which is still missing shadows, screenshot attached.
BTW commit which caused this change is9d2ab6cb00e72fd8b53d0f97578758504b49ee23
Author: Tom Stellard <[email protected]> Date: Sun Oct 10 12:39:00 2010 -0700
r300/compiler: Add a new function for more efficient dataflow analysis
rc_get_readers_normal() supplies a list of readers for a given instruction. This function is now being used by the copy propagate optimization and will eventually be used by most other optimization passes as well.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #40 from Tom Stellard <[email protected]> 2010-10-22 16:30:09 PDT --- Does running with RADEON_DEBUG=noopt fix this bug?
If it does, can you post the output of RADEON_DEBUG=fp,vp,pstat?
If it doesn't, can you post the output of RADEON_DEBUG=noopt,fp,vp,pstat?
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Pavel Ondračka <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #37566|0 |1
is obsolete| |
--- Comment #41 from Pavel Ondračka <[email protected]> 2010-10-23 00:17:18 PDT --- Created an attachment (id=39645)
--> (https://bugs.freedesktop.org/attachment.cgi?id=39645)
output of RADEON_DEBUG=fp,vp,pstat
(In reply to comment #40)
Quoted 2 lines
Does running with RADEON_DEBUG=noopt fix this bug?
If it does, can you post the output of RADEON_DEBUG=fp,vp,pstat?
Yes, running with noopt fixes it.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #42 from Tom Stellard <[email protected]> 2010-10-23 00:49:23 PDT --- (In reply to comment #41)
Quoted 1 line
Created an attachment (id=39645)
--> (https://bugs.freedesktop.org/attachment.cgi?id=39645)
Quoted 7 lines
output of RADEON_DEBUG=fp,vp,pstat
(In reply to comment #40)
Quoted 2 lines
Does running with RADEON_DEBUG=noopt fix this bug?
If it does, can you post the output of RADEON_DEBUG=fp,vp,pstat?Yes, running with noopt fixes it.
I should have thought of this before, but can you post the output of RADEON_DEBUG=noopt,fp,vp,pstat just so I can compare the two? Thanks.
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #43 from Pavel Ondračka <[email protected]> 2010-10-23 03:35:14 PDT --- Created an attachment (id=39648)
--> (https://bugs.freedesktop.org/attachment.cgi?id=39648)
output with RADEON_DEBUG=noopt,fp,vp,pstat
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #44 from Tom Stellard <[email protected]> 2010-10-27 23:56:00 PDT --- Can you try again with the latest version of mesa from git?
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #45 from Pavel Ondračka <[email protected]> 2010-10-28 02:52:38 PDT --- (In reply to comment #44)
Quoted 1 line
Can you try again with the latest version of mesa from git?
No visible change with latest mesa from git.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #46 from Tom Stellard <[email protected]> 2010-10-28 10:42:30 PDT --- In src/mesa/dri/drivers/r300/compiler/r3xx_fragprog.c around line 120, there is a list of compiler passes. Three of these passes(deadcode, dataflow optimize, and register allocation) are disabled when running with RADEON_DEBUG=noopt. You could try commenting out these passes one a time to see which one is causing the bug. When you are testing this way _don't_ use RADEON_DEBUG=noopt
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #47 from Pavel Ondračka <[email protected]> 2010-10-28 11:32:04 PDT --- (In reply to comment #46)
Quoted 5 lines
In
src/mesa/dri/drivers/r300/compiler/r3xx_fragprog.caround line 120, there is a list of compiler passes. Three of thesepasses(deadcode, dataflow optimize, and register allocation)are disabled when running with RADEON_DEBUG=noopt. You could try commenting out these passes one a time to see which one is causing the bug. When you are testing this way _don't_ use RADEON_DEBUG=noopt
deadcode pass commented out - no change
dataflow optimize pass commented out - shadows are ok
register allocation commented out - corruption everywhere (are you sure this is disabled with RADEON_DEBUG=noopt?)
So it looks like the bug is caused by dataflow optimize pass.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #48 from Marek Olšák <[email protected]> 2010-10-28 11:39:17 PDT --- If you disable the register allocation, you must enable the dumb register allocation instead. Otherwise nearly nothing will work.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #49 from Pavel Ondračka <[email protected]> 2010-10-28 12:03:21 PDT --- (In reply to comment #48)
Quoted 2 lines
If you disable the register allocation, you must enable the dumb register allocation instead. Otherwise nearly nothing will work.
Thanks, this did the trick, however bug is still present as expected.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #50 from Tom Stellard <[email protected]> 2010-10-28 18:37:32 PDT --- In radeon_optimize.c starting at line 660, there are three optimization
functions: constant_folding, peephole, and copy_propagate. You could try commenting these out one at a time to see which one is causing the problem.
Note: when you comment out the peephole function make sure to comment out the continue statement below it, like this:
//if(peephole(c, cur))
// continue;
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #51 from Pavel Ondračka <[email protected]> 2010-10-29 00:55:52 PDT --- (In reply to comment #50)
Quoted 3 lines
In
radeon_optimize.cstarting at line 660, there are three optimization
functions:constant_folding, peephole, andcopy_propagate. You could try commenting these out one at a time to see which one is causing the problem.
Commenting out constant folding have no effect, commenting out either peephole or copy_propagate fixes this.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #52 from Tom Stellard <[email protected]> 2010-10-29 16:55:26 PDT --- Created an attachment (id=39891)
View: https://bugs.freedesktop.org/attachment.cgi?id=39891
Review: https://bugs.freedesktop.org/review?bug=28294&attachment=39891
Proposed Fix
Does this patch help?
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.
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
--- Comment #53 from Pavel Ondračka <[email protected]> 2010-10-30 00:17:39 PDT --- (In reply to comment #52)
Quoted 1 line
Created an attachment (id=39891)
View: https://bugs.freedesktop.org/attachment.cgi?id=39891
Review: https://bugs.freedesktop.org/review?bug=28294&attachment=39891
Quoted 3 lines
Proposed Fix
Does this patch help?
Great, with your patch shadows works fine with all different settings. Thanks Tom, you did amazing job with r300 compiler in the last few months. :-) This bug can be closed when your patch is commited to master. I'll open a new bugs for remaining issues.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=28294
Tom Stellard <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED--- Comment #54 from Tom Stellard <[email protected]> 2010-10-30 22:36:21 PDT --- Thanks for all you help testing.
This bug is fixed by commit a15cf3cd0b21d593033a3abd2b1788de292001bd
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.