[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:02:59 UTC 2012


The following commit has been merged in the wheezy branch:
commit 01d46ff3ea89350aeed34cf438989c5c8fd78a35
Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Mar 28 13:52:12 2012 +0200

    wined3d: Support WINED3D_TTFF_COUNT3 texture projection in the ARB backend.
    (cherry picked from commit 7e3c7840e3d873aa4c6b323d4bc0fc07b669e1b2)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index cf9b909..2b23ca0 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -1913,6 +1913,7 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
     char reg_coord[40];
     DWORD reg_sampler_code;
     WORD myflags = 0;
+    BOOL swizzle_coord = FALSE;
 
     /* All versions have a destination register */
     shader_arb_get_dst_param(ins, dst, reg_dest);
@@ -1947,18 +1948,18 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
         if (reg_sampler_code < MAX_TEXTURES)
             flags = priv->cur_ps_args->super.tex_transform >> reg_sampler_code * WINED3D_PSARGS_TEXTRANSFORM_SHIFT;
         if (flags & WINED3D_PSARGS_PROJECTED)
+        {
             myflags |= TEX_PROJ;
+            if ((flags & ~WINED3D_PSARGS_PROJECTED) == WINED3D_TTFF_COUNT3)
+                swizzle_coord = TRUE;
+        }
     }
     else if (shader_version < WINED3D_SHADER_VERSION(2,0))
     {
         enum wined3d_shader_src_modifier src_mod = ins->src[0].modifiers;
         if (src_mod == WINED3DSPSM_DZ)
         {
-            /* TXP cannot handle DZ natively, so move the z coordinate to .w. reg_coord is a read-only
-             * varying register, so we need a temp reg
-             */
-            shader_addline(ins->ctx->buffer, "SWZ TA, %s, x, y, z, z;\n", reg_coord);
-            strcpy(reg_coord, "TA");
+            swizzle_coord = TRUE;
             myflags |= TEX_PROJ;
         } else if(src_mod == WINED3DSPSM_DW) {
             myflags |= TEX_PROJ;
@@ -1967,6 +1968,15 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
         if (ins->flags & WINED3DSI_TEXLD_PROJECT) myflags |= TEX_PROJ;
         if (ins->flags & WINED3DSI_TEXLD_BIAS) myflags |= TEX_BIAS;
     }
+
+    if (swizzle_coord)
+    {
+        /* TXP cannot handle DZ natively, so move the z coordinate to .w.
+         * reg_coord is a read-only varying register, so we need a temp reg */
+        shader_addline(ins->ctx->buffer, "SWZ TA, %s, x, y, z, z;\n", reg_coord);
+        strcpy(reg_coord, "TA");
+    }
+
     shader_hw_sample(ins, reg_sampler_code, reg_dest, reg_coord, myflags, NULL, NULL);
 }
 

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list