From: Alyssa Rosenzweig Date: Fri, 20 Dec 2019 17:34:20 +0000 (-0500) Subject: pan/midgard: Clamp LOD register swizzle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72e5749a635ca864c99a149df42685eb1cb48620;p=mesa.git pan/midgard: Clamp LOD register swizzle Fixes register allocation failures with textureLodOffset. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index ac712216ec2..8d457de950e 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -1826,6 +1826,10 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr, ins.texture.lod_register = true; ins.src[2] = index; + + for (unsigned c = 0; c < MIR_VEC_COMPONENTS; ++c) + ins.swizzle[2][c] = COMPONENT_X; + emit_explicit_constant(ctx, index, index); break;