i965: Initialize all member variables of bblock_t on construction.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 20 Sep 2013 23:27:42 +0000 (16:27 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 2 Oct 2013 00:30:51 +0000 (17:30 -0700)
commitfde23b61a996b0f3348f20e7636253465822aca1
tree70aab8618883e243d4ba8af7197958451846a9a5
parent58d772cb41b71dd3f5cf2bd4afb5781327ab4495
i965: Initialize all member variables of bblock_t on construction.

The bblock_t 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.

v2: Use zero initialization for numeric types instead of default construction.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_cfg.cpp
src/mesa/drivers/dri/i965/brw_cfg.h