mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
nir: fix nir_copy_propagation test
Use nir_src_comp_as_uint() to read the proper second component, as
nir_src_as_uint() returns the first one.
v2: Use nir_src_comp_as_uint() [Jason]
Fixes: 16870de8a0 ("nir: Use nir_src_is_const and nir_src_as_* in core
code")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108532
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
0ff1ccca25
commit
3112da346b
1 changed files with 2 additions and 2 deletions
|
|
@ -375,7 +375,7 @@ TEST_F(nir_copy_prop_vars_test, store_store_load_different_components)
|
|||
ASSERT_TRUE(store_to_v1->src[1].is_ssa);
|
||||
|
||||
ASSERT_TRUE(nir_src_is_const(store_to_v1->src[1]));
|
||||
ASSERT_EQ(nir_src_as_uint(store_to_v1->src[1]), 20);
|
||||
ASSERT_EQ(nir_src_comp_as_uint(store_to_v1->src[1], 1), 20);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ TEST_F(nir_copy_prop_vars_test, store_store_load_different_components_in_many_bl
|
|||
ASSERT_TRUE(store_to_v1->src[1].is_ssa);
|
||||
|
||||
ASSERT_TRUE(nir_src_is_const(store_to_v1->src[1]));
|
||||
ASSERT_EQ(nir_src_as_uint(store_to_v1->src[1]), 20);
|
||||
ASSERT_EQ(nir_src_comp_as_uint(store_to_v1->src[1], 1), 20);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue