}
static void
-radv_pipeline_get_nir(struct radv_device *device, struct radv_graphics_pipeline *pipeline,
- struct radv_shader_stage *stages, const struct radv_pipeline_key *pipeline_key)
-{
- for (unsigned s = 0; s < MESA_VULKAN_SHADER_STAGES; s++) {
- if (!stages[s].entrypoint)
- continue;
-
- int64_t stage_start = os_time_get_nano();
-
- /* NIR might already have been imported from a library. */
- if (!stages[s].nir) {
- stages[s].nir = radv_shader_spirv_to_nir(device, &stages[s], pipeline_key, pipeline->base.is_internal);
- }
-
- stages[s].feedback.duration += os_time_get_nano() - stage_start;
- }
-}
-
-static void
radv_pipeline_retain_shaders(struct radv_graphics_lib_pipeline *gfx_pipeline_lib, struct radv_shader_stage *stages)
{
for (unsigned s = 0; s < MESA_VULKAN_SHADER_STAGES; s++) {
if (pCreateInfo->flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT)
return VK_PIPELINE_COMPILE_REQUIRED;
- radv_pipeline_get_nir(device, pipeline, stages, pipeline_key);
+ for (unsigned s = 0; s < MESA_VULKAN_SHADER_STAGES; s++) {
+ if (!stages[s].entrypoint)
+ continue;
+
+ int64_t stage_start = os_time_get_nano();
+
+ /* NIR might already have been imported from a library. */
+ if (!stages[s].nir) {
+ stages[s].nir = radv_shader_spirv_to_nir(device, &stages[s], pipeline_key, pipeline->base.is_internal);
+ }
+
+ stages[s].feedback.duration += os_time_get_nano() - stage_start;
+ }
if (retain_shaders) {
radv_pipeline_retain_shaders(radv_pipeline_to_graphics_lib(&pipeline->base), stages);