From 360038fa5028b32837580478d36e5ec2c54d8652 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Mon, 21 Apr 2014 18:23:38 +0900 Subject: radeonsi: Fix calculation of number of banks for SI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The way cik_num_banks() was calculating the index only makes sense for the CIK specific macrotile mode array. For SI, we need to use the tile mode index directly. This happened to work most of the time because most of the SI tiling modes use the same number of banks. Reviewed-by: Marek Olšák Reviewed-by: Alex Deucher --- src/gallium/drivers/radeonsi/si_state.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeonsi/si_state.h') diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 0f37cd97162..4c5b09eb4b6 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -233,7 +233,8 @@ unsigned cik_bank_wh(unsigned bankwh); unsigned cik_db_pipe_config(struct si_screen *sscreen, unsigned tile_mode); unsigned cik_macro_tile_aspect(unsigned macro_tile_aspect); unsigned cik_tile_split(unsigned tile_split); -uint32_t cik_num_banks(struct si_screen *sscreen, unsigned bpe, unsigned tile_split); +uint32_t si_num_banks(struct si_screen *sscreen, unsigned bpe, unsigned tile_split, + unsigned tile_mode_index); unsigned si_tile_mode_index(struct r600_texture *rtex, unsigned level, bool stencil); /* si_state_draw.c */ -- cgit v1.2.3