diff --git a/src/gallium/drivers/i915/i915_fpc_optimize.c b/src/gallium/drivers/i915/i915_fpc_optimize.c index b4ae362dfef..731f2444fec 100644 --- a/src/gallium/drivers/i915/i915_fpc_optimize.c +++ b/src/gallium/drivers/i915/i915_fpc_optimize.c @@ -405,6 +405,8 @@ i915_fpc_optimize_mov_before_tex(struct i915_optimize_context *ctx, target_is_texture2d(next->FullInstruction.Texture.Texture) && same_src_dst_reg(&next->FullInstruction.Src[0], ¤t->FullInstruction.Dst[0]) && + (current->FullInstruction.Dst[0].Register.WriteMask & + i915_tex_mask(next)) == i915_tex_mask(next) && is_unswizzled(¤t->FullInstruction.Src[0], i915_tex_mask(next)) && unused_from(ctx, ¤t->FullInstruction.Dst[0], index)) { memcpy(&next->FullInstruction.Src[0], ¤t->FullInstruction.Src[0],