[PATCH 4/5] wined3d: Don't use the depth range clipping hack when we have ARB_depth_clamp.

Henri Verbeet hverbeet at codeweavers.com
Tue Jan 19 16:52:28 CST 2010


ARB_depth_clamp should give pretty much the desired behaviour by clamping
instead of clipping depth values outside the depth range.
---
 dlls/wined3d/state.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index e9c352c..2f9b013 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3890,7 +3890,8 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
         minZ   = stateblock->viewport.MinZ;
         maxZ   = stateblock->viewport.MaxZ;
 
-        if (!stateblock->device->untransformed && minZ != maxZ)
+        if (!context->gl_info->supported[ARB_DEPTH_CLAMP]
+                && !stateblock->device->untransformed && minZ != maxZ)
         {
             /* Transformed vertices are supposed to bypass the whole transform pipeline including
              * frustum clipping. This can't be done in opengl, so this code adjusts the Z range to
-- 
1.6.4.4




More information about the wine-patches mailing list