diff mbox

i915: Do not force the incoming source alpha to 1.

Message ID 1257868341-29737-2-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State Rejected
Headers show

Commit Message

Chris Wilson Nov. 10, 2009, 3:52 p.m. UTC
None
diff mbox

Patch

diff --git a/src/i915_render.c b/src/i915_render.c
index f64e031..8d8fde4 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -446,7 +446,6 @@  static void i915_emit_composite_setup(ScrnInfoPtr scrn)
 {
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 	int op = intel->i915_render_state.op;
-	PicturePtr source_picture = intel->render_source_picture;
 	PicturePtr mask_picture = intel->render_mask_picture;
 	PicturePtr dest_picture = intel->render_dest_picture;
 	PixmapPtr mask = intel->render_mask;
@@ -600,10 +599,6 @@  static void i915_emit_composite_setup(ScrnInfoPtr scrn)
 		    i915_fs_texldp(FS_R0, FS_S0, FS_T0);
 		}
 
-		/* If the texture lacks an alpha channel, force the alpha to 1. */
-		if (PICT_FORMAT_A(source_picture->format) == 0)
-		    i915_fs_mov_masked(FS_R0, MASK_W, i915_fs_operand_one());
-
 		src_reg = FS_R0;
 	    }
 
@@ -653,7 +648,9 @@  static void i915_emit_composite_setup(ScrnInfoPtr scrn)
 		}
 	    }
 	    if (dst_format == COLR_BUF_8BIT)
-		i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W));
+		    i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W));
+	    if (PICT_FORMAT_A(dest_picture->format) == 0)
+		    i915_fs_mov_masked(FS_OC, MASK_W, i915_fs_operand_one());
 
 	    FS_END();
 	}