tu: Fix vertical tile merging check
The intent here was to check if the tile we're trying to merge vertically (prev_y_tile) has already been merged horizontally into a neighboring tile, but I used the slot_mask which also contains the tiles that have been merged into the prev_y_tile, so the check was too conservative and would fail even if another tile had been merged into prev_y_tile. This meant that we would fail to ever create 2x2 regions of tiles. Fix this by just testing prev_y_tile's bit in the mask. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33534>
This commit is contained in:
@@ -2490,8 +2490,13 @@ tu_render_pipe_fdm(struct tu_cmd_buffer *cmd, uint32_t pipe,
|
||||
}
|
||||
}
|
||||
if (y > 0) {
|
||||
struct tu_tile_config *prev_y_tile = &tiles[width * (y - 1) + x];
|
||||
if (!(merged_tiles & prev_y_tile->slot_mask) &&
|
||||
unsigned prev_y_idx = width * (y - 1) + x;
|
||||
struct tu_tile_config *prev_y_tile = &tiles[prev_y_idx];
|
||||
|
||||
/* We can't merge prev_y_tile into tile if it's already been
|
||||
* merged horizontally into its neighbor in the previous row.
|
||||
*/
|
||||
if (!(merged_tiles & (1u << prev_y_idx)) &&
|
||||
try_merge_tiles(tile, prev_y_tile, views, has_abs_mask)) {
|
||||
merged_tiles |= prev_y_tile->slot_mask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user