Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c	(revision 33045)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c	(revision 33046)
@@ -67,4 +67,9 @@
     texture->baseTexture.is_srgb = FALSE;
     texture->baseTexture.pow2Matrix_identity = TRUE;
+#if defined(VBOX_WITH_WDDM) && defined(DEBUG_leo)
+    texture->baseTexture.t_mirror = TRUE;
+#else
+    texture->baseTexture.t_mirror = FALSE;
+#endif
 
     if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c	(revision 33045)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c	(revision 33046)
@@ -1942,4 +1942,5 @@
     struct color_fixup_desc fixup;
     BOOL np2_fixup = FALSE;
+    BOOL tmirror_tmp_reg = FALSE;
     va_list args;
 
@@ -1952,5 +1953,5 @@
         sampler_base = "Psampler";
 
-        if(priv->cur_ps_args->np2_fixup & (1 << sampler)) {
+        if (priv->cur_ps_args->np2_fixup & (1 << sampler)) {
             if(bias) {
                 FIXME("Biased sampling from NP2 textures is unsupported\n");
@@ -1959,4 +1960,33 @@
             }
         }
+
+        if (priv->cur_ps_args->t_mirror & (1 << sampler))
+        {
+            if (ins->ctx->reg_maps->sampler_type[sampler]==WINED3DSTT_2D)
+            {
+                if (sample_function->coord_mask & WINED3DSP_WRITEMASK_1)
+                {
+                    glsl_src_param_t coord_param;
+                    shader_glsl_add_src_param(ins, &ins->src[0], sample_function->coord_mask, &coord_param);
+
+                    if (ins->src[0].reg.type != WINED3DSPR_INPUT)
+                    {
+                        shader_addline(ins->ctx->buffer, "%s.y=1.0-%s.y;\n",
+                                       coord_param.reg_name, coord_param.reg_name);
+                    }
+                    else
+                    {
+                        tmirror_tmp_reg = TRUE;
+                        shader_addline(ins->ctx->buffer, "tmp0.xy=vec2(%s.x, 1.0-%s.y).xy;\n",
+                                       coord_param.reg_name, coord_param.reg_name);
+                    }
+                }
+                else
+                {
+                    DebugBreak();
+                    FIXME("Unexpected coord_mask with t_mirror\n");
+                }
+            }
+        }
     } else {
         sampler_base = "Vsampler";
@@ -1968,7 +1998,14 @@
     shader_addline(ins->ctx->buffer, "%s(%s%u, ", sample_function->name, sampler_base, sampler);
 
-    va_start(args, coord_reg_fmt);
-    shader_vaddline(ins->ctx->buffer, coord_reg_fmt, args);
-    va_end(args);
+    if (tmirror_tmp_reg)
+    {
+        shader_addline(ins->ctx->buffer, "%s", "tmp0.xy");
+    }
+    else
+    {
+        va_start(args, coord_reg_fmt);
+        shader_vaddline(ins->ctx->buffer, coord_reg_fmt, args);
+        va_end(args);
+    }
 
     if(bias) {
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader.c	(revision 33045)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader.c	(revision 33046)
@@ -2020,4 +2020,5 @@
     args->srgb_correction = stateblock->renderState[WINED3DRS_SRGBWRITEENABLE] ? 1 : 0;
     args->np2_fixup = 0;
+    args->t_mirror = 0;
 
     for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i)
@@ -2036,4 +2037,9 @@
         {
             args->np2_fixup |= (1 << i);
+        }
+
+        if (texture->baseTexture.t_mirror)
+        {
+            args->t_mirror |= (1 << i);
         }
     }
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c	(revision 33045)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c	(revision 33046)
@@ -4533,5 +4533,9 @@
         {
             GLfloat yoffset = -(63.0f / 64.0f) / stateblock->viewport.Height;
+#if !defined(VBOX_WITH_WDDM) || !defined(DEBUG_leo)
             device->posFixup[1] = context->render_offscreen ? -1.0f : 1.0f;
+#else
+            device->posFixup[1] = context->render_offscreen ? 1.0f : -1.0f;
+#endif
             device->posFixup[3] = device->posFixup[1] * yoffset;
         }
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h	(revision 33045)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h	(revision 33046)
@@ -716,4 +716,5 @@
        D3D9 has a limit of 16 samplers and the fixup is superfluous
        in D3D10 (unconditional NP2 support mandatory). */
+    WORD                        t_mirror;
 };
 
@@ -1907,4 +1908,5 @@
     BOOL                    is_srgb;
     BOOL                    pow2Matrix_identity;
+    BOOL                    t_mirror;
     const struct min_lookup *minMipLookup;
     const GLenum            *magLookup;
