mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nir/large_constants: only search for constant duplicates
Fixes:b6d4753568("nir/large_constants: De-duplicate constants") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3706 Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7350> (cherry picked from commitea81889ea4)
This commit is contained in:
parent
e21a96791c
commit
194d070040
2 changed files with 4 additions and 2 deletions
|
|
@ -5593,7 +5593,7 @@
|
|||
"description": "nir/large_constants: only search for constant duplicates",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "b6d475356846f57a034e662ab9245d11ed0dd4a0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ var_info_cmp(const void *_a, const void *_b)
|
|||
uint32_t a_size = a->constant_data_size;
|
||||
uint32_t b_size = b->constant_data_size;
|
||||
|
||||
if (a_size < b_size) {
|
||||
if (a->is_constant != b->is_constant) {
|
||||
return (int)a->is_constant - (int)b->is_constant;
|
||||
} else if (a_size < b_size) {
|
||||
return -1;
|
||||
} else if (a_size > b_size) {
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue