Mesa (main): radv: lower ycbcr textures just before applying the pipeline layout

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 07:18:35 UTC 2022


Module: Mesa
Branch: main
Commit: 2c97e79473f5d94239801cebcdb42b300e2b6699
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c97e79473f5d94239801cebcdb42b300e2b6699

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Apr  5 10:33:46 2022 +0200

radv: lower ycbcr textures just before applying the pipeline layout

This shouldn't change anything.

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

---

 src/amd/vulkan/radv_pipeline.c | 1 +
 src/amd/vulkan/radv_shader.c   | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 652e219d075..de99b9672ed 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -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]);
 
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 5361a0349d3..bdf7108820a 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -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().
     */



More information about the mesa-commit mailing list