}
}
+static inline uint32_t
+ac_get_num_physical_sgprs(enum chip_class chip_class)
+{
+ return chip_class >= VI ? 800 : 512;
+}
+
#ifdef __cplusplus
}
#endif
/* SGPR. */
properties->sgprsPerSimd =
- radv_get_num_physical_sgprs(pdevice);
+ ac_get_num_physical_sgprs(pdevice->rad_info.chip_class);
properties->minSgprAllocation =
pdevice->rad_info.chip_class >= VI ? 16 : 8;
properties->maxSgprAllocation =
if (conf->num_sgprs)
max_simd_waves =
MIN2(max_simd_waves,
- radv_get_num_physical_sgprs(device->physical_device) / conf->num_sgprs);
+ ac_get_num_physical_sgprs(device->physical_device->rad_info.chip_class) / conf->num_sgprs);
if (conf->num_vgprs)
max_simd_waves =
VkShaderStatisticsInfoAMD statistics = {};
statistics.shaderStageMask = shaderStage;
statistics.numPhysicalVgprs = RADV_NUM_PHYSICAL_VGPRS;
- statistics.numPhysicalSgprs = radv_get_num_physical_sgprs(device->physical_device);
+ statistics.numPhysicalSgprs = ac_get_num_physical_sgprs(device->physical_device->rad_info.chip_class);
statistics.numAvailableSgprs = statistics.numPhysicalSgprs;
if (stage == MESA_SHADER_COMPUTE) {
unreachable("illegal slot in get unique index\n");
}
-static inline uint32_t
-radv_get_num_physical_sgprs(struct radv_physical_device *physical_device)
-{
- return physical_device->rad_info.chip_class >= VI ? 800 : 512;
-}
-
#endif
/* Compute the per-SIMD wave counts. */
if (conf->num_sgprs) {
- if (sscreen->info.chip_class >= VI)
- max_simd_waves = MIN2(max_simd_waves, 800 / conf->num_sgprs);
- else
- max_simd_waves = MIN2(max_simd_waves, 512 / conf->num_sgprs);
+ max_simd_waves =
+ MIN2(max_simd_waves,
+ ac_get_num_physical_sgprs(sscreen->info.chip_class) / conf->num_sgprs);
}
if (conf->num_vgprs)