https://bugs.freedesktop.org/show_bug.cgi?id=43332
Bug #: 43332 Summary: corrupted output in mesa-demo/fp-tri using r600g on evergreen Classification: Unclassified Product: Mesa Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/r600 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: stefano.teso@gmail.com
Hi,
using mesa from git master (commit 76ba431b97087e2d5ca0351e0d613f0812fd1425), the mesa demo fp-tri, when running the scs.txt shader, displays the correct output overlayed by random blue-ish blocks (perhaps alpha channel corruption?).
The bug doesn't affect llvmpipe. Only scs.txt seems to trigger the issue.
This is on evergreen hw:
01:00.0 VGA compatible controller: ATI Technologies Inc Robson CE [AMD Radeon HD 6300 Series]
on an i7 machine with i386 debian unstable.
The bug is also present in the libGL 7.11.2 shipped by debian, so I don't think it's a regression or a bug in my config.
Please let me know if you need more info.
Thanks,
https://bugs.freedesktop.org/show_bug.cgi?id=43332
--- Comment #1 from Stefano Teso stefano.teso@gmail.com 2011-11-29 03:10:30 UTC --- Created attachment 53948 --> https://bugs.freedesktop.org/attachment.cgi?id=53948 screenshot showing the artifact
https://bugs.freedesktop.org/show_bug.cgi?id=43332
--- Comment #2 from Stefano Teso stefano.teso@gmail.com 2011-12-15 09:37:46 PST ---
The bug is also present in the libGL 7.11.2 shipped by debian, so I don't think it's a regression or a bug in my config.
It looks like that inst->Dst[0].Register.WriteMask == 3 in tgsi_scs (), so the ZW components of the dest register are never written. Perhaps this could explain the artifact. Not that I'm a GL expert or anything ;-)
https://bugs.freedesktop.org/show_bug.cgi?id=43332
--- Comment #3 from Stefano Teso stefano.teso@gmail.com 2011-12-15 09:53:39 PST --- (In reply to comment #2)
The bug is also present in the libGL 7.11.2 shipped by debian, so I don't think it's a regression or a bug in my config.
It looks like that inst->Dst[0].Register.WriteMask == 3 in tgsi_scs (), so the ZW components of the dest register are never written. Perhaps this could explain the artifact. Not that I'm a GL expert or anything ;-)
Forcing the mask to 15 fixes the problem. Of course this is no solution. Likely the fragment color is not cleared properly before calling SCS?
https://bugs.freedesktop.org/show_bug.cgi?id=43332
Michel Dänzer michel@daenzer.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|corrupted output in |corrupted output in |mesa-demo/fp-tri using |mesa-demo/fp-tri using |r600g on evergreen |r600g
--- Comment #4 from Michel Dänzer michel@daenzer.net 2011-12-16 02:15:25 PST --- Yeah, looks like the problem is basically that the pixel shader never writes any explicit values to the ZW components of the output register. However, I'm not sure offhand if it's the responsibility of the Gallium driver / state tracker / shader compiler / app to ensure this. Before I go wading through the various specifications, I hope someone does know offhand. :)
Also seeing it on an RS880, dropping evergreen from the title.
https://bugs.freedesktop.org/show_bug.cgi?id=43332
--- Comment #5 from Vadim ptpzz@yandex.ru 2011-12-16 08:46:02 PST --- The shader is responsible for writing all components of the color. SCS instruction writes XY only (ARB_fragment_program spec), so it's not the driver's fault.
https://bugs.freedesktop.org/show_bug.cgi?id=43332
Michel Dänzer michel@daenzer.net changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|dri-devel@lists.freedesktop |mesa-dev@lists.freedesktop. |.org |org Component|Drivers/Gallium/r600 |Demos
--- Comment #6 from Michel Dänzer michel@daenzer.net 2011-12-29 09:13:35 PST --- Reassigning to demos per comment #5.
dri-devel@lists.freedesktop.org