[Mesa-dev] [PATCH 05/14] i965: Merge variable hashtables of fs and vec4 visitors

Matt Turner mattst88 at gmail.com
Wed May 28 10:43:38 PDT 2014


On Wed, May 28, 2014 at 5:36 AM, Topi Pohjolainen
<topi.pohjolainen at intel.com> wrote:
> Now empty destructors are dropped allowing compiler to generate the
> defaults (calling base class).
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_fs.h             | 2 --
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp   | 8 --------
>  src/mesa/drivers/dri/i965/brw_shader.cpp       | 5 ++++-
>  src/mesa/drivers/dri/i965/brw_shader.h         | 2 ++
>  src/mesa/drivers/dri/i965/brw_vec4.h           | 3 ---
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 9 ---------
>  6 files changed, 6 insertions(+), 23 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
> index 9581f41..184725c 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h
> @@ -250,7 +250,6 @@ public:
>                struct gl_shader_program *shader_prog,
>                struct gl_fragment_program *fp,
>                unsigned dispatch_width);
> -   ~fs_visitor();
>
>     fs_reg *variable_storage(ir_variable *var);
>     int virtual_grf_alloc(int size);
> @@ -522,7 +521,6 @@ public:
>      */
>     int *push_constant_loc;
>
> -   struct hash_table *variable_ht;
>     fs_reg frag_depth;
>     fs_reg sample_mask;
>     fs_reg outputs[BRW_MAX_DRAW_BUFFERS];
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index f0715bc..d4e02d2 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -2973,9 +2973,6 @@ fs_visitor::fs_visitor(struct brw_context *brw,
>     this->failed = false;
>     this->simd16_unsupported = false;
>     this->no16_msg = NULL;
> -   this->variable_ht = hash_table_ctor(0,
> -                                       hash_table_pointer_hash,
> -                                       hash_table_pointer_compare);
>
>     memset(&this->payload, 0, sizeof(this->payload));
>     memset(this->outputs, 0, sizeof(this->outputs));
> @@ -3008,8 +3005,3 @@ fs_visitor::fs_visitor(struct brw_context *brw,
>     if (dispatch_width == 8)
>        this->param_size = rzalloc_array(mem_ctx, int, stage_prog_data->nr_params);
>  }
> -
> -fs_visitor::~fs_visitor()
> -{
> -   hash_table_dtor(this->variable_ht);
> -}

Doesn't backend_visitor need to have a destructor that calls hash_table_dtor?


More information about the mesa-dev mailing list