};
}
-static uint32_t
-get_total_sgprs(struct radv_device *device)
-{
- if (device->physical_device->rad_info.chip_class >= VI)
- return 800;
- else
- return 512;
-}
-
static void
generate_shader_stats(struct radv_device *device,
struct radv_shader_variant *variant,
}
if (conf->num_sgprs)
- max_simd_waves = MIN2(max_simd_waves, get_total_sgprs(device) / conf->num_sgprs);
+ max_simd_waves =
+ MIN2(max_simd_waves,
+ radv_get_num_physical_sgprs(device->physical_device) / conf->num_sgprs);
if (conf->num_vgprs)
max_simd_waves = MIN2(max_simd_waves, 256 / conf->num_vgprs);
VkShaderStatisticsInfoAMD statistics = {};
statistics.shaderStageMask = shaderStage;
statistics.numPhysicalVgprs = 256;
- statistics.numPhysicalSgprs = get_total_sgprs(device);
+ statistics.numPhysicalSgprs = radv_get_num_physical_sgprs(device->physical_device);
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