nir/nir_opt_copy_prop_vars: don't call memset when cloning

This makes the pass significantly faster cutting execution time
by around 30% in the cts test
dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20

This 30% improvement is in addition to all the improvements from
the proceeding patches.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20381>
This commit is contained in:
Timothy Arceri 2022-12-18 12:44:16 +11:00 committed by Marge Bot
parent d1a41d9c64
commit cb58d75224

View file

@ -1365,8 +1365,8 @@ clone_copies(struct copy_prop_var_state *state, struct copies *clones,
{
hash_table_foreach(&copies->ht, entry) {
struct copies_dynarray *cloned_copies = get_copies_dynarray(state);
util_dynarray_clone(&cloned_copies->arr, state->mem_ctx,
&((struct copies_dynarray *) entry->data)->arr);
util_dynarray_append_dynarray(&cloned_copies->arr,
&((struct copies_dynarray *) entry->data)->arr);
_mesa_hash_table_insert(&clones->ht, entry->key, cloned_copies);
}