i965/fs: Fix an uninitialized value warnings
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 30 Sep 2014 22:41:24 +0000 (15:41 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 1 Oct 2014 00:26:05 +0000 (17:26 -0700)
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 19e9cb957e050c8882e24fe5909c039148380602..fd59ef80353ec2e052eb5f2b1438c48ba14e5d12 100644 (file)
@@ -2975,10 +2975,11 @@ fs_visitor::lower_load_payload()
 
    foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
       int dst_reg;
-      if (inst->dst.file == MRF) {
-         dst_reg = inst->dst.reg;
-      } else if (inst->dst.file == GRF) {
+      } if (inst->dst.file == GRF) {
          dst_reg = vgrf_to_reg[inst->dst.reg];
+      } else {
+         /* MRF */
+         dst_reg = inst->dst.reg;
       }
 
       if (inst->dst.file == MRF || inst->dst.file == GRF) {