From abaa4a80adb4d883efdd30e6768e5cd809eee6f4 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Fri, 2 Jan 2026 12:32:44 +0000 Subject: [PATCH] vulkan/runtime: use nir_shader_tex_pass for ycbcr lowering Acked-by: Simon Perretta Reviewed-by: Erik Faye-Lund Part-of: --- src/vulkan/runtime/vk_nir_convert_ycbcr.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/vulkan/runtime/vk_nir_convert_ycbcr.c b/src/vulkan/runtime/vk_nir_convert_ycbcr.c index cf07dfaff8c..2f25ed6103b 100644 --- a/src/vulkan/runtime/vk_nir_convert_ycbcr.c +++ b/src/vulkan/runtime/vk_nir_convert_ycbcr.c @@ -282,15 +282,10 @@ struct lower_ycbcr_tex_state { }; static bool -lower_ycbcr_tex_instr(nir_builder *b, nir_instr *instr, void *_state) +lower_ycbcr_tex_instr(nir_builder *b, nir_tex_instr *tex, void *_state) { const struct lower_ycbcr_tex_state *state = _state; - if (instr->type != nir_instr_type_tex) - return false; - - nir_tex_instr *tex = nir_instr_as_tex(instr); - /* For the following instructions, we don't apply any change and let the * instruction apply to the first plane. */ @@ -432,7 +427,6 @@ bool nir_vk_lower_ycbcr_tex(nir_shader *nir, .cb_data = cb_data, }; - return nir_shader_instructions_pass(nir, lower_ycbcr_tex_instr, - nir_metadata_control_flow, - &state); + return nir_shader_tex_pass(nir, lower_ycbcr_tex_instr, + nir_metadata_control_flow, &state); }