}
info->r600_has_virtual_memory = true;
+ /* LDS is 64KB per CU (4 SIMDs), which is 16KB per SIMD (usage above
+ * 16KB makes some SIMDs unoccupied).
+ *
+ * LDS is 128KB in WGP mode and 64KB in CU mode. Assume the WGP mode is used.
+ */
+ info->lds_size_per_cu = info->chip_class >= GFX10 ? 128 * 1024 : 64 * 1024;
+
assert(util_is_power_of_two_or_zero(dma.available_rings + 1));
assert(util_is_power_of_two_or_zero(compute.available_rings + 1));
printf(" tcc_cache_line_size = %u\n", info->tcc_cache_line_size);
printf(" tcc_harvested = %u\n", info->tcc_harvested);
printf(" pc_lines = %u\n", info->pc_lines);
+ printf(" lds_size_per_cu = %u\n", info->lds_size_per_cu);
printf("CP info:\n");
printf(" gfx_ib_pad_with_type2 = %i\n", info->gfx_ib_pad_with_type2);
max_simd_waves = MIN2(max_simd_waves, max_vgprs / conf->num_vgprs);
}
- /* LDS is 64KB per CU (4 SIMDs) on GFX6-9, which is 16KB per SIMD (usage above
- * 16KB makes some SIMDs unoccupied).
- *
- * LDS is 128KB in WGP mode and 64KB in CU mode. Assume the WGP mode is used.
- */
- unsigned max_lds_size = sscreen->info.chip_class >= GFX10 ? 128*1024 : 64*1024;
- unsigned max_lds_per_simd = max_lds_size / 4;
+ unsigned max_lds_per_simd = sscreen->info.lds_size_per_cu / 4;
if (lds_per_wave)
max_simd_waves = MIN2(max_simd_waves, max_lds_per_simd / lds_per_wave);