From 1c6a2efa06e9bb5914f4557118930fc61065a467 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 13 Jan 2020 11:36:19 -0800 Subject: [PATCH] mesa/st: lower samplers before nir_lower_tex MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes incorrect lowering of YUV samplers when there are non-yuv samplers. Signed-off-by: Rob Clark Reviewed-by: Marek Olšák Tested-by: Marge Bot Part-of: --- src/mesa/state_tracker/st_program.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index ef10399fa18..d441ac777ab 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1227,6 +1227,10 @@ st_create_fp_variant(struct st_context *st, if (unlikely(key->external.lower_nv12 || key->external.lower_iyuv || key->external.lower_xy_uxvx || key->external.lower_yx_xuxv || key->external.lower_ayuv || key->external.lower_xyuv)) { + + st_nir_lower_samplers(pipe->screen, state.ir.nir, + stfp->shader_program, &stfp->Base); + nir_lower_tex_options options = {0}; options.lower_y_uv_external = key->external.lower_nv12; options.lower_y_u_v_external = key->external.lower_iyuv; -- 2.30.2