radv: lower ycbcr textures just before applying the pipeline layout
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 5 Apr 2022 08:33:46 +0000 (10:33 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 8 Apr 2022 07:00:34 +0000 (07:00 +0000)
This shouldn't change anything.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15749>

src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_shader.c

index 652e219..de99b96 100644 (file)
@@ -4344,6 +4344,7 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout
             else if (i == MESA_SHADER_TESS_EVAL && nir[MESA_SHADER_GEOMETRY])
                info = &infos[MESA_SHADER_GEOMETRY];
          }
+         NIR_PASS_V(nir[i], radv_nir_lower_ycbcr_textures, pipeline_layout);
          NIR_PASS_V(nir[i], radv_nir_apply_pipeline_layout, device, pipeline_layout, info,
                     &args[i]);
 
index 5361a03..bdf7108 100644 (file)
@@ -844,10 +844,6 @@ radv_shader_compile_to_nir(struct radv_device *device, struct vk_shader_module *
    if (!key->optimisations_disabled)
       radv_optimize_nir(nir, false, true);
 
-   /* call radv_nir_lower_ycbcr_textures() late as there might still be
-    * tex with undef texture/sampler before first optimization */
-   NIR_PASS_V(nir, radv_nir_lower_ycbcr_textures, layout);
-
    /* We call nir_lower_var_copies() after the first radv_optimize_nir()
     * to remove any copies introduced by nir_opt_find_array_copies().
     */