Bug 11980 - GL_EXT_stencil_two_side breaks shadows in warzone2100 since 6.5.3
Summary: GL_EXT_stencil_two_side breaks shadows in warzone2100 since 6.5.3
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-13 09:19 UTC by Brice Goglin
Modified: 2009-08-24 12:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Brice Goglin 2007-08-13 09:19:37 UTC
Bug reported by Christian Ohm yesterday on the Debian BTS. Since Mesa 6.5.3, shadows are broken on r300 in Warzone2100 (starcrack-like game).

During the game, alt-s toggles shadows on/off. On a r300 with mesa 6.5.[12] (or with whatever release on i945), it works fine. But 6.5.3, 7.0.1 and current master head, it basically toggles dark/light instead, as if there were shadows everywhere.

It's easy to reproduce: install and launch warzone2100 (you might want to pass --window on the command line, fullscreen didn't really work here). Start a new campaign (you may skip the text intro by pressing Esc), and press alt-s several times when the game appears to see the shadows being toggled.

I git bissected between 6.5.2 and 6.5.3 and found the following commit:

  commit 62efc4ba3eb53ca75abbe9b52feabe49a5fd56b5
  Author: Aapo Tahkola <aet@rasterburn.org>
  Date:   Thu Jan 18 05:56:13 2007 +0200

      support as much of GL_EXT_stencil_two_side as we can. untested.



I reverted it on top of 6.5.3, it fixed the problem. I tried to revert on top of master but there are too many conflicts for me :(

Michel told me to check after disabling stencil_two_side in DRI conf, but it didn't help unfortunately, which is kind of surprising.

Let me know if you need more debugging, for instance by reverting only part of the above commit.

I'd be nice to fix this in mesa_7_0_branch too.

thanks,
Brice
Comment 1 Brice Goglin 2007-08-13 13:26:26 UTC
The submitter adds:
"The specific problem seems to be that the darkening of the shadows is applied to the whole polygon and not only the stencilled area (there are still different levels of darkening depending on the orientation of the polygon)."
Comment 2 Maciej Cencora 2009-03-19 05:14:58 UTC
Can you reproduce the bug with current mesa? Some EXT_stencil_two_side related patches has been committed about a month ago.
Comment 3 Maciej Cencora 2009-03-19 10:29:02 UTC
> 7.3 from experimental doesn't work, but is older than a month. With
> MesaLib-7.5-devel-20090313.tar.gz the shadows work.
>
> To reproduce you will probably need version 2.2.x or smaller of Warzone
> (trunk segfaults in the driver here due to some VBO stuff, on a X800 GTO).
>
> Best regards,
> Christian Ohm

Closing as fixed.
Comment 4 Adam Jackson 2009-08-24 12:27:43 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.