radv: brown-paper bag for a forgotten else.
authorDave Airlie <airlied@redhat.com>
Mon, 28 Nov 2016 06:22:05 +0000 (16:22 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 28 Nov 2016 06:23:10 +0000 (16:23 +1000)
This fixes the fix:
radv/ac/llvm: fix regression with shadow samplers fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
src/amd/common/ac_nir_to_llvm.c

index 16e30ef110a1aa69aedb0ef90364b5022d36b112..f623cc088d299067121f678b8100882a44184ae6 100644 (file)
@@ -3629,7 +3629,7 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
 
        if (instr->op == nir_texop_query_levels)
                result = LLVMBuildExtractElement(ctx->builder, result, LLVMConstInt(ctx->i32, 3, false), "");
-       if (instr->is_shadow && instr->op != nir_texop_txs && instr->op != nir_texop_lod)
+       else if (instr->is_shadow && instr->op != nir_texop_txs && instr->op != nir_texop_lod)
                result = LLVMBuildExtractElement(ctx->builder, result, ctx->i32zero, "");
        else if (instr->op == nir_texop_txs &&
                 instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE &&