mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
nir/shrink_vec_array_vars: detect zero init shared memory using constant initializer
More consistent. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36956>
This commit is contained in:
parent
edc5bea61e
commit
047b95a8c3
1 changed files with 5 additions and 2 deletions
|
|
@ -1373,8 +1373,11 @@ shrink_vec_var_list(nir_shader *shader,
|
|||
if (!usage)
|
||||
continue;
|
||||
|
||||
/* Zero inited shared memory is always written. */
|
||||
bool zero_init = var->data.mode == nir_var_mem_shared && shader->info.zero_initialize_shared_memory;
|
||||
/* Zero inited shared memory is always written.
|
||||
* All other initializer should be lowered before this pass.
|
||||
*/
|
||||
assert(!var->constant_initializer || var->constant_initializer->is_null_constant);
|
||||
bool zero_init = var->constant_initializer;
|
||||
assert(usage->comps_kept == 0);
|
||||
if (usage->has_external_copy || usage->has_complex_use)
|
||||
usage->comps_kept = usage->all_comps;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue