[Bug 57875] Second Life viewer bad rendering with git-ec83535

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 16 06:40:24 PDT 2013


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

--- Comment #31 from Henri Verbeet <hverbeet at gmail.com> ---
You're mixing things up a bit, the functionality this bug is about is mostly
controlled by D3DRS_ZENABLE in d3d9. Considering only pre-transformed
(D3DFVF_XYZRHW) vertices, the behaviour is like this:
  - When D3DRS_ZENABLE is D3DZB_TRUE, Z values are clipped when
D3DPMISCCAPS_CLIPTLVERTS is set, clamped when it isn't. Depth testing works
pretty much as expected. In practice that means the default GL behaviour is
fine as long as we set D3DPMISCCAPS_CLIPTLVERTS.
  - When D3DRS_ZENABLE is D3DZB_FALSE, depth value processing is technically
just completely disabled. We get equivalent behaviour by disabling the depth
test, and clamping depth values.

This does mean that always clamping Z for pre-transformed vertices through an
output modifier could be a valid implementation, as long as we don't set
D3DPMISCCAPS_CLIPTLVERTS in wined3d. However, it also means that you can't then
require the depth test to be always disabled when that output modifier is used.
If I'm still understanding the bug correctly, the whole point was that enabling
both depth clamping and the depth test at the same time is problematic on r300.

You could of course specify an appropriate interaction with GL_DEPTH_TEST in
the extension spec instead of just "always clamp Z / disable clipping and
viewport transform". That would probably work for us, but would also probably
make for a more complicated extension. It would also make it impossible to ever
implement this on things like r200 that can't properly do GLSL, although that
may not be enough of a concern to avoid doing it this way. What would be the
main advantage from r300g's point of view of making this an output modifier?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130716/97b737c2/attachment.html>


More information about the dri-devel mailing list