hk: Don't expect garbage on shared_size

Talking to Alyssa this looks like an artifact of old ways that the
shader was being produced, so get rid of that zeroing.  Add an
assert as a canary for any problems we might be missing.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34139>
This commit is contained in:
Caio Oliveira 2025-03-24 09:11:31 -07:00 committed by Marge Bot
parent 33295b2249
commit 43e521f7a5

View file

@ -750,11 +750,7 @@ hk_lower_nir(struct hk_device *dev, nir_shader *nir,
lower_load_global_constant_offset_instr, nir_metadata_none,
&soft_fault);
/* There may be garbage in shared_size, but it's the job of
* nir_lower_vars_to_explicit_types to allocate it. We have to reset to
* avoid overallocation.
*/
nir->info.shared_size = 0;
assert(nir->info.shared_size == 0);
NIR_PASS(_, nir, nir_lower_vars_to_explicit_types, nir_var_mem_shared,
shared_var_info);