From 40492be2a4a339b02c38990ad8736644f3a8776b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 23 Oct 2014 15:45:15 -0700 Subject: [PATCH] i965/fs: Silence uninitialized variable warning. The compiler isn't privy to the knowledge that we're doing at least one framebuffer write. Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index e941c58a36d..983e8db63e0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2601,6 +2601,7 @@ fs_visitor::emit_repclear_shader() write->header_present = false; write->mlen = 1; } else { + assume(key->nr_color_regions > 0); for (int i = 0; i < key->nr_color_regions; ++i) { write = emit(FS_OPCODE_REP_FB_WRITE); write->saturate = key->clamp_fragment_color; -- 2.30.2