From: Rob Clark Date: Mon, 13 Jan 2020 19:36:19 +0000 (-0800) Subject: mesa/st: lower samplers before nir_lower_tex X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c6a2efa06e9bb5914f4557118930fc61065a467;p=mesa.git mesa/st: lower samplers before nir_lower_tex 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: --- 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;