i965/vec4: Init mlen for several send from GRF instructions.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 3 Feb 2015 20:52:37 +0000 (22:52 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 10 Feb 2015 17:09:25 +0000 (19:09 +0200)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_vp.cpp

index cdd8a446286ab6cdfd4ee8caf8160a220b9ec544..be5f8f4384c7d13bc9ca63eb35cd383f153779aa 100644 (file)
@@ -1761,7 +1761,9 @@ vec4_visitor::emit_shader_time_write(enum shader_time_shader_type type,
    time.type = BRW_REGISTER_TYPE_UD;
    emit(MOV(time, src_reg(value)));
 
-   emit(SHADER_OPCODE_SHADER_TIME_ADD, dst_reg(), src_reg(dst));
+   vec4_instruction *inst =
+      emit(SHADER_OPCODE_SHADER_TIME_ADD, dst_reg(), src_reg(dst));
+   inst->mlen = 2;
 }
 
 bool
index 307f81f601c7518c1e061b0192aa524e28f5daaf..432c2182d3d0d846075bb34367a1b206d1f8bce7 100644 (file)
@@ -1751,10 +1751,12 @@ vec4_visitor::visit(ir_expression *ir)
 
          emit(MOV(grf_offset, offset));
 
-         emit(new(mem_ctx) vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD_GEN7,
-                                            dst_reg(packed_consts),
-                                            surf_index,
-                                            src_reg(grf_offset)));
+         vec4_instruction *pull =
+            emit(new(mem_ctx) vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD_GEN7,
+                                               dst_reg(packed_consts),
+                                               surf_index,
+                                               src_reg(grf_offset)));
+         pull->mlen = 1;
       } else {
          vec4_instruction *pull =
             emit(new(mem_ctx) vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD,
@@ -3431,6 +3433,7 @@ vec4_visitor::emit_pull_constant_load(bblock_t *block, vec4_instruction *inst,
 
       load = new(mem_ctx) vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD_GEN7,
                                            temp, index, src_reg(grf_offset));
+      load->mlen = 1;
    } else {
       load = new(mem_ctx) vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD,
                                            temp, index, offset);
index 5d9027b2ea65d9ceedfbadfa62df20b278481049..edd92ed3680ee0de9dfba9a5bb11a98b6d78a5f6 100644 (file)
@@ -550,6 +550,7 @@ vec4_vs_visitor::get_vp_src_reg(const prog_src_register &src)
             load = new(mem_ctx)
                vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD_GEN7,
                                 dst_reg(result), surf_index, reladdr);
+            load->mlen = 1;
          } else {
             load = new(mem_ctx)
                vec4_instruction(VS_OPCODE_PULL_CONSTANT_LOAD,