https://bugs.freedesktop.org/show_bug.cgi?id=57875
--- Comment #9 from Marek Olšák maraeo@gmail.com --- I don't remember having anything useful besides some quick hacks and I don't have them anymore. I came to the conclusion ARB_depth_clamp is not implementable on r300-r500. I don't think the extended range [-2,2] would help and IIRC, the register is not allowed to be written by userspace anyway, it must be written in the kernel.
The way I see it, there are 4 solutions to this issue:
1) Wine shouldn't use ARB_depth_clamp, but instead it should use an extension that exposes CLIP_DISABLE as defined by D3D9 to the user. The problem is such an extension doesn't exist.
2) We could agree on a wine-specific hack for r300g, which would expose ARB_depth_clamp for Wine only. We already blacklist certain apps for Hyper-Z, this would be no different.
3) We could clamp POS.Z to the range [-POS.W, POS.W] in the vertex shader. The problem with this approach is the clamping should be per-pixel, not per-vertex.
4) Disabling ARB_depth_clamp again.