Stefan Dösinger : wined3d: Set the depth blit helper texture address mode to clamp.

Alexandre Julliard julliard at winehq.org
Wed Jul 15 09:46:04 CDT 2009


Module: wine
Branch: master
Commit: 3c2fa6aea46a33a48cae13e3af1b9c52f60c2883
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3c2fa6aea46a33a48cae13e3af1b9c52f60c2883

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Jul 14 19:01:48 2009 +0200

wined3d: Set the depth blit helper texture address mode to clamp.

On ATI cards we use the driver's GL_ARB_texture_non_power_of_two emulation to
support conditional NP2 textures without having to deal with the denormalized
coordinates. The default GL_TEXTURE_2D address mode is incompatible with
GL_ARB_texture_rectangle however.

---

 dlls/wined3d/surface.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 83d02d4..c7d1c2b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4418,6 +4418,9 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
                     0, 0, This->currentDesc.Width, This->currentDesc.Height, 0);
             glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
             glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+            glTexParameteri(bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+            glTexParameteri(bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+            glTexParameteri(bind_target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
             glTexParameteri(bind_target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE);
             glBindTexture(bind_target, old_binding);
 




More information about the wine-cvs mailing list