radv/rt: remove one VALU from traversal loop
Not much, but something, I guess? Foz-DB Navi31: Totals from 93 (0.12% of 79395) affected shaders: MaxWaves: 1338 -> 1354 (+1.20%) Instrs: 3689907 -> 3689721 (-0.01%); split: -0.01%, +0.00% CodeSize: 18921812 -> 18922920 (+0.01%); split: -0.00%, +0.01% VGPRs: 9012 -> 8988 (-0.27%) Latency: 23153748 -> 23167640 (+0.06%) InvThroughput: 4490882 -> 4493136 (+0.05%) Copies: 287888 -> 287728 (-0.06%) VALU: 2022082 -> 2021916 (-0.01%) SALU: 458904 -> 459064 (+0.03%) Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30342>
This commit is contained in:
@@ -560,12 +560,11 @@ radv_build_ray_traversal(struct radv_device *device, nir_builder *b, const struc
|
||||
nir_load_deref(b, args->vars.dir), nir_load_deref(b, args->vars.inv_dir));
|
||||
}
|
||||
|
||||
nir_def *node_type = nir_iand_imm(b, bvh_node, 7);
|
||||
nir_push_if(b, nir_uge_imm(b, node_type, radv_bvh_node_box16));
|
||||
nir_push_if(b, nir_test_mask(b, bvh_node, BITFIELD64_BIT(ffs(radv_bvh_node_box16) - 1)));
|
||||
{
|
||||
nir_push_if(b, nir_uge_imm(b, node_type, radv_bvh_node_instance));
|
||||
nir_push_if(b, nir_test_mask(b, bvh_node, BITFIELD64_BIT(ffs(radv_bvh_node_instance) - 1)));
|
||||
{
|
||||
nir_push_if(b, nir_ieq_imm(b, node_type, radv_bvh_node_aabb));
|
||||
nir_push_if(b, nir_test_mask(b, bvh_node, BITFIELD64_BIT(ffs(radv_bvh_node_aabb) - 1)));
|
||||
{
|
||||
insert_traversal_aabb_case(device, b, args, &ray_flags, global_bvh_node);
|
||||
}
|
||||
|
Reference in New Issue
Block a user