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>
This commit is contained in:
committed by
Marge Bot
parent
ce5e2e2131
commit
ea81889ea4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user