[Mesa-dev] [PATCH 10/11] i965: Switch vec4_live_variables to the non-zeroing allocator.

Kenneth Graunke kenneth at whitecape.org
Tue Sep 24 11:18:22 PDT 2013


On 09/20/2013 09:51 PM, Francisco Jerez wrote:
> All member variables of vec4_live_variables are already being
> initialized from its constructor, it's not necessary to use rzalloc to
> allocate its memory, and doing so makes it more likely that we will
> start relying on the allocator to zero out all memory if the class is
> ever extended with new member variables.
> 
> That's bad 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.
> ---
>  src/mesa/drivers/dri/i965/brw_vec4_live_variables.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
> index b8ab95a..296468a 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
> @@ -52,7 +52,7 @@ struct block_data {
>  
>  class vec4_live_variables {
>  public:
> -   DECLARE_RZALLOC_CXX_OPERATORS(vec4_live_variables)
> +   DECLARE_RALLOC_CXX_OPERATORS(vec4_live_variables)
>  
>     vec4_live_variables(vec4_visitor *v, cfg_t *cfg);
>     ~vec4_live_variables();
> 

Patches 2 and 6-11 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

I'm hoping to see a respin of 1 and 3-5.  (Well, assuming you
incorporate my suggestion to 5, you can just add my R-b to that and push
it.)

--Ken


More information about the mesa-dev mailing list