i965: Initialize all member variables of vec4_instruction on construction.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 11 Sep 2013 23:20:18 +0000 (16:20 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 2 Oct 2013 00:30:51 +0000 (17:30 -0700)
commit70953b5fea1445fe121ac4b4a816c984742f2e19
tree4e4423f60ac42edd89f7586fa5f1058e6298af28
parent43bf36b080192f7ad5727ed96e86f0a49390d9dc
i965: Initialize all member variables of vec4_instruction on construction.

The vec4_instruction object relies on the memory allocator zeroing out
its contents before it's initialized, which is quite an unusual
practice in the C++ world because it ties objects to some specific
allocation scheme, and gives unpredictable results when an object is
created with a different allocator -- Stack allocation, array
allocation, or aggregation inside a different object are some of the
useful possibilities that come to my mind.  Initialize all fields from
the constructor and stop using the zeroing allocator.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp