i965/fs: Silence uninitialized variable warning.
authorMatt Turner <mattst88@gmail.com>
Thu, 23 Oct 2014 22:45:15 +0000 (15:45 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 23 Oct 2014 23:20:07 +0000 (16:20 -0700)
The compiler isn't privy to the knowledge that we're doing at least one
framebuffer write.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index e941c58a36d29a935bed51b0d4b0ee702967a753..983e8db63e0e1a4cea520f476feeba9c65d4608c 100644 (file)
@@ -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;