i965: Fix compiler warning about write being undefined.
authorEric Anholt <eric@anholt.net>
Sat, 10 Feb 2018 11:19:00 +0000 (11:19 +0000)
committerEric Anholt <eric@anholt.net>
Wed, 21 Feb 2018 04:23:57 +0000 (20:23 -0800)
This looks like it should be protected by the assume() about
nr_color_regions, but my compiler warns anyway.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_fs.cpp

index 6fb46e7374c09357121d5783a2c780d1837bc605..bed632d21b91572d30f579dab7b23be7b59e9714 100644 (file)
@@ -3070,7 +3070,7 @@ fs_visitor::emit_repclear_shader()
                .MOV(vec4(brw_message_reg(color_mrf)), fs_reg(reg));
    }
 
-   fs_inst *write;
+   fs_inst *write = NULL;
    if (key->nr_color_regions == 1) {
       write = bld.emit(FS_OPCODE_REP_FB_WRITE);
       write->saturate = key->clamp_fragment_color;