From: Yonggang Luo Date: Mon, 5 Jun 2023 09:26:51 +0000 (+0800) Subject: vulkan: move nir_convert_ycbcr into vulkan runtime X-Git-Tag: upstream/23.3.3~7455 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b687fa4ccb985913ffe1440cde7105641d7e9761;p=platform%2Fupstream%2Fmesa.git vulkan: move nir_convert_ycbcr into vulkan runtime This only used by vulkan drivers and depends on vulkan util, so do the move to decouple nir from vulkan utils Reviewed-by: Rob Clark Reviewed-by: Faith Ekstrand Signed-off-by: Yonggang Luo Part-of: --- diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index e9c58ef..20e0e27 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -29,7 +29,6 @@ #include "nir/nir.h" #include "nir/nir_builder.h" #include "nir/nir_serialize.h" -#include "nir/nir_vulkan.h" #include "nir/radv_nir.h" #include "spirv/nir_spirv.h" #include "util/disk_cache.h" @@ -52,6 +51,7 @@ #include "aco_interface.h" #include "sid.h" #include "vk_format.h" +#include "vk_nir_convert_ycbcr.h" bool radv_shader_need_indirect_descriptor_sets(const struct radv_shader *shader) diff --git a/src/amd/vulkan/radv_pipeline_compute.c b/src/amd/vulkan/radv_pipeline_compute.c index 8538c6b..ad58c2d 100644 --- a/src/amd/vulkan/radv_pipeline_compute.c +++ b/src/amd/vulkan/radv_pipeline_compute.c @@ -29,7 +29,6 @@ #include "nir/nir.h" #include "nir/nir_builder.h" #include "nir/nir_serialize.h" -#include "nir/nir_vulkan.h" #include "nir/radv_nir.h" #include "spirv/nir_spirv.h" #include "util/disk_cache.h" @@ -41,6 +40,7 @@ #include "radv_private.h" #include "radv_shader.h" #include "radv_shader_args.h" +#include "vk_nir_convert_ycbcr.h" #include "vk_pipeline.h" #include "vk_render_pass.h" #include "vk_util.h" diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index de5f056..8cb2694 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -29,7 +29,6 @@ #include "nir/nir.h" #include "nir/nir_builder.h" #include "nir/nir_serialize.h" -#include "nir/nir_vulkan.h" #include "nir/radv_nir.h" #include "spirv/nir_spirv.h" #include "util/disk_cache.h" @@ -41,6 +40,7 @@ #include "radv_private.h" #include "radv_shader.h" #include "radv_shader_args.h" +#include "vk_nir_convert_ycbcr.h" #include "vk_pipeline.h" #include "vk_render_pass.h" #include "vk_util.h" diff --git a/src/amd/vulkan/radv_rt_common.h b/src/amd/vulkan/radv_rt_common.h index 1b748a1..b5e4d92 100644 --- a/src/amd/vulkan/radv_rt_common.h +++ b/src/amd/vulkan/radv_rt_common.h @@ -26,7 +26,7 @@ #include "nir/nir.h" #include "nir/nir_builder.h" -#include "nir/nir_vulkan.h" +#include "vk_nir_convert_ycbcr.h" #include "compiler/spirv/spirv.h" diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index d574ff0..cd6bdc5 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -30,13 +30,13 @@ #include "qpu/qpu_disasm.h" #include "compiler/nir/nir_builder.h" -#include "nir/nir_vulkan.h" #include "nir/nir_serialize.h" #include "util/u_atomic.h" #include "util/u_prim.h" #include "util/os_time.h" +#include "vk_nir_convert_ycbcr.h" #include "vk_pipeline.h" #include "vulkan/util/vk_format.h" diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index c965bdc..286ff36 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -107,7 +107,6 @@ files_libnir = files( 'nir_control_flow.c', 'nir_control_flow.h', 'nir_control_flow_private.h', - 'nir_convert_ycbcr.c', 'nir_deref.c', 'nir_deref.h', 'nir_divergence_analysis.c', @@ -295,7 +294,6 @@ files_libnir = files( 'nir_to_lcssa.c', 'nir_validate.c', 'nir_vla.h', - 'nir_vulkan.h', 'nir_worklist.c', 'nir_worklist.h', 'nir_xfb_info.h', diff --git a/src/freedreno/vulkan/tu_shader.cc b/src/freedreno/vulkan/tu_shader.cc index b526011..2a7b44c 100644 --- a/src/freedreno/vulkan/tu_shader.cc +++ b/src/freedreno/vulkan/tu_shader.cc @@ -8,7 +8,7 @@ #include "spirv/nir_spirv.h" #include "util/mesa-sha1.h" #include "nir/nir_xfb_info.h" -#include "nir/nir_vulkan.h" +#include "vk_nir_convert_ycbcr.h" #include "vk_pipeline.h" #include "vk_util.h" diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 0c9337b..50e05a7 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -36,9 +36,9 @@ #include "compiler/brw_nir.h" #include "compiler/brw_nir_rt.h" #include "anv_nir.h" -#include "nir/nir_vulkan.h" #include "nir/nir_xfb_info.h" #include "spirv/nir_spirv.h" +#include "vk_nir_convert_ycbcr.h" #include "vk_nir.h" #include "vk_pipeline.h" #include "vk_render_pass.h" diff --git a/src/intel/vulkan_hasvk/anv_nir_lower_ycbcr_textures.c b/src/intel/vulkan_hasvk/anv_nir_lower_ycbcr_textures.c index 70a772b..f39493f 100644 --- a/src/intel/vulkan_hasvk/anv_nir_lower_ycbcr_textures.c +++ b/src/intel/vulkan_hasvk/anv_nir_lower_ycbcr_textures.c @@ -25,7 +25,7 @@ #include "anv_private.h" #include "nir/nir.h" #include "nir/nir_builder.h" -#include "nir/nir_vulkan.h" +#include "vk_nir_convert_ycbcr.h" struct ycbcr_state { nir_builder *builder; diff --git a/src/microsoft/vulkan/dzn_nir.c b/src/microsoft/vulkan/dzn_nir.c index cc73b64..20f50bd 100644 --- a/src/microsoft/vulkan/dzn_nir.c +++ b/src/microsoft/vulkan/dzn_nir.c @@ -27,8 +27,8 @@ #include "nir_to_dxil.h" #include "nir_builder.h" #include "nir_builtin_builder.h" -#include "nir_vulkan.h" #include "dxil_nir.h" +#include "vk_nir_convert_ycbcr.h" static nir_ssa_def * dzn_nir_create_bo_desc(nir_builder *b, diff --git a/src/vulkan/runtime/meson.build b/src/vulkan/runtime/meson.build index 9fbdded..cf7ab21 100644 --- a/src/vulkan/runtime/meson.build +++ b/src/vulkan/runtime/meson.build @@ -64,6 +64,8 @@ vulkan_runtime_files = files( 'vk_instance.h', 'vk_log.c', 'vk_log.h', + 'vk_nir_convert_ycbcr.c', + 'vk_nir_convert_ycbcr.h', 'vk_nir.c', 'vk_nir.h', 'vk_object.c', diff --git a/src/compiler/nir/nir_convert_ycbcr.c b/src/vulkan/runtime/vk_nir_convert_ycbcr.c similarity index 99% rename from src/compiler/nir/nir_convert_ycbcr.c rename to src/vulkan/runtime/vk_nir_convert_ycbcr.c index ef2e5a2..bbc8e6a 100644 --- a/src/compiler/nir/nir_convert_ycbcr.c +++ b/src/vulkan/runtime/vk_nir_convert_ycbcr.c @@ -21,9 +21,11 @@ * IN THE SOFTWARE. */ -#include "nir_vulkan.h" -#include "vulkan/util/vk_format.h" -#include "vulkan/runtime/vk_ycbcr_conversion.h" +#include "vk_nir_convert_ycbcr.h" + +#include "vk_format.h" +#include "vk_ycbcr_conversion.h" + #include static nir_ssa_def * diff --git a/src/compiler/nir/nir_vulkan.h b/src/vulkan/runtime/vk_nir_convert_ycbcr.h similarity index 95% rename from src/compiler/nir/nir_vulkan.h rename to src/vulkan/runtime/vk_nir_convert_ycbcr.h index 0d84a7a..2a8442a 100644 --- a/src/compiler/nir/nir_vulkan.h +++ b/src/vulkan/runtime/vk_nir_convert_ycbcr.h @@ -21,8 +21,8 @@ * IN THE SOFTWARE. */ -#ifndef NIR_VULKAN_H -#define NIR_VULKAN_H +#ifndef VK_NIR_CONVERT_YCBCR_H +#define VK_NIR_CONVERT_YCBCR_H #include "nir.h" #include "nir_builder.h" @@ -53,4 +53,4 @@ bool nir_vk_lower_ycbcr_tex(nir_shader *nir, } /* extern "C" */ #endif -#endif /* NIR_VULKAN_H */ +#endif /* VK_NIR_CONVERT_YCBCR_H */