i965: Bail on vec4 copy propagation for scratch writes with source modifiers
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vec4_copy_propagation.cpp
index 28f162df5ba1da415d80098f4a524e4924bd8763..37ca661d5616b13d81b9a538495296a5c9335cbe 100644 (file)
@@ -273,6 +273,10 @@ try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
    if (has_source_modifiers && value.type != inst->src[arg].type)
       return false;
 
+   if (has_source_modifiers &&
+       inst->opcode == SHADER_OPCODE_GEN4_SCRATCH_WRITE)
+      return false;
+
    bool is_3src_inst = (inst->opcode == BRW_OPCODE_LRP ||
                         inst->opcode == BRW_OPCODE_MAD ||
                         inst->opcode == BRW_OPCODE_BFE ||