From f6b519e0e68ff9ffe96d19be793baaa864e4f109 Mon Sep 17 00:00:00 2001 From: Meet-Patel2580 Date: Sun, 3 Sep 2023 18:50:07 -0400 Subject: [PATCH] updated draw_check_rr_node_hit to ensure that only nodes on currently visible layers are checked for hits to ensure that we only highlight nodes that are on visible layers. --- vpr/src/draw/draw_rr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vpr/src/draw/draw_rr.cpp b/vpr/src/draw/draw_rr.cpp index ad58bd40604..8fc168063c0 100644 --- a/vpr/src/draw/draw_rr.cpp +++ b/vpr/src/draw/draw_rr.cpp @@ -691,16 +691,20 @@ RRNodeId draw_check_rr_node_hit(float click_x, float click_y) { ezgl::rectangle bound_box; t_draw_coords* draw_coords = get_draw_coords_vars(); + t_draw_state* draw_state = get_draw_state_vars(); auto& device_ctx = g_vpr_ctx.device(); const auto& rr_graph = device_ctx.rr_graph; for (const RRNodeId& inode : device_ctx.rr_graph.nodes()) { + int layer_num = rr_graph.node_layer(inode); + if(!draw_state->draw_layer_display[layer_num].visible){ + continue; /* Don't check RR nodes on currently invisible layers*/ + } switch (rr_graph.node_type(inode)) { case IPIN: case OPIN: { int i = rr_graph.node_xlow(inode); int j = rr_graph.node_ylow(inode); - int layer_num = rr_graph.node_layer(inode); t_physical_tile_type_ptr type = device_ctx.grid.get_physical_type({i, j, layer_num}); int width_offset = device_ctx.grid.get_width_offset({i, j, layer_num}); int height_offset = device_ctx.grid.get_height_offset({i, j, layer_num});