[Mesa-dev] [PATCH 14/17] i965: Fix compiler warning about write being undefined.
Eric Anholt
eric at anholt.net
Sat Feb 10 16:33:07 UTC 2018
This looks like it should be protected by the assume() about
nr_color_regions, but my compiler warns anyway.
Cc: Matt Turner <mattst88 at gmail.com>
---
src/intel/compiler/brw_fs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 6fb46e7374c0..bed632d21b91 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -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;
--
2.15.0
More information about the mesa-dev
mailing list