fix the parameters of register region
authorXiang, Haihao <haihao.xiang@intel.com>
Tue, 1 Mar 2011 08:43:02 +0000 (16:43 +0800)
committerDamien Lespiau <damien.lespiau@intel.com>
Mon, 4 Mar 2013 15:54:28 +0000 (15:54 +0000)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
assembler/src/gram.y

index c037901..70a4a2d 100644 (file)
@@ -2410,6 +2410,12 @@ static void reset_instruction_src_region(struct brw_instruction *instr,
             } else {
                 width = (1 << instr->header.execution_size) / horiz_stride;
                 vert_stride = horiz_stride * width;
+
+                if (get_type_size(src->reg_type) * (width + src->subreg_nr) > 32) {
+                    horiz_stride = 0;
+                    width = 1;
+                    vert_stride = 0;
+                }
             }
         }