How are you hitting this? The enclosing if is (need_swizzle || num_components != src_components) and if src_components = num_components = 1, then need_swizzle should be false?
On Fri, Jan 20, 2017 at 4:03 AM, Dave Airlie <airl...@gmail.com> wrote: > From: Dave Airlie <airl...@redhat.com> > > This gets hit with some geom shaders. > > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > src/amd/common/ac_nir_to_llvm.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c > index 92e2b44..97e352b 100644 > --- a/src/amd/common/ac_nir_to_llvm.c > +++ b/src/amd/common/ac_nir_to_llvm.c > @@ -844,7 +844,10 @@ static LLVMValueRef get_alu_src(struct > nir_to_llvm_context *ctx, > LLVMConstInt(ctx->i32, src.swizzle[2], false), > LLVMConstInt(ctx->i32, src.swizzle[3], false)}; > > - if (src_components > 1 && num_components == 1) { > + if (src_components == 1 && num_components == 1) { > + value = LLVMBuildExtractElement(ctx->builder, value, > + masks[0], ""); > + } else if (src_components > 1 && num_components == 1) { > value = LLVMBuildExtractElement(ctx->builder, value, > masks[0], ""); > } else if (src_components == 1 && num_components > 1) { > -- > 2.9.3 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev