mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
nir/range_analysis: set deleted key
If (uintptr_t)&deleted_key is small enough, inserting entries into the
hash table might not work correctly.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit c0079e09ca)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
parent
0d52c7941e
commit
1d66a995ce
2 changed files with 3 additions and 1 deletions
|
|
@ -2784,7 +2784,7 @@
|
|||
"description": "nir/range_analysis: set deleted key",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2197,6 +2197,7 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
|
|||
|
||||
push_scalar_query(&state, scalar);
|
||||
|
||||
_mesa_hash_table_set_deleted_key(range_ht, (void *)(uintptr_t)UINT32_MAX);
|
||||
return perform_analysis(&state);
|
||||
}
|
||||
|
||||
|
|
@ -2588,5 +2589,6 @@ nir_def_num_lsb_zero(struct hash_table *numlsb_ht, nir_scalar def)
|
|||
|
||||
push_scalar_query(&state, def);
|
||||
|
||||
_mesa_hash_table_set_deleted_key(numlsb_ht, (void *)(uintptr_t)UINT32_MAX);
|
||||
return perform_analysis(&state);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue